Typo: How to properly detect when an entity has
touched* the ground
I have a feature in my
super-boomer plugin where after a rocket jump, boomer explodes upon landing.
As for my land detection, I am using SDKHook_Touch for this and an additional condition within the callback procedure is added to check if the other flag is 0.
So the problem is...when boomer hits the far "ceiling" of the map, boomer would still explode.. Here is the sample code in my plugin:
Code:
SDKHook(client, SDKHook_Touch, SDKHook_Touch_Callback);
public SDKHook_Touch_Callback(entity, other)
{
if (IsValidClient(entity))
{
if ((other == 0 && g_bIsChargeActivated[entity] == true))
{
//Explode
}
}
}
I just want boomer to explode when he touches the ground and nothing else...
Any suggestions?