From df54cbab4bb10ac39cfccc0f4273a7e68fcb9a1a Mon Sep 17 00:00:00 2001 From: zaCade Date: Sun, 5 Nov 2017 00:59:15 +0100 Subject: [PATCH] FixPointTeleport: Only called while constrained. --- FixPointTeleport/scripting/FixPointTeleport.sp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FixPointTeleport/scripting/FixPointTeleport.sp b/FixPointTeleport/scripting/FixPointTeleport.sp index 81d2b6ad..63bb47d5 100644 --- a/FixPointTeleport/scripting/FixPointTeleport.sp +++ b/FixPointTeleport/scripting/FixPointTeleport.sp @@ -4,6 +4,8 @@ #include #include +#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); } } \ No newline at end of file