]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/physics.qh
Merge branch 'master' into Mario/qc_physics_prehax
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics.qh
1 #ifndef COMMON_PHYSICS_H
2 #define COMMON_PHYSICS_H
3
4 // Client/server mappings
5
6 .entity conveyor;
7
8 .float race_penalty;
9
10 .float gravity;
11 .float swamp_slowdown;
12 .float lastflags;
13 .float lastground;
14 .float wasFlying;
15 .float spectatorspeed;
16
17 .vector movement_old;
18 .float buttons_old;
19 .vector v_angle_old;
20 .string lastclassname;
21
22 .float() PlayerPhysplug;
23 float AdjustAirAccelQW(float accelqw, float factor);
24
25 bool IsFlying(entity a);
26
27 #ifdef CSQC
28
29         const int FL_WATERJUMP = 2048;  // player jumping out of water
30         const int FL_JUMPRELEASED = 4096;       // for jump debouncing
31
32         float PM_multijump_checkjump();
33         void PM_multijump();
34
35         .float watertype;
36         .int items;
37
38         .vector movement;
39         .vector v_angle;
40
41 // TODO
42         #define IS_CLIENT(s)                                            (s).isplayermodel
43         #define IS_PLAYER(s)                                            (s).isplayermodel
44         #define isPushable(s)                                           (s).isplayermodel
45
46         float player_multijump;
47         float player_jumpheight;
48
49         #define PHYS_INPUT_ANGLES(s)                            input_angles
50 // TODO
51         #define PHYS_WORLD_ANGLES(s)                            input_angles
52
53         #define PHYS_INPUT_TIMELENGTH                           input_timelength
54         #define PHYS_INPUT_FRAMETIME                            serverdeltatime
55
56         #define PHYS_INPUT_MOVEVALUES(s)                        input_movevalues
57
58         #define PHYS_INPUT_BUTTON_MASK(s)               (input_buttons | 128 * (input_movevalues_x < 0) | 256 * (input_movevalues_x > 0) | 512 * (input_movevalues_y < 0) | 1024 * (input_movevalues_y > 0))
59         #define PHYS_INPUT_BUTTON_ATCK(s)                       !!(input_buttons & 1)
60         #define PHYS_INPUT_BUTTON_JUMP(s)                       !!(input_buttons & 2)
61         #define PHYS_INPUT_BUTTON_ATCK2(s)                      !!(input_buttons & 4)
62         #define PHYS_INPUT_BUTTON_ZOOM(s)                       !!(input_buttons & 8)
63         #define PHYS_INPUT_BUTTON_CROUCH(s)                     !!(input_buttons & 16)
64         #define PHYS_INPUT_BUTTON_HOOK(s)                       !!(input_buttons & 32)
65         #define PHYS_INPUT_BUTTON_USE(s)                        !!(input_buttons & 64)
66         #define PHYS_INPUT_BUTTON_BACKWARD(s)           !!(input_buttons & 128)
67         #define PHYS_INPUT_BUTTON_FORWARD(s)            !!(input_buttons & 256)
68         #define PHYS_INPUT_BUTTON_LEFT(s)                       !!(input_buttons & 512)
69         #define PHYS_INPUT_BUTTON_RIGHT(s)                      !!(input_buttons & 1024)
70         #define PHYS_INPUT_BUTTON_JETPACK(s)            !!(input_buttons & 4096)
71
72         #define PHYS_DEAD(s)                                            s.csqcmodel_isdead
73
74         #define GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE  !!(moveflags & MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE)
75         #define GAMEPLAYFIX_NOGRAVITYONGROUND                   cvar("sv_gameplayfix_nogravityonground")
76         #define GAMEPLAYFIX_Q2AIRACCELERATE                             cvar("sv_gameplayfix_q2airaccelerate")
77         #define GAMEPLAYFIX_EASIERWATERJUMP                     getstati(STAT_GAMEPLAYFIX_EASIERWATERJUMP)
78         #define GAMEPLAYFIX_DOWNTRACEONGROUND                   getstati(STAT_GAMEPLAYFIX_DOWNTRACEONGROUND)
79         #define GAMEPLAYFIX_STEPMULTIPLETIMES                   getstati(STAT_GAMEPLAYFIX_STEPMULTIPLETIMES)
80         #define GAMEPLAYFIX_UNSTICKPLAYERS                              getstati(STAT_GAMEPLAYFIX_UNSTICKPLAYERS)
81         #define GAMEPLAYFIX_STEPDOWN                                    getstati(STAT_GAMEPLAYFIX_STEPDOWN)
82
83         #define IS_DUCKED(s)                                            !!(s.flags & FL_DUCKED)
84         #define SET_DUCKED(s)                                           s.flags |= FL_DUCKED
85         #define UNSET_DUCKED(s)                                         s.flags &= ~FL_DUCKED
86
87         #define IS_JUMP_HELD(s)                                         !(s.flags & FL_JUMPRELEASED)
88         #define SET_JUMP_HELD(s)                                        s.flags &= ~FL_JUMPRELEASED
89         #define UNSET_JUMP_HELD(s)                                      s.flags |= FL_JUMPRELEASED
90
91         #define IS_ONGROUND(s)                                          !!(s.flags & FL_ONGROUND)
92         #define SET_ONGROUND(s)                                         s.flags |= FL_ONGROUND
93         #define UNSET_ONGROUND(s)                                       s.flags &= ~FL_ONGROUND
94
95         #define WAS_ONGROUND(s)                                         !!(s.lastflags & FL_ONGROUND)
96
97         #define ITEMS_STAT(s)                                           (s).items
98         #define BUFFS(s)                                                        getstati(STAT_BUFFS)
99
100         #define PHYS_AMMO_FUEL(s)                                       getstati(STAT_FUEL)
101
102         #define PHYS_FROZEN(s)                                          getstati(STAT_FROZEN)
103
104         #define PHYS_DOUBLEJUMP                                         getstati(STAT_DOUBLEJUMP)
105
106         #define PHYS_BUGRIGS                                            getstati(STAT_BUGRIGS)
107         #define PHYS_BUGRIGS_ANGLE_SMOOTHING            getstati(STAT_BUGRIGS_ANGLE_SMOOTHING)
108         #define PHYS_BUGRIGS_PLANAR_MOVEMENT            getstati(STAT_BUGRIGS_PLANAR_MOVEMENT)
109         #define PHYS_BUGRIGS_REVERSE_SPEEDING           getstati(STAT_BUGRIGS_REVERSE_SPEEDING)
110         #define PHYS_BUGRIGS_FRICTION_FLOOR             getstatf(STAT_BUGRIGS_FRICTION_FLOOR)
111         #define PHYS_BUGRIGS_AIR_STEERING                       getstati(STAT_BUGRIGS_AIR_STEERING)
112         #define PHYS_BUGRIGS_FRICTION_BRAKE             getstatf(STAT_BUGRIGS_FRICTION_BRAKE)
113         #define PHYS_BUGRIGS_ACCEL                                      getstatf(STAT_BUGRIGS_ACCEL)
114         #define PHYS_BUGRIGS_SPEED_REF                          getstatf(STAT_BUGRIGS_SPEED_REF)
115         #define PHYS_BUGRIGS_SPEED_POW                          getstatf(STAT_BUGRIGS_SPEED_POW)
116         #define PHYS_BUGRIGS_STEER                                      getstatf(STAT_BUGRIGS_STEER)
117         #define PHYS_BUGRIGS_FRICTION_AIR                       getstatf(STAT_BUGRIGS_FRICTION_AIR)
118         #define PHYS_BUGRIGS_CAR_JUMPING                        getstatf(STAT_BUGRIGS_CAR_JUMPING)
119         #define PHYS_BUGRIGS_REVERSE_SPINNING           getstatf(STAT_BUGRIGS_REVERSE_SPINNING)
120         #define PHYS_BUGRIGS_REVERSE_STOPPING           getstatf(STAT_BUGRIGS_REVERSE_STOPPING)
121
122         #define PHYS_JUMPSPEEDCAP_MIN                           getstatf(STAT_MOVEVARS_JUMPSPEEDCAP_MIN)
123         #define PHYS_JUMPSPEEDCAP_MAX                           getstatf(STAT_MOVEVARS_JUMPSPEEDCAP_MAX)
124         #define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS       getstati(STAT_MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS)
125
126         #define PHYS_TRACK_CANJUMP(s)                           getstati(STAT_MOVEVARS_TRACK_CANJUMP)
127         #define PHYS_ACCELERATE                                         getstatf(STAT_MOVEVARS_ACCELERATE)
128         #define PHYS_AIRACCEL_QW(s)                                     getstatf(STAT_MOVEVARS_AIRACCEL_QW)
129         #define PHYS_AIRACCEL_QW_STRETCHFACTOR(s)       getstatf(STAT_MOVEVARS_AIRACCEL_QW_STRETCHFACTOR)
130         #define PHYS_AIRACCEL_SIDEWAYS_FRICTION         getstatf(STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION)
131         #define PHYS_AIRACCELERATE                                      getstatf(STAT_MOVEVARS_AIRACCELERATE)
132         #define PHYS_AIRCONTROL                                         getstatf(STAT_MOVEVARS_AIRCONTROL)
133         #define PHYS_AIRCONTROL_PENALTY                         getstatf(STAT_MOVEVARS_AIRCONTROL_PENALTY)
134         #define PHYS_AIRCONTROL_POWER                           getstatf(STAT_MOVEVARS_AIRCONTROL_POWER)
135         #define PHYS_AIRSPEEDLIMIT_NONQW(s)                     getstatf(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW)
136         #define PHYS_AIRSTOPACCELERATE                          getstatf(STAT_MOVEVARS_AIRSTOPACCELERATE)
137         #define PHYS_AIRSTRAFEACCEL_QW(s)                       getstatf(STAT_MOVEVARS_AIRSTRAFEACCEL_QW)
138         #define PHYS_AIRSTRAFEACCELERATE(s)                     getstatf(STAT_MOVEVARS_AIRSTRAFEACCELERATE)
139         #define PHYS_ENTGRAVITY(s)                                      getstatf(STAT_MOVEVARS_ENTGRAVITY)
140         #define PHYS_FRICTION                                           getstatf(STAT_MOVEVARS_FRICTION)
141         #define PHYS_FRICTION_SLICK                                     getstatf(STAT_MOVEVARS_FRICTION_SLICK)
142         #define PHYS_FRICTION_ONLAND                            getstatf(STAT_MOVEVARS_FRICTION_ONLAND)
143         #define PHYS_GRAVITY                                            getstatf(STAT_MOVEVARS_GRAVITY)
144         #define PHYS_HIGHSPEED                                          getstatf(STAT_MOVEVARS_HIGHSPEED)
145         #define PHYS_JUMPVELOCITY                                       getstatf(STAT_MOVEVARS_JUMPVELOCITY)
146         #define PHYS_MAXAIRSPEED(s)                                     getstatf(STAT_MOVEVARS_MAXAIRSPEED)
147         #define PHYS_MAXAIRSTRAFESPEED                          getstatf(STAT_MOVEVARS_MAXAIRSTRAFESPEED)
148         #define PHYS_MAXSPEED(s)                                        getstatf(STAT_MOVEVARS_MAXSPEED)
149         #define PHYS_STEPHEIGHT                                         getstatf(STAT_MOVEVARS_STEPHEIGHT)
150         #define PHYS_STOPSPEED                                          getstatf(STAT_MOVEVARS_STOPSPEED)
151         #define PHYS_WARSOWBUNNY_ACCEL                          getstatf(STAT_MOVEVARS_WARSOWBUNNY_ACCEL)
152         #define PHYS_WARSOWBUNNY_BACKTOSIDERATIO        getstatf(STAT_MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO)
153         #define PHYS_WARSOWBUNNY_AIRFORWARDACCEL        getstatf(STAT_MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL)
154         #define PHYS_WARSOWBUNNY_TOPSPEED                       getstatf(STAT_MOVEVARS_WARSOWBUNNY_TOPSPEED)
155         #define PHYS_WARSOWBUNNY_TURNACCEL                      getstatf(STAT_MOVEVARS_WARSOWBUNNY_TURNACCEL)
156
157         #define PHYS_WALLFRICTION                                       getstati(STAT_MOVEVARS_WALLFRICTION)
158
159         #define PHYS_JETPACK_ACCEL_UP                           getstatf(STAT_JETPACK_ACCEL_UP)
160         #define PHYS_JETPACK_ACCEL_SIDE                         getstatf(STAT_JETPACK_ACCEL_SIDE)
161         #define PHYS_JETPACK_ANTIGRAVITY                        getstatf(STAT_JETPACK_ANTIGRAVITY)
162         #define PHYS_JETPACK_FUEL                                       getstatf(STAT_JETPACK_FUEL)
163         #define PHYS_JETPACK_MAXSPEED_UP                        getstatf(STAT_JETPACK_MAXSPEED_UP)
164         #define PHYS_JETPACK_MAXSPEED_SIDE                      getstatf(STAT_JETPACK_MAXSPEED_SIDE)
165
166         #define PHYS_DODGING_FROZEN                                     getstati(STAT_DODGING_FROZEN)
167
168         #define PHYS_NOSTEP                                                     getstati(STAT_NOSTEP)
169         #define PHYS_JUMPSTEP                                           getstati(STAT_MOVEVARS_JUMPSTEP)
170
171 #elif defined(SVQC)
172
173         bool Physics_Valid(string thecvar);
174
175         .vector stat_pl_view_ofs;
176         .vector stat_pl_crouch_view_ofs;
177
178         .vector stat_pl_min;
179         .vector stat_pl_max;
180         .vector stat_pl_crouch_min;
181         .vector stat_pl_crouch_max;
182
183         .float stat_sv_airaccel_qw;
184         .float stat_sv_airstrafeaccel_qw;
185         .float stat_sv_airspeedlimit_nonqw;
186         .float stat_sv_maxspeed;
187         .float stat_movement_highspeed;
188
189         .float stat_sv_friction_on_land;
190         .float stat_sv_friction_slick;
191
192         .float stat_doublejump;
193
194         .float stat_jumpspeedcap_min;
195         .float stat_jumpspeedcap_max;
196         .float stat_jumpspeedcap_disable_onramps;
197
198         .float stat_jetpack_accel_side;
199         .float stat_jetpack_accel_up;
200         .float stat_jetpack_antigravity;
201         .float stat_jetpack_fuel;
202         .float stat_jetpack_maxspeed_up;
203         .float stat_jetpack_maxspeed_side;
204         .float stat_gameplayfix_easierwaterjump;
205         .float stat_gameplayfix_downtracesupportsongroundflag;
206         .float stat_gameplayfix_stepmultipletimes;
207         .float stat_gameplayfix_unstickplayers;
208         .float stat_gameplayfix_stepdown;
209
210         .float stat_bugrigs;
211         .float stat_bugrigs_angle_smoothing;
212         .float stat_bugrigs_planar_movement;
213         .float stat_bugrigs_reverse_speeding;
214         .float stat_bugrigs_friction_floor;
215         .float stat_bugrigs_air_steering;
216         .float stat_bugrigs_friction_brake;
217         .float stat_bugrigs_accel;
218         .float stat_bugrigs_speed_ref;
219         .float stat_bugrigs_speed_pow;
220         .float stat_bugrigs_steer;
221         .float stat_bugrigs_friction_air;
222         .float stat_bugrigs_car_jumping;
223         .float stat_bugrigs_reverse_spinning;
224         .float stat_bugrigs_reverse_stopping;
225
226         // new properties
227         .float stat_sv_jumpvelocity;
228         .float stat_sv_airaccel_qw_stretchfactor;
229         .float stat_sv_maxairstrafespeed;
230         .float stat_sv_maxairspeed;
231         .float stat_sv_airstrafeaccelerate;
232         .float stat_sv_warsowbunny_turnaccel;
233         .float stat_sv_airaccel_sideways_friction;
234         .float stat_sv_aircontrol;
235         .float stat_sv_aircontrol_power;
236         .float stat_sv_aircontrol_penalty;
237         .float stat_sv_warsowbunny_airforwardaccel;
238         .float stat_sv_warsowbunny_topspeed;
239         .float stat_sv_warsowbunny_accel;
240         .float stat_sv_warsowbunny_backtosideratio;
241         .float stat_sv_friction;
242         .float stat_sv_accelerate;
243         .float stat_sv_stopspeed;
244         .float stat_sv_airaccelerate;
245         .float stat_sv_airstopaccelerate;
246
247         .float stat_nostep;
248         .float stat_jumpstep;
249
250         #define PHYS_INPUT_ANGLES(s)                            s.v_angle
251         #define PHYS_WORLD_ANGLES(s)                            s.angles
252
253         #define PHYS_INPUT_TIMELENGTH                           frametime
254         #define PHYS_INPUT_FRAMETIME                            sys_frametime
255
256         #define PHYS_INPUT_MOVEVALUES(s)                        s.movement
257         // TODO: cache
258         #define PHYS_INPUT_BUTTON_MASK(s)               (s.BUTTON_ATCK | 2 * s.BUTTON_JUMP | 4 * s.BUTTON_ATCK2 | 8 * s.BUTTON_ZOOM | 16 * s.BUTTON_CROUCH | 32 * s.BUTTON_HOOK | 64 * s.BUTTON_USE | 128 * (s.movement_x < 0) | 256 * (s.movement_x > 0) | 512 * (s.movement_y < 0) | 1024 * (s.movement_y > 0))
259         #define PHYS_INPUT_BUTTON_ATCK(s)                       s.BUTTON_ATCK
260         #define PHYS_INPUT_BUTTON_JUMP(s)                       s.BUTTON_JUMP
261         #define PHYS_INPUT_BUTTON_ATCK2(s)                      s.BUTTON_ATCK2
262         #define PHYS_INPUT_BUTTON_ZOOM(s)                       s.BUTTON_ZOOM
263         #define PHYS_INPUT_BUTTON_CROUCH(s)                     s.BUTTON_CROUCH
264         #define PHYS_INPUT_BUTTON_HOOK(s)                       s.BUTTON_HOOK
265         #define PHYS_INPUT_BUTTON_USE(s)                        s.BUTTON_USE
266         #define PHYS_INPUT_BUTTON_BACKWARD(s)           (s.movement_x < 0)
267         #define PHYS_INPUT_BUTTON_FORWARD(s)            (s.movement_x > 0)
268         #define PHYS_INPUT_BUTTON_LEFT(s)                       (s.movement_y < 0)
269         #define PHYS_INPUT_BUTTON_RIGHT(s)                      (s.movement_y > 0)
270         #define PHYS_INPUT_BUTTON_JETPACK(s)            s.BUTTON_JETPACK
271
272         #define PHYS_DEAD(s)                                            s.deadflag != DEAD_NO
273
274         #define GAMEPLAYFIX_GRAVITYUNAFFECTEDBYTICRATE  autocvar_sv_gameplayfix_gravityunaffectedbyticrate
275         #define GAMEPLAYFIX_NOGRAVITYONGROUND                   cvar("sv_gameplayfix_nogravityonground")
276         #define GAMEPLAYFIX_Q2AIRACCELERATE                             autocvar_sv_gameplayfix_q2airaccelerate
277         #define GAMEPLAYFIX_EASIERWATERJUMP                             cvar("sv_gameplayfix_easierwaterjump")
278         #define GAMEPLAYFIX_DOWNTRACEONGROUND                   cvar("sv_gameplayfix_downtracesupportsongroundflag")
279         #define GAMEPLAYFIX_STEPMULTIPLETIMES                   cvar("sv_gameplayfix_stepmultipletimes")
280         #define GAMEPLAYFIX_UNSTICKPLAYERS                              cvar("sv_gameplayfix_unstickplayers")
281         #define GAMEPLAYFIX_STEPDOWN                                    cvar("sv_gameplayfix_stepdown")
282
283         #define IS_DUCKED(s)                                            s.crouch
284         #define SET_DUCKED(s)                                           s.crouch = true
285         #define UNSET_DUCKED(s)                                         s.crouch = false
286
287         #define IS_JUMP_HELD(s)                                         !(s.flags & FL_JUMPRELEASED)
288         #define SET_JUMP_HELD(s)                                        s.flags &= ~FL_JUMPRELEASED
289         #define UNSET_JUMP_HELD(s)                                      s.flags |= FL_JUMPRELEASED
290
291         #define IS_ONGROUND(s)                                          !!(s.flags & FL_ONGROUND)
292         #define SET_ONGROUND(s)                                         s.flags |= FL_ONGROUND
293         #define UNSET_ONGROUND(s)                                       s.flags &= ~FL_ONGROUND
294
295         #define WAS_ONGROUND(s)                                         !!((s).lastflags & FL_ONGROUND)
296
297         #define ITEMS_STAT(s)                                           s.items
298         #define BUFFS(s)                                                        (s).buffs
299
300         #define PHYS_AMMO_FUEL(s)                                       s.ammo_fuel
301
302         #define PHYS_FROZEN(s)                                          s.frozen
303
304         #define PHYS_DOUBLEJUMP                                         autocvar_sv_doublejump
305
306         #define PHYS_BUGRIGS                                            g_bugrigs
307         #define PHYS_BUGRIGS_ANGLE_SMOOTHING            g_bugrigs_angle_smoothing
308         #define PHYS_BUGRIGS_PLANAR_MOVEMENT            g_bugrigs_planar_movement
309         #define PHYS_BUGRIGS_REVERSE_SPEEDING           g_bugrigs_reverse_speeding
310         #define PHYS_BUGRIGS_FRICTION_FLOOR                     g_bugrigs_friction_floor
311         #define PHYS_BUGRIGS_AIR_STEERING                       g_bugrigs_air_steering
312         #define PHYS_BUGRIGS_FRICTION_BRAKE                     g_bugrigs_friction_brake
313         #define PHYS_BUGRIGS_ACCEL                                      g_bugrigs_accel
314         #define PHYS_BUGRIGS_SPEED_REF                          g_bugrigs_speed_ref
315         #define PHYS_BUGRIGS_SPEED_POW                          g_bugrigs_speed_pow
316         #define PHYS_BUGRIGS_STEER                                      g_bugrigs_steer
317         #define PHYS_BUGRIGS_FRICTION_AIR                       g_bugrigs_friction_air
318         #define PHYS_BUGRIGS_CAR_JUMPING                        g_bugrigs_planar_movement_car_jumping
319         #define PHYS_BUGRIGS_REVERSE_SPINNING           g_bugrigs_reverse_spinning
320         #define PHYS_BUGRIGS_REVERSE_STOPPING           g_bugrigs_reverse_stopping
321
322         #define PHYS_JUMPSPEEDCAP_MIN                           autocvar_sv_jumpspeedcap_min
323         #define PHYS_JUMPSPEEDCAP_MAX                           autocvar_sv_jumpspeedcap_max
324         #define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS       autocvar_sv_jumpspeedcap_max_disable_on_ramps
325
326         #define PHYS_TRACK_CANJUMP(s)                           s.cvar_cl_movement_track_canjump
327         #define PHYS_ACCELERATE                                         self.stat_sv_accelerate
328         #define PHYS_AIRACCEL_QW(s)                                     s.stat_sv_airaccel_qw
329         #define PHYS_AIRACCEL_QW_STRETCHFACTOR(s)       self.stat_sv_airaccel_qw_stretchfactor
330         #define PHYS_AIRACCEL_SIDEWAYS_FRICTION         self.stat_sv_airaccel_sideways_friction
331         #define PHYS_AIRACCELERATE                                      self.stat_sv_airaccelerate
332         #define PHYS_AIRCONTROL                                         self.stat_sv_aircontrol
333         #define PHYS_AIRCONTROL_PENALTY                         self.stat_sv_aircontrol_penalty
334         #define PHYS_AIRCONTROL_POWER                           self.stat_sv_aircontrol_power
335         #define PHYS_AIRSPEEDLIMIT_NONQW(s)                     s.stat_sv_airspeedlimit_nonqw
336         #define PHYS_AIRSTOPACCELERATE                          self.stat_sv_airstopaccelerate
337         #define PHYS_AIRSTRAFEACCEL_QW(s)                       s.stat_sv_airstrafeaccel_qw
338         #define PHYS_AIRSTRAFEACCELERATE(s)                     s.stat_sv_airstrafeaccelerate
339         #define PHYS_ENTGRAVITY(s)                                      s.gravity
340         #define PHYS_FRICTION                                           self.stat_sv_friction
341         #define PHYS_FRICTION_SLICK                                     autocvar_sv_friction_slick
342         #define PHYS_FRICTION_ONLAND                            autocvar_sv_friction_on_land
343         #define PHYS_GRAVITY                                            autocvar_sv_gravity
344         #define PHYS_HIGHSPEED                                          autocvar_g_movement_highspeed
345         #define PHYS_JUMPVELOCITY                                       self.stat_sv_jumpvelocity
346         #define PHYS_MAXAIRSPEED(s)                                     self.stat_sv_maxairspeed
347         #define PHYS_MAXAIRSTRAFESPEED                          self.stat_sv_maxairstrafespeed
348         #define PHYS_MAXSPEED(s)                                        s.stat_sv_maxspeed
349         #define PHYS_STEPHEIGHT                                         autocvar_sv_stepheight
350         #define PHYS_STOPSPEED                                          self.stat_sv_stopspeed
351         #define PHYS_WARSOWBUNNY_ACCEL                          self.stat_sv_warsowbunny_accel
352         #define PHYS_WARSOWBUNNY_BACKTOSIDERATIO        self.stat_sv_warsowbunny_backtosideratio
353         #define PHYS_WARSOWBUNNY_AIRFORWARDACCEL        self.stat_sv_warsowbunny_airforwardaccel
354         #define PHYS_WARSOWBUNNY_TOPSPEED                       self.stat_sv_warsowbunny_topspeed
355         #define PHYS_WARSOWBUNNY_TURNACCEL                      self.stat_sv_warsowbunny_turnaccel
356
357         #define PHYS_WALLFRICTION                                       cvar("sv_wallfriction")
358
359         #define PHYS_JETPACK_ACCEL_UP                           autocvar_g_jetpack_acceleration_up
360         #define PHYS_JETPACK_ACCEL_SIDE                         autocvar_g_jetpack_acceleration_side
361         #define PHYS_JETPACK_ANTIGRAVITY                        autocvar_g_jetpack_antigravity
362         #define PHYS_JETPACK_FUEL                                       autocvar_g_jetpack_fuel
363         #define PHYS_JETPACK_MAXSPEED_UP                        autocvar_g_jetpack_maxspeed_up
364         #define PHYS_JETPACK_MAXSPEED_SIDE                      autocvar_g_jetpack_maxspeed_side
365
366         #define PHYS_DODGING_FROZEN                                     autocvar_sv_dodging_frozen
367
368         #define PHYS_NOSTEP                                                     cvar("sv_nostep")
369         #define PHYS_JUMPSTEP                                           cvar("sv_jumpstep")
370
371 #endif
372 #endif