by Urre » Tue Oct 30, 2007 9:05 am
Well... I looked at this thread a couple of times, pondering if I should answer, and decided not to, simply because I don't know as much about the subject that I'd like to. I've asked this myself, and both LordHavoc and FrikaC haven't been able to give proper answers. Maybe it was due to my obnoxiousness, or because there really isn't much more to it than what you said yourself, that they're run before, and after physics. If it means anything to you, then hey, that's great. In the past it didn't make any difference to me, but a couple of times when I needed to set some things that would be used by the physics this frame, I had to put in in Pre, otherwise it'd be lagged one frame all the time. Also, if you want to extract some info after physics have been processed this frame, you'd put it in Post. I'm sure these things sound really abstract and funky, but that's cause they are. Most of the time these things don't matter. The more important thing, that does matter, is that impulses aren't read until after physics, so you can't have ImpulseCommands in Pre. And like you said, you're doing your own physics (I also do, everyone should), in that case Pre or Post won't matter either. A word of advice though: if you're doing your own physics for other things than clients, you should not do it in their think function, since the timing is irregular. Make a list of all physics entities, and scroll through them in StartFrame and apply their physics there, independent from their think. On another note, think functions are run between PlayerPre and PlayerPost.
Hope that helps to some extent, and I hope Frik can hop in to give a better answer.
I was once a Quake modder