mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 06:03:21 +00:00
Add TIMER_FLAG_NO_MAPCHANGE to most timers
& reduce l4d2_avoid_minigun timer from 2s -> 5s
This commit is contained in:
parent
7456c9b9be
commit
fb2983f5da
8 changed files with 15 additions and 19 deletions
|
@ -34,7 +34,7 @@ public void OnPluginStart()
|
|||
{
|
||||
SetFailState("This plugin is for L4D/L4D2 only.");
|
||||
}
|
||||
CreateTimer(2.0, CheckTimer, _, TIMER_REPEAT);
|
||||
CreateTimer(5.0, CheckTimer, _, TIMER_REPEAT);
|
||||
HookEvent("player_team", Event_PlayerTeamSwitch);
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ public void Event_PlayerTeamSwitch(Event event, const char[] name, bool dontBroa
|
|||
|
||||
public Action CheckTimer(Handle timer) {
|
||||
//Don't do any processing if no one is connected.
|
||||
//optimization: Only update player-based positions ever 5 loops (2 * 5 = 10 seconds)
|
||||
//optimization: Only update player-based positions ever 5 loops (5 * 5 = 25 seconds)
|
||||
static int timer_update_pos;
|
||||
if(GetClientCount(true) == 0) return Plugin_Continue;
|
||||
float pos[3], ang[3], botPos[3], center_distance;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue