mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-07 19:53:21 +00:00
Use methodmaps for game stuff
This commit is contained in:
parent
74f37a1454
commit
464f7f4f9e
6 changed files with 53 additions and 65 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue