As we seem to be sharing fixes for strange behavior, I thought I'd share my latest
... "experience" with you.

I have been having a problem where the incorrect animation would be displayed for
a player, seemingly at random. So instead of running a player would swim, or it
would say sequence 77 not in model hgrunt etc. Each class in our mod has it's own
model, and each model only has animations for each of the weapons it uses, no more
than 10 per class. I originally thought this was due to animations being
incorrectly named in the model, however this would only explain problems
displaying weapon animations, and should not have affected action animations, like
swimming or running.

The real problem was that, for some odd reason, g_ulModelIndexPlayer was being
used to reset the players pev->modelindex at every spawn. This had the effect of
making every player reference, but not display, the model for the class of the
player that was spawned last. Thus if run, swim etc where in a different order in
a model then the incorrect sequence would be displayed. Also as different classes
had different weapons, which is almost always true, then it would fail to find the
correct weapon sequence, even though it was in the players model. Needles to say
this was a real pain in the ass to work out, especially as I had never used, or
even noticed, g_ulModelIndexPlayer.

The moral is that if you use models with different sequences, or different
sequence order, then you should comment out references to g_ulModelIndexPlayer. I
have commented them all out and have not seen any effects, other than the correct
sequences being displayed :}

Hope this saves someone a brain tumor ;)

Jeff "DarthBobo" Fearn
-----------------------------------------------------------------
Lead Coder, Web Master, Server Administrator for SWARM
http://swarm.edgegaming.com
-----------------------------------------------------------------

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to