This commit is contained in:
Jackzie 2020-10-24 15:49:26 -05:00
parent 372c4a4019
commit 9569af89b2
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
3 changed files with 19 additions and 2 deletions

Binary file not shown.

View file

@ -1,7 +1,6 @@
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <profiler>
#define PLUGIN_VERSION "1.5"
#pragma newdecls required

View file

@ -270,4 +270,22 @@ stock void CheatCommand(int client, const char[] command, const char[] argument1
FakeClientCommand(client, "%s %s %s", command, argument1, argument2);
SetCommandFlags(command, flags);
SetUserFlagBits(client, userFlags);
}
}
//entity abs origin code from here
//http://forums.alliedmods.net/showpost.php?s=e5dce96f11b8e938274902a8ad8e75e9&p=885168&postcount=3
stock void GetEntityAbsOrigin(int entity, float origin[3]) {
if (entity && IsValidEntity(entity)
&& (GetEntSendPropOffs(entity, "m_vecOrigin") != -1)
&& (GetEntSendPropOffs(entity, "m_vecMins") != -1)
&& (GetEntSendPropOffs(entity, "m_vecMaxs") != -1))
{
float mins[3], maxs[3];
GetEntPropVector(entity, Prop_Send, "m_vecOrigin", origin);
GetEntPropVector(entity, Prop_Send, "m_vecMins", mins);
GetEntPropVector(entity, Prop_Send, "m_vecMaxs", maxs);
origin[0] += (mins[0] + maxs[0]) * 0.5;
origin[1] += (mins[1] + maxs[1]) * 0.5;
origin[2] += (mins[2] + maxs[2]) * 0.5;
}
}