]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/physics
authorMario <zacjardine@y7mail.com>
Thu, 5 Feb 2015 04:38:18 +0000 (15:38 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 5 Feb 2015 04:38:18 +0000 (15:38 +1100)
Conflicts:
qcsrc/server/autocvars.qh
qcsrc/server/cl_physics.qc
qcsrc/server/mutators/mutator_buffs.qc
qcsrc/server/mutators/mutator_buffs.qh

1  2 
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/cl_physics.qc
qcsrc/server/command/cmd.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutator_buffs.qc
qcsrc/server/mutators/mutator_buffs.qh

Simple merge
index d30ebdbe4a286bca98bb32d1ce3cf73631dab6d6,bcb9d28d70240e779e942a25b3c5764e7252298a..8ec8e71f72f0f84ad47c316d9ef7392466816eaf
@@@ -582,8 -585,20 +585,8 @@@ float autocvar_skill_auto
  float autocvar_snd_soundradius;
  float autocvar_spawn_debug;
  float autocvar_speedmeter;
- var float autocvar_sv_accuracy_data_share = 1;
 -float autocvar_sv_accelerate;
+ float autocvar_sv_accuracy_data_share = 1;
  string autocvar_sv_adminnick;
 -float autocvar_sv_airaccel_qw;
 -float autocvar_sv_airaccel_qw_stretchfactor;
 -float autocvar_sv_airaccel_sideways_friction;
 -float autocvar_sv_airaccelerate;
 -float autocvar_sv_aircontrol;
 -float autocvar_sv_aircontrol_penalty;
 -float autocvar_sv_aircontrol_power;
 -float autocvar_sv_airspeedlimit_nonqw;
 -float autocvar_sv_airstopaccelerate;
 -float autocvar_sv_airstrafeaccel_qw;
 -float autocvar_sv_airstrafeaccelerate;
  float autocvar_sv_autoscreenshot;
  float autocvar_sv_cheats;
  float autocvar_sv_clientcommand_antispam_time;
@@@ -861,3 -882,4 +864,5 @@@ float autocvar_g_buffs_vampire_damage_s
  float autocvar_g_buffs_invisible_alpha;
  float autocvar_g_buffs_flight_gravity;
  float autocvar_g_buffs_jump_height;
++
+ #endif
index 2e29f88b7acee6991c154e4b8f8d133661b6db5b,337342333c0b0230b6d2362d5c1a4119b79d350a..81c3cfd8b2719b9a66fd837950b210c6c9cd45fd
@@@ -45,13 -47,13 +71,13 @@@ returns true if handle
  float PlayerJump (void)
  {
        if(self.frozen)
-               return TRUE; // no jumping in freezetag when frozen
+               return true; // no jumping in freezetag when frozen
  
        if(self.player_blocked)
-               return TRUE; // no jumping while blocked
+               return true; // no jumping while blocked
  
-       float doublejump = FALSE;
 -      float doublejump = false;
 -      float mjumpheight = autocvar_sv_jumpvelocity;
++      bool doublejump = false;
 +      float mjumpheight = self.stat_sv_jumpvelocity;
  
        player_multijump = doublejump;
        player_jumpheight = mjumpheight;
@@@ -491,9 -493,9 +517,9 @@@ void CPM_PM_Aircontrol(vector wishdir, 
                return;
  #endif
  
 -      k *= bound(0, wishspeed / autocvar_sv_maxairspeed, 1);
 +      k *= bound(0, wishspeed / self.stat_sv_maxairspeed, 1);
  
-       zspeed = self.velocity_z;
+       zspeed = self.velocity.z;
        self.velocity_z = 0;
        xyspeed = vlen(self.velocity); self.velocity = normalize(self.velocity);
  
@@@ -1008,10 -988,10 +1033,10 @@@ void SV_PlayerPhysics(
                // noclipping or flying
                self.flags &= ~FL_ONGROUND;
  
 -              self.velocity = self.velocity * (1 - frametime * autocvar_sv_friction);
 +              self.velocity = self.velocity * (1 - frametime * self.stat_sv_friction);
                makevectors(self.v_angle);
                //wishvel = v_forward * self.movement_x + v_right * self.movement_y + v_up * self.movement_z;
-               wishvel = v_forward * self.movement_x + v_right * self.movement_y + '0 0 1' * self.movement_z;
+               wishvel = v_forward * self.movement.x + v_right * self.movement.y + '0 0 1' * self.movement.z;
                // acceleration
                wishdir = normalize(wishvel);
                wishspeed = vlen(wishvel);
                        self.velocity_z += g;
                }
  
 -              self.velocity = self.velocity * (1 - frametime * autocvar_sv_friction);
 +              self.velocity = self.velocity * (1 - frametime * self.stat_sv_friction);
                makevectors(self.v_angle);
                //wishvel = v_forward * self.movement_x + v_right * self.movement_y + v_up * self.movement_z;
-               wishvel = v_forward * self.movement_x + v_right * self.movement_y + '0 0 1' * self.movement_z;
+               wishvel = v_forward * self.movement.x + v_right * self.movement.y + '0 0 1' * self.movement.z;
                self.velocity_z += g;
                if (self.ladder_entity.classname == "func_water")
                {
        {
                //makevectors(self.v_angle_y * '0 1 0');
                makevectors(self.v_angle);
-               wishvel = v_forward * self.movement_x + v_right * self.movement_y;
+               wishvel = v_forward * self.movement.x + v_right * self.movement.y;
                // add remaining speed as Z component
 -              maxairspd = autocvar_sv_maxairspeed*max(1, maxspd_mod);
 +              maxairspd = self.stat_sv_maxairspeed*max(1, maxspd_mod);
                // fix speedhacks :P
                wishvel = normalize(wishvel) * min(vlen(wishvel) / maxairspd, 1);
                // add the unused velocity as up component
                }
                else
                {
 -                      maxairspd = autocvar_sv_maxairspeed;
 -                      airaccel = autocvar_sv_airaccelerate;
 +                      maxairspd = self.stat_sv_maxairspeed;
 +                      airaccel = self.stat_sv_airaccelerate;
                }
                // airborn
-               makevectors(self.v_angle_y * '0 1 0');
-               wishvel = v_forward * self.movement_x + v_right * self.movement_y;
+               makevectors(self.v_angle.y * '0 1 0');
+               wishvel = v_forward * self.movement.x + v_right * self.movement.y;
                // acceleration
                wishdir = normalize(wishvel);
                wishspeed = wishspeed0 = vlen(wishvel);
                        {
                                vector curdir;
                                curdir = self.velocity;
-                               curdir_z = 0;
+                               curdir.z = 0;
                                curdir = normalize(curdir);
 -                              airaccel = airaccel + (autocvar_sv_airstopaccelerate*maxspd_mod - airaccel) * max(0, -(curdir * wishdir));
 +                              airaccel = airaccel + (self.stat_sv_airstopaccelerate*maxspd_mod - airaccel) * max(0, -(curdir * wishdir));
                        }
                        // note that for straight forward jumping:
                        // step = accel * frametime * wishspeed0;
                                airaccelqw = copysign(1-GeomLerp(1-fabs(self.stat_sv_airaccel_qw), strafity, 1-fabs(self.stat_sv_airstrafeaccel_qw)), ((strafity > 0.5) ? self.stat_sv_airstrafeaccel_qw : self.stat_sv_airaccel_qw));
                        // !CPM
  
-                       if(self.stat_sv_warsowbunny_turnaccel && accelerating && self.movement_y == 0 && self.movement_x != 0)
 -                      if(autocvar_sv_warsowbunny_turnaccel && accelerating && self.movement_y == 0 && self.movement.x != 0)
++                      if(self.stat_sv_warsowbunny_turnaccel && accelerating && self.movement_y == 0 && self.movement.x != 0)
                                PM_AirAccelerate(wishdir, wishspeed);
                        else
 -                              PM_Accelerate(wishdir, wishspeed, wishspeed0, airaccel, airaccelqw, autocvar_sv_airaccel_qw_stretchfactor, autocvar_sv_airaccel_sideways_friction / maxairspd, self.stat_sv_airspeedlimit_nonqw);
 +                              PM_Accelerate(wishdir, wishspeed, wishspeed0, airaccel, airaccelqw, self.stat_sv_airaccel_qw_stretchfactor, self.stat_sv_airaccel_sideways_friction / maxairspd, self.stat_sv_airspeedlimit_nonqw);
  
 -                      if(autocvar_sv_aircontrol)
 +                      if(self.stat_sv_aircontrol)
                                CPM_PM_Aircontrol(wishdir, wishspeed2);
                }
        }
Simple merge
index e175e94180e562f12bea62a50b5d334fd7138ba7,175179b50797d5a5ede5cffd8352f19eb602cfc3..38d02b3b516751ae6d811c11a338bd3f33d7de79
@@@ -447,32 -452,9 +452,32 @@@ float round_starttime; //point in time 
  .float stat_sv_airspeedlimit_nonqw;
  .float stat_sv_maxspeed;
  
 +// new properties
 +.float stat_sv_jumpvelocity;
 +.float stat_sv_airaccel_qw_stretchfactor;
 +.float stat_sv_maxairstrafespeed;
 +.float stat_sv_maxairspeed;
 +.float stat_sv_airstrafeaccelerate;
 +.float stat_sv_warsowbunny_turnaccel;
 +.float stat_sv_airaccel_sideways_friction;
 +.float stat_sv_aircontrol;
 +.float stat_sv_aircontrol_power;
 +.float stat_sv_aircontrol_penalty;
 +.float stat_sv_warsowbunny_airforwardaccel;
 +.float stat_sv_warsowbunny_topspeed;
 +.float stat_sv_warsowbunny_accel;
 +.float stat_sv_warsowbunny_backtosideratio;
 +.float stat_sv_friction;
 +.float stat_sv_accelerate;
 +.float stat_sv_stopspeed;
 +.float stat_sv_airaccelerate;
 +.float stat_sv_airstopaccelerate;
 +
 +.string cvar_cl_physics;
 +
  void W_Porto_Remove (entity p);
  
- .float projectiledeathtype;
+ .int projectiledeathtype;
  
  .string message2;
  
Simple merge
Simple merge
index 4da3e1a14c6575cae35e50b02918f6304a062755,b2f800a27e06c1228d541cbabc47ef221c04ae9d..333d5192e21a195e4918ba4eedda725d48b4f54f
@@@ -457,8 -457,9 +457,8 @@@ MUTATOR_HOOKFUNCTION(buffs_PlayerJump
  {
        if(self.buffs & BUFF_JUMP)
                player_jumpheight = autocvar_g_buffs_jump_height;
 -      self.stat_jumpheight = player_jumpheight;
  
-       return FALSE;
+       return false;
  }
  
  MUTATOR_HOOKFUNCTION(buffs_MonsterMove)
@@@ -748,7 -749,8 +748,7 @@@ void buffs_Initialize(
        precache_sound("keepaway/respawn.wav");
  
        addstat(STAT_BUFFS, AS_INT, buffs);
-       
 -      addstat(STAT_MOVEVARS_JUMPVELOCITY, AS_FLOAT, stat_jumpheight);
        InitializeEntity(world, buffs_DelayedInit, INITPRIO_FINDTARGET);
  }