View Single Post
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-18-2012 , 20:14   Re: [TF2] TF2Fix 1.0
Reply With Quote #8

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.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline