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