Train bug

Report bugs found in the game, propose new feature requests, and discuss engine related content here.
Post Reply
Mathuz
Posts: 68
Joined: Tue Apr 02, 2019 6:40 am

Train bug

Post by Mathuz »

I'm playing with the train entity right now. Now I don't know whether it is a bug or intended behaviour, but if you watch the video there are 4 questions coming to my mind.

https://youtu.be/GvKDdBvlei4

1. I'm not able to figure out the rotation. Even if I do it exactly like it is in the original maps, the train will rotate around some weird point and moves to totally different place on the map.
2. If you crouch, you are going to stand on one place, as you can see in the video. Again, I do not know whether it is a bug or intended, but it is weird.
3. After some time the train disappears. When I shorten the path, it stays, but if it is longer, the body of the train visually disappears, even though you are still standing on it.
4. Slightly off-topic, but the water/slime/lava is still unfinished in the latest version?

Thank you for your time and answers ;)
Shanjaq
Posts: 34
Joined: Wed Feb 27, 2019 11:03 am

Re: Train bug

Post by Shanjaq »

Hi Mathuz! Sorry about the delay, I've been mostly hanging out in the Discord. I will investigate the disappearing train bug, it looks like maybe some aspect of the ent is left in its starting leaf and after a certain distance it gets vis culled because the engine thinks it's still back there? The crouching and rotation issues could either be engine or progs, hmm..

The water in that video looks like an earlier dev build which was generating extra geometry with some stretched warp textures, which might be resolved in r6204. If not in that build, liquid surfaces are definitely fixed in the branch I'm currently working on for the 1.5.9.2 release. Thanks for reporting! :)
Shanjaq
Posts: 34
Joined: Wed Feb 27, 2019 11:03 am

Re: Train bug

Post by Shanjaq »

Update! I asked about the disappearing train in the Quake Mapping discord and got a few responses:

Spoike: bmodels tend to have their origin at '0 0 0', regardless of their actual geometry. So if a train (or really any bmodel entity) moves more than 4096 in any direction then it falls victim to the protocol limit - even if all of its actual geometry is within the bounds.
ZungryWare: I think if you change the origin key of the train to be closer to its starting position, it will fix the issue.
Spoike: aye, just shove an origin brush inside its geometry. its origin will then make more sense.
Qmaster: Origin brush origin brush...did this have to be specifically textured with "e1u/origin" or however it was specified in the hipnotic compiler or does ericw 's new tools support textures just plain named "origin" now?
ericw: it's just "origin". however, at least the way I have it implemented, you can't just add an origin brush to a func_train. you also have to set a special key to disable qbsp from adjusting the bounding box (it assumes you're using hiprotate if it sees an origin brush, but the bounding box tweaking will break func_train). Will update with the key later, it's something like _no_bounds_expansion

For now try limiting the travel distance to 4096 I guess, or try the origin tweak, and I'll look into the protocol limits Spoike mentioned, since this HoT fork already requires a protocol update it could possibly be extended for the case of moving bmodels (I'd have to make sure it doesn't bloat in the update packets too much.)
Mathuz
Posts: 68
Joined: Tue Apr 02, 2019 6:40 am

Re: Train bug

Post by Mathuz »

Of course, the origin brush! I didn't think it is necessary as the train is directed by path_corners. Ok, now also the rotation works fine. Thank you for your effort Shanjaq.

About the textures, they are ok, I wasn't using the newest build. Also, the external texture support also includes skins? I tried to use for example 'archer_0.tga' without success.
Post Reply