]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/defs.qh
Port dodging from Xonotic. Double-tap a movement key to leap in that direction. Still...
[voretournament/voretournament.git] / data / qcsrc / server / defs.qh
index 6871a58495c6b48a7716b90617d382ae61b4139b..85f3e5f7e5dbc4d2abf2babd6bfb3c13b3434506 100644 (file)
@@ -646,3 +646,31 @@ string deathmessage;
 \r
 .float cvar_cl_accuracy_data_share;\r
 .float cvar_cl_accuracy_data_receive;\r
+\r
+// dodging\r
+.float cvar_cl_dodging_timeout;\r
+\r
+// these are used to store the last key press time for each of the keys..\r
+.float last_FORWARD_KEY_time;\r
+.float last_BACKWARD_KEY_time;\r
+.float last_LEFT_KEY_time;\r
+.float last_RIGHT_KEY_time;\r
+\r
+// these store the movement direction at the time of the dodge action happening.\r
+.float dodging_direction_x;\r
+.float dodging_direction_y;\r
+\r
+// this indicates the last time a dodge was executed. used to check if another one is allowed\r
+// and to ramp up the dodge acceleration in the physics hook.\r
+.float last_dodging_time;\r
+\r
+// set to 1 to indicate dodging has started.. reset by physics hook after dodge has been done..\r
+.float dodging_action;\r
+\r
+// This is the velocity gain to be added over the ramp time.\r
+// It will decrease from frame to frame during dodging_action = 1\r
+// until it's 0.\r
+.float dodging_velocity_gain;\r
+\r
+// the jump part of the dodge cannot be ramped\r
+.float dodging_single_action;\r