FixPointTeleport: Only called while constrained.
This commit is contained in:
parent
1cac46a063
commit
df54cbab4b
@ -4,6 +4,8 @@
|
||||
#include <sdktools>
|
||||
#include <dhooks>
|
||||
|
||||
#define SF_WEAPON_START_CONSTRAINED (1<<0)
|
||||
|
||||
Handle hFallInit;
|
||||
Handle hTeleport;
|
||||
|
||||
@ -90,6 +92,10 @@ public MRESReturn OnEntityTeleport(int entity, Handle hParams)
|
||||
{
|
||||
if (IsValidEntity(entity))
|
||||
{
|
||||
// Dont reinitialize, if we dont spawnflags or are missing the start constrained spawnflag.
|
||||
if (!HasEntProp(entity, Prop_Data, "m_spawnflags") || (GetEntProp(entity, Prop_Data, "m_spawnflags") & SF_WEAPON_START_CONSTRAINED) == 0)
|
||||
return;
|
||||
|
||||
SDKCall(hFallInit, entity);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user