Closed qbism closed 3 years ago
Hmm. Been digging through the game DLL's recently and at least figured out the cause. Riders on trains are moved using pm_type of PF_FREEZE (MoveRiders()
and SV_Push()
in g_phys.c) to override the clients input and smooth out movement. Unfortunately, this also forces the client to treat movement as if it was a demo.
As you discovered, this then runs afoul of some of the bad hacks required to make VR mode work at all. Clients really do not like it when the server changes the view angles on them, and demo movement is a particularly weird case of it. I don't remember the root cause off the top of my head, but if I remember right it causes the client to loose track of the correct orientation and causes head movements to be applied incorrectly in game.
I'll have to experiment a bit, but there might not be an elegant way to fix this. Thanks for reporting it!
Thanks for looking at this. It's a Lazarus quake3-like feature rather than the typical Q2 experience in any case. If there's any interest, quake2world rotates the rider, but I don't know the method.
Hmm. I tracked down how quake2world handles it in their game dll and experimented with applying that as a fix. It seems to work except for the fact that the movement is incredibly jerky - definitely a problem for VR. I'll have to poke at it more when I have enough time to properly figure out what's going on between the two - I've somewhat deliberately avoided messing with the netcode up until this point.
I also discovered that a couple more issues while testing it (fog being another big one). rain.bsp is pretty cool though.
Fog is an unfinished single-player hack but svc_fog would be straightforward to complete.
svc_fog was pretty painless to get working, and has a bonus of working in both OS X and Linux. The problems I've been running into are renderer related, though - using the fixed pipeline fog is having unintended consequences with various things that get drawn with vertex/fragment shaders.
Not a huge deal, just annoying to have to dig through and fix.
Can't look up or down when riding a func_train while it's turning. Lazarus map lcraft.bsp for example. EDIT- only occurs when turn_rider is set. EDIT2 - this is solved by removing cl.bodyangles[PITCH] = 0; in CL_CalcViewValues, but I don't if there are repercussions.