X-Git-Url: http://git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fdefs.qh;h=85f3e5f7e5dbc4d2abf2babd6bfb3c13b3434506;hp=6871a58495c6b48a7716b90617d382ae61b4139b;hb=a862edad09556a59483fb5df9583b86605301cec;hpb=d526299afef1d6dbe77e480ea221e15b52bc2878 diff --git a/data/qcsrc/server/defs.qh b/data/qcsrc/server/defs.qh index 6871a584..85f3e5f7 100644 --- a/data/qcsrc/server/defs.qh +++ b/data/qcsrc/server/defs.qh @@ -646,3 +646,31 @@ string deathmessage; .float cvar_cl_accuracy_data_share; .float cvar_cl_accuracy_data_receive; + +// dodging +.float cvar_cl_dodging_timeout; + +// these are used to store the last key press time for each of the keys.. +.float last_FORWARD_KEY_time; +.float last_BACKWARD_KEY_time; +.float last_LEFT_KEY_time; +.float last_RIGHT_KEY_time; + +// these store the movement direction at the time of the dodge action happening. +.float dodging_direction_x; +.float dodging_direction_y; + +// this indicates the last time a dodge was executed. used to check if another one is allowed +// and to ramp up the dodge acceleration in the physics hook. +.float last_dodging_time; + +// set to 1 to indicate dodging has started.. reset by physics hook after dodge has been done.. +.float dodging_action; + +// This is the velocity gain to be added over the ramp time. +// It will decrease from frame to frame during dodging_action = 1 +// until it's 0. +.float dodging_velocity_gain; + +// the jump part of the dodge cannot be ramped +.float dodging_single_action;