View Full Version : Saber prediction?

07-20-2002, 10:42 PM
As part of my mod, which is heavy on saber-dueling, I've been fiddling with the behavior of your lightsaber when it's thrown. Among other things, I'm trying to get it to not pass through walls on the way back to you (not necessarily dropping like it does in singleplayer, I just want it to stop flying through walls on the way back to you.)

Now, I've been heavily messing about with the server-side, and I've accomplished it on the server side; in saberMoveBack (w_saber.c), I just trace through the path that's calculated and stop the saber if it's about to pass through a wall, putting it up against the wall instead. However, the client must be doing prediction somewhere, because it appears to "jitter" to a certain extent . . . When the saber is sitting against a wall like that, it jitters back and forth; the client draws it starting to fly through the wall, and then the server says "You're crazy, that's not right at all," and the client obediently slaps it back into the proper position. Then the next frame it starts all over again.

Anyway, the point of this is, I can't seem to find where the client-side prediction is taking place. I looked in cg_predict, and it doesn't seem to be there . . . Anyone able to shed any light on this?

For what it's worth, I'm convinced it has to be client-side, because all the code server-side behaves exactly as though the saber is stationary (which it should).