1 .float last_FORWARD_KEY_time;
2 .float last_BACKWARD_KEY_time;
3 .float last_LEFT_KEY_time;
4 .float last_RIGHT_KEY_time;
6 void dodging_Initialize() {
7 self.last_FORWARD_KEY_time = 0;
8 self.last_BACKWARD_KEY_time = 0;
9 self.last_RIGHT_KEY_time = 0;
10 self.last_LEFT_KEY_time = 0;
13 MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
14 print("dodging_hook\n");
18 MUTATOR_DEFINITION(dodging)
20 // we need to be called before GetPressedKey does its thing so we can
21 // detect state changes..
22 MUTATOR_HOOK(GetPressedKeys, dodging_GetPressedKeys, CBC_ORDER_FIRST);
24 // this just turns on the cvar. TODO: implement :D
31 // this just turns off the cvar. TODO: implement :D