FixPointTeleport: potentially fix crash issue.
This commit is contained in:
parent
cd15f02ca1
commit
eb76f695c5
@ -4,8 +4,8 @@
|
|||||||
#include <sdktools>
|
#include <sdktools>
|
||||||
#include <dhooks>
|
#include <dhooks>
|
||||||
|
|
||||||
Handle hTeleport;
|
|
||||||
Handle hFallInit;
|
Handle hFallInit;
|
||||||
|
Handle hTeleport;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
@ -64,7 +64,7 @@ public void OnPluginStart()
|
|||||||
|
|
||||||
// Late load.
|
// Late load.
|
||||||
int entity = INVALID_ENT_REFERENCE;
|
int entity = INVALID_ENT_REFERENCE;
|
||||||
while((entity = FindEntityByClassname(entity, "weapon_*")) != INVALID_ENT_REFERENCE)
|
while ((entity = FindEntityByClassname(entity, "weapon_*")) != INVALID_ENT_REFERENCE)
|
||||||
{
|
{
|
||||||
OnEntityCreated(entity, "weapon_*");
|
OnEntityCreated(entity, "weapon_*");
|
||||||
}
|
}
|
||||||
@ -88,5 +88,8 @@ public void OnEntityCreated(int entity, const char[] classname)
|
|||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
public MRESReturn OnEntityTeleport(int entity, Handle hParams)
|
public MRESReturn OnEntityTeleport(int entity, Handle hParams)
|
||||||
{
|
{
|
||||||
SDKCall(hFallInit, entity);
|
if (IsValidEntity(entity))
|
||||||
|
{
|
||||||
|
SDKCall(hFallInit, entity);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user