work on prophunt

This commit is contained in:
Jackz 2022-08-24 22:37:03 -05:00
parent 9010b630d5
commit c68fac6359
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
6 changed files with 323 additions and 168 deletions

View file

@ -1,23 +1,3 @@
Action Timer_RecordPoints(Handle h, int i) {
if(GetEntityFlags(i) & FL_ONGROUND && IsPlayerAlive(i)) {
LocationMeta meta;
GetClientAbsOrigin(i, meta.pos);
GetClientEyeAngles(i, meta.ang);
if(meta.pos[0] != vecLastLocation[i][0] || meta.pos[1] != vecLastLocation[i][1] || meta.pos[2] != vecLastLocation[i][2]) {
if(movePoints.AddPoint(meta)) {
recordTimer = null;
return Plugin_Stop;
}
Effect_DrawBeamBoxRotatableToClient(i, meta.pos, DEBUG_POINT_VIEW_MIN, DEBUG_POINT_VIEW_MAX, NULL_VECTOR, g_iLaserIndex, 0, 0, 0, 150.0, 0.1, 0.1, 0, 0.0, {0, 0, 255, 64}, 0);
vecLastLocation[i] = meta.pos;
}
}
PrintHintText(i, "Points: %d / %d", movePoints.Length, MAX_VALID_LOCATIONS);
return Plugin_Continue;
}
bool firstCheckDone = false;
Action Timer_WaitForPlayers(Handle h) {
if(!isEnabled) return Plugin_Stop;
if(!ArePlayersJoining()) {
@ -36,27 +16,25 @@ Action Timer_WaitForPlayers(Handle h) {
}
Action Timer_CheckHiders(Handle h) {
static float pos[3];
static char classname[16];
Action Timer_StartGame(Handle h) {
Game.State = State_Active;
Game.MapTime = DEFAULT_GAME_TIME;
Game.Tick = 0;
for(int i = 1; i <= MaxClients; i++) {
if(IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i)) {
GetClientAbsOrigin(i, pos);
distQueue[i].AddPos(pos);
distQueue[i].Check(i);
int activeWeapon = GetEntPropEnt(i, Prop_Send, "m_hActiveWeapon");
if(IsValidEntity(activeWeapon)) {
GetEntityClassname(activeWeapon, classname, sizeof(classname));
if(i == currentSeeker) {
if(StrEqual(classname, "weapon_melee")) continue;
Game.SetupInventory(i);
} else if(StrEqual(classname, "weapon_gnome")) continue;
if(IsClientConnected(i) && IsClientInGame(i)) {
if(Game.IsSeeker(i)) {
Game.SetupSeeker(i);
}
Game.SetupInventory(i);
SetPlayerBlind(i, 0);
SetEntPropFloat(i, Prop_Send, "m_flLaggedMovementValue", 1.0);
}
}
Game.CleanupGnomes(true);
Game.Broadcast("Get ready here they come");
return Plugin_Continue;
}
Action Timer_TimesUp(Handle h) {
Game.End(State_PropsWin);
return Plugin_Continue;
}