]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics.qh
Kill use of self in player physics code
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics.qh
index 9d5d4f76c10e87cd547db6fd928bb7f0ed6e5eb7..a9ad9f3eb688b5d7a86a96291be8b493c55ee6f8 100644 (file)
@@ -105,35 +105,35 @@ bool IsFlying(entity a);
 
        #define PHYS_CL_TRACK_CANJUMP(s)                        getstati(STAT_MOVEVARS_CL_TRACK_CANJUMP)
        #define PHYS_TRACK_CANJUMP(s)                           getstati(STAT_MOVEVARS_TRACK_CANJUMP)
-       #define PHYS_ACCELERATE                                         getstatf(STAT_MOVEVARS_ACCELERATE)
+       #define PHYS_ACCELERATE(s)                                      getstatf(STAT_MOVEVARS_ACCELERATE)
        #define PHYS_AIRACCEL_QW(s)                                     getstatf(STAT_MOVEVARS_AIRACCEL_QW)
        #define PHYS_AIRACCEL_QW_STRETCHFACTOR(s)       getstatf(STAT_MOVEVARS_AIRACCEL_QW_STRETCHFACTOR)
-       #define PHYS_AIRACCEL_SIDEWAYS_FRICTION         getstatf(STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION)
-       #define PHYS_AIRACCELERATE                                      getstatf(STAT_MOVEVARS_AIRACCELERATE)
-       #define PHYS_AIRCONTROL                                         getstatf(STAT_MOVEVARS_AIRCONTROL)
-       #define PHYS_AIRCONTROL_PENALTY                         getstatf(STAT_MOVEVARS_AIRCONTROL_PENALTY)
-       #define PHYS_AIRCONTROL_POWER                           getstatf(STAT_MOVEVARS_AIRCONTROL_POWER)
+       #define PHYS_AIRACCEL_SIDEWAYS_FRICTION(s)      getstatf(STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION)
+       #define PHYS_AIRACCELERATE(s)                           getstatf(STAT_MOVEVARS_AIRACCELERATE)
+       #define PHYS_AIRCONTROL(s)                                      getstatf(STAT_MOVEVARS_AIRCONTROL)
+       #define PHYS_AIRCONTROL_PENALTY(s)                      getstatf(STAT_MOVEVARS_AIRCONTROL_PENALTY)
+       #define PHYS_AIRCONTROL_POWER(s)                        getstatf(STAT_MOVEVARS_AIRCONTROL_POWER)
        #define PHYS_AIRSPEEDLIMIT_NONQW(s)                     getstatf(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW)
-       #define PHYS_AIRSTOPACCELERATE                          getstatf(STAT_MOVEVARS_AIRSTOPACCELERATE)
+       #define PHYS_AIRSTOPACCELERATE(s)                       getstatf(STAT_MOVEVARS_AIRSTOPACCELERATE)
        #define PHYS_AIRSTRAFEACCEL_QW(s)                       getstatf(STAT_MOVEVARS_AIRSTRAFEACCEL_QW)
        #define PHYS_AIRSTRAFEACCELERATE(s)                     getstatf(STAT_MOVEVARS_AIRSTRAFEACCELERATE)
        #define PHYS_ENTGRAVITY(s)                                      getstatf(STAT_MOVEVARS_ENTGRAVITY)
-       #define PHYS_FRICTION                                           getstatf(STAT_MOVEVARS_FRICTION)
+       #define PHYS_FRICTION(s)                                        getstatf(STAT_MOVEVARS_FRICTION)
        #define PHYS_FRICTION_SLICK                                     getstatf(STAT_MOVEVARS_FRICTION_SLICK)
        #define PHYS_FRICTION_ONLAND                            getstatf(STAT_MOVEVARS_FRICTION_ONLAND)
        #define PHYS_GRAVITY                                            getstatf(STAT_MOVEVARS_GRAVITY)
        #define PHYS_HIGHSPEED                                          getstatf(STAT_MOVEVARS_HIGHSPEED)
-       #define PHYS_JUMPVELOCITY                                       getstatf(STAT_MOVEVARS_JUMPVELOCITY)
+       #define PHYS_JUMPVELOCITY(s)                            getstatf(STAT_MOVEVARS_JUMPVELOCITY)
        #define PHYS_MAXAIRSPEED(s)                                     getstatf(STAT_MOVEVARS_MAXAIRSPEED)
-       #define PHYS_MAXAIRSTRAFESPEED                          getstatf(STAT_MOVEVARS_MAXAIRSTRAFESPEED)
+       #define PHYS_MAXAIRSTRAFESPEED(s)                       getstatf(STAT_MOVEVARS_MAXAIRSTRAFESPEED)
        #define PHYS_MAXSPEED(s)                                        getstatf(STAT_MOVEVARS_MAXSPEED)
        #define PHYS_STEPHEIGHT                                         getstatf(STAT_MOVEVARS_STEPHEIGHT)
-       #define PHYS_STOPSPEED                                          getstatf(STAT_MOVEVARS_STOPSPEED)
-       #define PHYS_WARSOWBUNNY_ACCEL                          getstatf(STAT_MOVEVARS_WARSOWBUNNY_ACCEL)
-       #define PHYS_WARSOWBUNNY_BACKTOSIDERATIO        getstatf(STAT_MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO)
-       #define PHYS_WARSOWBUNNY_AIRFORWARDACCEL        getstatf(STAT_MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL)
-       #define PHYS_WARSOWBUNNY_TOPSPEED                       getstatf(STAT_MOVEVARS_WARSOWBUNNY_TOPSPEED)
-       #define PHYS_WARSOWBUNNY_TURNACCEL                      getstatf(STAT_MOVEVARS_WARSOWBUNNY_TURNACCEL)
+       #define PHYS_STOPSPEED(s)                                       getstatf(STAT_MOVEVARS_STOPSPEED)
+       #define PHYS_WARSOWBUNNY_ACCEL(s)                       getstatf(STAT_MOVEVARS_WARSOWBUNNY_ACCEL)
+       #define PHYS_WARSOWBUNNY_BACKTOSIDERATIO(s)     getstatf(STAT_MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO)
+       #define PHYS_WARSOWBUNNY_AIRFORWARDACCEL(s)     getstatf(STAT_MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL)
+       #define PHYS_WARSOWBUNNY_TOPSPEED(s)            getstatf(STAT_MOVEVARS_WARSOWBUNNY_TOPSPEED)
+       #define PHYS_WARSOWBUNNY_TURNACCEL(s)           getstatf(STAT_MOVEVARS_WARSOWBUNNY_TURNACCEL)
 
        #define PHYS_WALLFRICTION                                       getstati(STAT_MOVEVARS_WALLFRICTION)
 
@@ -272,35 +272,35 @@ bool IsFlying(entity a);
 
        #define PHYS_CL_TRACK_CANJUMP(s)                        s.cvar_cl_movement_track_canjump
        #define PHYS_TRACK_CANJUMP(s)                           s.stat_sv_track_canjump
-       #define PHYS_ACCELERATE                                         self.stat_sv_accelerate
+       #define PHYS_ACCELERATE(s)                                      s.stat_sv_accelerate
        #define PHYS_AIRACCEL_QW(s)                                     s.stat_sv_airaccel_qw
-       #define PHYS_AIRACCEL_QW_STRETCHFACTOR(s)       self.stat_sv_airaccel_qw_stretchfactor
-       #define PHYS_AIRACCEL_SIDEWAYS_FRICTION         self.stat_sv_airaccel_sideways_friction
-       #define PHYS_AIRACCELERATE                                      self.stat_sv_airaccelerate
-       #define PHYS_AIRCONTROL                                         self.stat_sv_aircontrol
-       #define PHYS_AIRCONTROL_PENALTY                         self.stat_sv_aircontrol_penalty
-       #define PHYS_AIRCONTROL_POWER                           self.stat_sv_aircontrol_power
+       #define PHYS_AIRACCEL_QW_STRETCHFACTOR(s)       s.stat_sv_airaccel_qw_stretchfactor
+       #define PHYS_AIRACCEL_SIDEWAYS_FRICTION(s)      s.stat_sv_airaccel_sideways_friction
+       #define PHYS_AIRACCELERATE(s)                           s.stat_sv_airaccelerate
+       #define PHYS_AIRCONTROL(s)                                      s.stat_sv_aircontrol
+       #define PHYS_AIRCONTROL_PENALTY(s)                      s.stat_sv_aircontrol_penalty
+       #define PHYS_AIRCONTROL_POWER(s)                        s.stat_sv_aircontrol_power
        #define PHYS_AIRSPEEDLIMIT_NONQW(s)                     s.stat_sv_airspeedlimit_nonqw
-       #define PHYS_AIRSTOPACCELERATE                          self.stat_sv_airstopaccelerate
+       #define PHYS_AIRSTOPACCELERATE(s)                       s.stat_sv_airstopaccelerate
        #define PHYS_AIRSTRAFEACCEL_QW(s)                       s.stat_sv_airstrafeaccel_qw
        #define PHYS_AIRSTRAFEACCELERATE(s)                     s.stat_sv_airstrafeaccelerate
        #define PHYS_ENTGRAVITY(s)                                      s.gravity
-       #define PHYS_FRICTION                                           self.stat_sv_friction
+       #define PHYS_FRICTION(s)                                        s.stat_sv_friction
        #define PHYS_FRICTION_SLICK                                     autocvar_sv_friction_slick
        #define PHYS_FRICTION_ONLAND                            autocvar_sv_friction_on_land
        #define PHYS_GRAVITY                                            autocvar_sv_gravity
        #define PHYS_HIGHSPEED                                          autocvar_g_movement_highspeed
-       #define PHYS_JUMPVELOCITY                                       self.stat_sv_jumpvelocity
-       #define PHYS_MAXAIRSPEED(s)                                     self.stat_sv_maxairspeed
-       #define PHYS_MAXAIRSTRAFESPEED                          self.stat_sv_maxairstrafespeed
+       #define PHYS_JUMPVELOCITY(s)                            s.stat_sv_jumpvelocity
+       #define PHYS_MAXAIRSPEED(s)                                     s.stat_sv_maxairspeed
+       #define PHYS_MAXAIRSTRAFESPEED(s)                       s.stat_sv_maxairstrafespeed
        #define PHYS_MAXSPEED(s)                                        s.stat_sv_maxspeed
        #define PHYS_STEPHEIGHT                                         autocvar_sv_stepheight
-       #define PHYS_STOPSPEED                                          self.stat_sv_stopspeed
-       #define PHYS_WARSOWBUNNY_ACCEL                          self.stat_sv_warsowbunny_accel
-       #define PHYS_WARSOWBUNNY_BACKTOSIDERATIO        self.stat_sv_warsowbunny_backtosideratio
-       #define PHYS_WARSOWBUNNY_AIRFORWARDACCEL        self.stat_sv_warsowbunny_airforwardaccel
-       #define PHYS_WARSOWBUNNY_TOPSPEED                       self.stat_sv_warsowbunny_topspeed
-       #define PHYS_WARSOWBUNNY_TURNACCEL                      self.stat_sv_warsowbunny_turnaccel
+       #define PHYS_STOPSPEED(s)                                       s.stat_sv_stopspeed
+       #define PHYS_WARSOWBUNNY_ACCEL(s)                       s.stat_sv_warsowbunny_accel
+       #define PHYS_WARSOWBUNNY_BACKTOSIDERATIO(s)s.stat_sv_warsowbunny_backtosideratio
+       #define PHYS_WARSOWBUNNY_AIRFORWARDACCEL(s)s.stat_sv_warsowbunny_airforwardaccel
+       #define PHYS_WARSOWBUNNY_TOPSPEED(s)            s.stat_sv_warsowbunny_topspeed
+       #define PHYS_WARSOWBUNNY_TURNACCEL(s)           s.stat_sv_warsowbunny_turnaccel
 
        #define PHYS_WALLFRICTION                                       cvar("sv_wallfriction")