Use methodmaps for game stuff

This commit is contained in:
Jackz 2022-07-06 17:55:55 -05:00
parent 74f37a1454
commit 464f7f4f9e
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
6 changed files with 53 additions and 65 deletions

View file

@ -42,7 +42,7 @@ bool FindSpawnPosition(float pos[3], bool includePlayers = true) {
static char buffer[64];
methodmap GameConVar __nullable__ < ConVar {
methodmap GameConVar < ConVar {
public GameConVar(const char[] name) {
return view_as<GameConVar>(FindConVar(name));
}
@ -74,6 +74,7 @@ methodmap GameConVar __nullable__ < ConVar {
}
}
methodmap GuessWhoGame {
property int Seeker {
@ -185,7 +186,7 @@ methodmap GuessWhoGame {
EntFire("gwprop", "kill");
EntFire("gwblocker", "kill");
EntFire("gwportal", "kill");
PeekCam.Destroy();
// PeekCam.Destroy();
if(entsOnly) return;
for(int i = 1; i <= MaxClients; i++) {
if(IsClientConnected(i) && IsClientInGame(i)) {
@ -268,6 +269,7 @@ methodmap GuessWhoGame {
}
stock void GetHorizontalPositionFromClient(int client, float units, float finalPosition[3]) {
float pos[3], ang[3];
GetClientEyeAngles(client, ang);
@ -279,11 +281,6 @@ stock void GetHorizontalPositionFromClient(int client, float units, float finalP
finalPosition = pos;
}
stock void GetAnglesLookAt(int iClient, int iTarget, float fFinalPos[3]) {
static float fTargetPos[3];
static float fTargetAngles[3];