Added more VScript functions for player classes

This commit is contained in:
Blixibon
2020-06-11 23:47:28 -05:00
parent 66a44d0739
commit 7d2c6315b5
5 changed files with 43 additions and 1 deletions

View File

@@ -1969,8 +1969,14 @@ public:
HSCRIPT ScriptNextMovePeer(void);
const Vector& ScriptEyePosition(void) { static Vector vec; vec = EyePosition(); return vec; }
#ifdef MAPBASE_VSCRIPT
const QAngle& ScriptEyeAngles(void) { static QAngle ang; ang = EyeAngles(); return ang; }
void ScriptSetAngles(const QAngle angles) { Teleport(NULL, &angles, NULL); }
const QAngle& ScriptGetAngles(void) { return GetAbsAngles(); }
#else
void ScriptSetAngles(float fPitch, float fYaw, float fRoll) { QAngle angles(fPitch, fYaw, fRoll); Teleport(NULL, &angles, NULL); }
const Vector& ScriptGetAngles(void) { static Vector vec; QAngle qa = GetAbsAngles(); vec.x = qa.x; vec.y = qa.y; vec.z = qa.z; return vec; }
#endif
void ScriptSetSize(const Vector& mins, const Vector& maxs) { UTIL_SetSize(this, mins, maxs); }
void ScriptUtilRemove(void) { UTIL_Remove(this); }