]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Mario/qc_physics_cleanup_v2'
authorMario <mario@smbclan.net>
Sun, 24 Jul 2016 06:38:45 +0000 (16:38 +1000)
committerMario <mario@smbclan.net>
Sun, 24 Jul 2016 06:38:45 +0000 (16:38 +1000)
1  2 
qcsrc/common/debug.qh
qcsrc/common/weapons/weapon/arc.qc

diff --combined qcsrc/common/debug.qh
index 13fd6a24f5f5e10622795211e7baf56cf835a000,2833acc2377c26241aac7d69bab4fd814984f76f..83cbc302dcd4f745e79ba58c550658fca92313d4
@@@ -100,7 -100,7 +100,7 @@@ bool autocvar_debugdraw
  //                                            if (it.entnum) break;
  //                                            if (it.drawmask) break;
  //                                            if (it.predraw) break;
- //                                            if (it.movetype) break;
+ //                                            if (it.move_movetype) break;
                                                if (it.solid) break;
  //                                            if (it.origin) break;
  //                                            if (it.oldorigin) break;
@@@ -223,40 -223,6 +223,40 @@@ GENERIC_COMMAND(version, "Print the cur
        }
  }
  
 +#ifdef CSQC
 +void(float bufhandle, string pattern, string antipattern) buf_cvarlist = #517;
 +#endif
 +GENERIC_COMMAND(cvar_localchanges, "Print locally changed cvars")
 +{
 +      switch (request)
 +      {
 +              case CMD_REQUEST_COMMAND:
 +              {
 +                      string s = "";
 +                      int h = buf_create();
 +                      buf_cvarlist(h, "", "_"); // exclude all _ cvars as they are temporary
 +                      int n = buf_getsize(h);
 +                      for (int i = 0; i < n; ++i) {
 +                              string k = bufstr_get(h, i);
 +                              string v = cvar_string(k);
 +                              string d = cvar_defstring(k);
 +                              if (v == d)
 +                                      continue;
 +                              s = strcat(s, k, " \"", v, "\" // \"", d, "\"\n");
 +                      }
 +                      buf_del(h);
 +                      LOG_INFO(s);
 +                      return;
 +              }
 +              default:
 +              case CMD_REQUEST_USAGE:
 +              {
 +                      LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " cvar_localchanges"));
 +                      return;
 +              }
 +      }
 +}
 +
  REGISTER_STAT(TRACE_ENT, int)
  #ifdef SVQC
  bool autocvar_debugtrace;
index 5093f6b5e2198c46e44a8072baa7487f231c0960,b07a3d98c84876fd68e79a849a9ce9c4500ed941..1eaf4062d462d6860df66d0001b719e4ec0eeb27
@@@ -295,7 -295,7 +295,7 @@@ void W_Arc_Attack_Bolt(Weapon thiswep, 
        setorigin(missile, w_shotorg);
        setsize(missile, '0 0 0', '0 0 0');
  
-       missile.movetype = MOVETYPE_FLY;
+       set_movetype(missile, MOVETYPE_FLY);
        W_SetupProjVelocity_PRE(missile, arc, bolt_);
  
        missile.angles = vectoangles(missile.velocity);
@@@ -333,10 -333,12 +333,10 @@@ void W_Arc_Beam_Think(entity this
                ||
                IS_DEAD(this.owner)
                ||
 -              gameover
 +              forbidWeaponUse(this.owner)
                ||
                (!PHYS_INPUT_BUTTON_ATCK(this.owner) && !burst )
                ||
 -              STAT(FROZEN, this.owner)
 -              ||
                this.owner.vehicle
                ||
                (WEP_CVAR(arc, overheat_max) > 0 && this.beam_heat >= WEP_CVAR(arc, overheat_max))
@@@ -683,7 -685,7 +683,7 @@@ void W_Arc_Beam(float burst, entity act
        beam.solid = SOLID_NOT;
        setthink(beam, W_Arc_Beam_Think);
        beam.owner = actor;
-       beam.movetype = MOVETYPE_NONE;
+       set_movetype(beam, MOVETYPE_NONE);
        beam.bot_dodge = true;
        beam.bot_dodgerating = WEP_CVAR(arc, beam_damage);
        beam.beam_bursting = burst;