summaryrefslogtreecommitdiff
path: root/include/protect.h
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-06-27 16:46:09 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-06-27 16:46:09 +0000
commita0f73cf7421e55e84b61065b4eb7ed13b05ce055 (patch)
treedbbc9e1d9250d85ce2e596841b0aea9cd477c016 /include/protect.h
parente528950ac7a2d23512be2a06378525b00be74185 (diff)
- šetřit možnosti podvádění – rychlost pohybu
- delObjectFromSpace ma casovu narocnost log(2,n) pri odstraneni objetu zo zonamu objektov ( btw. z hladiska programovania su veci pre 0.20 hotove ) git-svn-id: http://opensvn.csie.org/tuxanci_ng@75 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'include/protect.h')
-rw-r--r--include/protect.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/protect.h b/include/protect.h
new file mode 100644
index 0000000..e0553dd
--- /dev/null
+++ b/include/protect.h
@@ -0,0 +1,30 @@
+
+#ifndef PROTECT_H
+
+#define PROTECT_H
+
+#include "main.h"
+#include "myTimer.h"
+
+#define PROTECT_PING_INTERVAL_TIMEOUT 5000
+#define PROTECT_SPEED_INTERVAL_TIMEOUT 40
+#define PROTECT_SPEED_AVARAGE 10
+
+typedef struct protect_struct
+{
+ my_time_t lastPing;
+
+ my_time_t lastMove;
+ my_time_t avarage;
+ int count;
+
+ bool_t isDown;
+} protect_t;
+
+extern protect_t* newProtect();
+extern void refreshLastMove(protect_t *p);
+extern void rereshLastPing(protect_t *p);
+extern bool_t isDown(protect_t *p);
+extern void destroyProtect(protect_t *p);
+
+#endif