forked from UNLOZE/sm-plugins
batch remove trailing spaces and convert windows \r\n line endings to linux \n
i don't want to have to do this again, fix your shitty code editors @commiters !!!
This commit is contained in:
@@ -31,19 +31,19 @@ public void OnPluginStart()
|
||||
SetFailState("Couldn't load \"FixPointTeleport.games\" game config!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// CBaseCombatWeapon::FallInit()
|
||||
StartPrepSDKCall(SDKCall_Entity);
|
||||
|
||||
|
||||
if (!PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, "FallInit"))
|
||||
{
|
||||
CloseHandle(hGameConf);
|
||||
SetFailState("PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, \"FallInit\") failed!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
hFallInit = EndPrepSDKCall();
|
||||
|
||||
|
||||
// CBaseEntity::Teleport(Vector const*, QAngle const*, Vector const*)
|
||||
int iOffset;
|
||||
if ((iOffset = GameConfGetOffset(hGameConf, "Teleport")) == -1)
|
||||
@@ -52,25 +52,25 @@ public void OnPluginStart()
|
||||
SetFailState("GameConfGetOffset(hGameConf, \"Teleport\") failed!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ((hTeleport = DHookCreate(iOffset, HookType_Entity, ReturnType_Void, ThisPointer_CBaseEntity, OnEntityTeleport)) == INVALID_HANDLE)
|
||||
{
|
||||
CloseHandle(hGameConf);
|
||||
SetFailState("DHookCreate(iOffset, HookType_Entity, ReturnType_Void, ThisPointer_CBaseEntity, OnEntityTeleport) failed!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
DHookAddParam(hTeleport, HookParamType_VectorPtr);
|
||||
DHookAddParam(hTeleport, HookParamType_ObjectPtr);
|
||||
DHookAddParam(hTeleport, HookParamType_VectorPtr);
|
||||
|
||||
|
||||
// Late load.
|
||||
int entity = INVALID_ENT_REFERENCE;
|
||||
while ((entity = FindEntityByClassname(entity, "weapon_*")) != INVALID_ENT_REFERENCE)
|
||||
{
|
||||
OnEntityCreated(entity, "weapon_*");
|
||||
}
|
||||
|
||||
|
||||
CloseHandle(hGameConf);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public MRESReturn OnEntityTeleport(int entity, Handle hParams)
|
||||
// Dont reinitialize, if we dont have 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user