View Single Post
sheo
SourceMod Donor
Join Date: Jul 2013
Location: Russia, Moscow
Old 10-03-2014 , 02:53   Re: [TF2] Is Player In Spawn?
Reply With Quote #12

Well, i tried to fix your version and there are thins that i noticed that should be changed:

Why do you use GetForwardFunctionCount? Your code simply does not work, because you don`t call Call_StartForward, but push cells to it.

You don`t need SDKHook_Touch at all. SDKHook_StartTouch paired with SDKHook_EndTouch is enough and works fine in any case (teleporting, spawning not in spawn area)

"teamplay_round_start" is not a good point to find a spawn room entity, because in TF2 this event is not the only one for round starts. OnEntityCreated is not that expensive to avoid using it. Or just list all round start events. (teamplay_round_stalemate, arena_round_start)
__________________

Last edited by sheo; 10-03-2014 at 02:55.
sheo is offline