aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Timer.h
diff options
context:
space:
mode:
authorsilver1ce <none@none>2010-02-27 15:25:14 +0200
committersilver1ce <none@none>2010-02-27 15:25:14 +0200
commitfcaa318fb36aca077ca9ba5bfe2707ae0fcbd377 (patch)
tree81007144350a78785d58a9797aac0385edb25589 /src/shared/Timer.h
parent1815d19b85c8b6685850e761a49e1c0d2d7f366b (diff)
Update visibility system
*visibility updates and ai relocations processed simultaneously for each grid *these operations now are not synchronized for different grids *some changes into structure of visibility notifiers --HG-- branch : trunk
Diffstat (limited to 'src/shared/Timer.h')
-rw-r--r--src/shared/Timer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/Timer.h b/src/shared/Timer.h
index 643f68dba84..3e0a369b655 100644
--- a/src/shared/Timer.h
+++ b/src/shared/Timer.h
@@ -201,6 +201,11 @@ struct PeriodicTimer
i_period = period;
}
+ // Tracker interface
+ void TUpdate(int32 diff) { i_expireTime -= diff; }
+ bool TPassed() const { return i_expireTime <= 0; }
+ void TReset(int32 diff, int32 period) { i_expireTime += period > diff ? period : diff; }
+
private:
int32 i_period;