mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
Renamed timer to mytimer to avoid nameclash with system function of same name
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1617 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
96dd5860cd
commit
5fd77bb31c
1 changed files with 5 additions and 5 deletions
|
@ -1568,7 +1568,7 @@ void SV_SnapAll_f (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float timer;
|
float mytimer;
|
||||||
float lasttimer;
|
float lasttimer;
|
||||||
int ticsleft;
|
int ticsleft;
|
||||||
float timerinterval;
|
float timerinterval;
|
||||||
|
@ -1578,14 +1578,14 @@ void SV_CheckTimer(void)
|
||||||
{
|
{
|
||||||
float ctime = Sys_DoubleTime();
|
float ctime = Sys_DoubleTime();
|
||||||
// if (ctime < lasttimer) //new map? (shouldn't happen)
|
// if (ctime < lasttimer) //new map? (shouldn't happen)
|
||||||
// timer = ctime+5; //trigger in a few secs
|
// mytimer = ctime+5; //trigger in a few secs
|
||||||
lasttimer = ctime;
|
lasttimer = ctime;
|
||||||
|
|
||||||
if (ticsleft)
|
if (ticsleft)
|
||||||
{
|
{
|
||||||
if (timer < ctime)
|
if (mytimer < ctime)
|
||||||
{
|
{
|
||||||
timer += timerinterval;
|
mytimer += timerinterval;
|
||||||
if (ticsleft > 0)
|
if (ticsleft > 0)
|
||||||
ticsleft--;
|
ticsleft--;
|
||||||
|
|
||||||
|
@ -1631,7 +1631,7 @@ void SV_SetTimer_f(void)
|
||||||
timercommand = Cvar_Get("sv_timer", "", CVAR_NOSET, NULL);
|
timercommand = Cvar_Get("sv_timer", "", CVAR_NOSET, NULL);
|
||||||
Cvar_ForceSet(timercommand, command);
|
Cvar_ForceSet(timercommand, command);
|
||||||
|
|
||||||
timer = Sys_DoubleTime() + interval;
|
mytimer = Sys_DoubleTime() + interval;
|
||||||
ticsleft = count;
|
ticsleft = count;
|
||||||
timerinterval = interval;
|
timerinterval = interval;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue