Quote:
Originally Posted by Powerlord
Just looked at the code for a sec after a person I was talking to mentioned its timers...
There's a serious need for optimization in the millisecond timer (which is actually every tenth second, not millisecond). I see repeated calls to TF2_GetPlayerClass(z) and GetEntPropEnt(z, Prop_Send, "m_hActiveWeapon"). These really should be called once and have their values stored in a variable.
For that matter, TF2_GetPlayerClass returns an enum value, so it can be used in a switch statement.
|
I didn't think that repeatedly calling those was so bad, but I guess I can change 'em. The timer's called "millisecond" because I've never seen the terms "centisecond" or "decisecond" used anywhere.
__________________