Misc: Move shared stuff to shared git.

This commit is contained in:
zaCade
2018-12-08 21:12:39 +01:00
parent d4378f6476
commit 8cdcb01100
97 changed files with 25215 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1
#pragma newdecls required
public Plugin myinfo =
{
name = "FixAngles",
author = "BotoX",
description = "",
version = "1.0",
url = ""
};
public void OnMapStart()
{
CreateTimer(1.0, CheckAngles, 0, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}
public Action CheckAngles(Handle timer)
{
int entity = INVALID_ENT_REFERENCE;
while((entity = FindEntityByClassname(entity, "func_rotating")) != INVALID_ENT_REFERENCE)
{
if(!HasEntProp(entity, Prop_Send, "m_angRotation"))
continue;
static float aAngles[3];
GetEntPropVector(entity, Prop_Send, "m_angRotation", aAngles);
bool bChanged = false;
for(int i = 0; i < 3; i++)
{
if(aAngles[i] < -360 || aAngles[i] > 360)
{
aAngles[i] = float(RoundFloat(aAngles[i]) % 360);
bChanged = true;
}
}
if(bChanged)
SetEntPropVector(entity, Prop_Send, "m_angRotation", aAngles);
}
return Plugin_Continue;
}