I don't think this is reproducible in a clean SDK when I did it (had to keep setting the silly cl_lw cvar on for some reason, until it decided to 'stick' -- third time's the charm.. ;)).
But, that line prints exactly once per primary attack. I made the absolutely most minimal mod possible (dlls, liblist, 2 maps and that's it). Didn't test over the network, just a lan game. Maybe that makes a difference?
At 02:44 AM 9/12/2003 +0200, you wrote:
hi,
when trying to do some advanced weapon coding i discovered a strange behavior of the client weapon prediction. I'm using a counter in PrimaryAttack(). On the server everything works perfectly, but on client the counter is almost always wrong.
Now here's the problem: PrimaryAttack() gets called MANY times on client when its just called once on the server.
m_flNextPrimaryAttack is set in PrimaryAttack(), but on next frame it seems to be gone, m_flNextPrimaryAttack is still <0, and PrimaryAttack() gets called again! That changes not until a few frames later (maybe when the next server packet arrive?)
I reproduced this what i think is a bug with an clean version of SDK2.3.
Add this to hl_weapons.cpp before calling into PrimaryAttack(): gEngfuncs.Con_Printf("attack: %f\n", gEngfuncs.GetClientTime()); Take a pistol and fire once. You see many calls into PrimaryAttack().
Maybe there's something wrong with my HL? Can someone plz try to reproduce this? If this is indeed a bug, it's very bad: it makes the random_seed useless.
Rockefeller
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

