]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix up some missed movetype setters
authorMario <mario@smbclan.net>
Sat, 23 Jul 2016 12:31:25 +0000 (22:31 +1000)
committerMario <mario@smbclan.net>
Sat, 23 Jul 2016 12:31:25 +0000 (22:31 +1000)
15 files changed:
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/physics/player.qc
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/turret/ewheel.qc
qcsrc/common/turrets/turret/hk_weapon.qc
qcsrc/common/turrets/turret/walker.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/server/steerlib.qc

index 4013e9d4f54495c10a03afa3c126bc8754943be2..ae7dc51570700f2124e6ba7f6b3cbd8daf3fba2e 100644 (file)
@@ -1010,7 +1010,7 @@ void Monster_Dead(entity this, entity attacker, float gibbed)
        this.takedamage         = DAMAGE_AIM;
        this.deadflag           = DEAD_DEAD;
        this.enemy                      = NULL;
-       this.move_movetype              = MOVETYPE_TOSS;
+       set_movetype(this, MOVETYPE_TOSS);
        this.moveto                     = this.origin;
        settouch(this, Monster_Touch); // reset incase monster was pouncing
        this.reset                      = func_null;
@@ -1320,7 +1320,7 @@ bool Monster_Spawn(entity this, int mon_id)
        settouch(this, Monster_Touch);
        this.use                                = Monster_Use;
        this.solid                              = SOLID_BBOX;
-       this.move_movetype                      = MOVETYPE_WALK;
+       set_movetype(this, MOVETYPE_WALK);
        this.spawnshieldtime    = time + autocvar_g_monsters_spawnshieldtime;
        this.enemy                              = NULL;
        this.velocity                   = '0 0 0';
index 0ce4777b3f9291cb098aeb9c8ac4e812fad1873a..ba3095347fe76f417d6b3ec991bb6c999bad4b94 100644 (file)
@@ -1398,7 +1398,7 @@ void PM_Main(entity this)
                return;
 
        // when we get here, disableclientprediction cannot be 2
-       this.disableclientprediction = -1;
+       this.disableclientprediction = (this.move_qcphysics) ? -1 : 0;
 #endif
 
        viewloc_PlayerPhysics(this);
index 7dfab581bcc299114d3016d6f3402bc09b4f90ae..e2deb39803ab05b66b8f3f24d65134338f3ca585 100644 (file)
@@ -224,14 +224,14 @@ void turret_construct(entity this)
 
        this.tur_head.classname                 = "turret_head";
        this.tur_head.owner                             = this;
-       this.tur_head.move_movetype             = MOVETYPE_NOCLIP;
-       this.move_movetype                              = MOVETYPE_NOCLIP;
+       set_movetype(this.tur_head, MOVETYPE_NOCLIP);
+       set_movetype(this, MOVETYPE_NOCLIP);
        this.tur_head.angles                    = this.angles;
        this.health                                             = 255;
        this.solid                                              = SOLID_BBOX;
        this.tur_head.solid                             = SOLID_NOT;
-       this.move_movetype                                      = MOVETYPE_NOCLIP;
-       this.tur_head.move_movetype                     = MOVETYPE_NOCLIP;
+       set_movetype(this, MOVETYPE_NOCLIP);
+       set_movetype(this.tur_head, MOVETYPE_NOCLIP);
        this.draw                                               = turret_draw;
        this.entremove                                  = turret_remove;
        this.drawmask                                   = MASK_NORMAL;
@@ -303,7 +303,7 @@ entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, flo
                gib.nextthink = time + autocvar_cl_gibs_lifetime * (1 + prandom() * 0.15);
 
        gib.gravity              = 1;
-       gib.move_movetype   = MOVETYPE_BOUNCE;
+       set_movetype(gib, MOVETYPE_BOUNCE);
        setorigin(gib,          _from);
        gib.velocity   = _to;
        gib.avelocity  = prandomvec() * 32;
index d26405da49f7e213f939e7b9b901848d1b72edaf..b5dde01e9f5411af41419cab76dd12a10a6da41f 100644 (file)
@@ -474,7 +474,7 @@ entity turret_projectile(entity actor, Sound _snd, float _size, float _health, f
        setthink(proj, turret_projectile_explode);
        settouch(proj, turret_projectile_touch);
        proj.nextthink    = time + 9;
-       proj.move_movetype              = MOVETYPE_FLYMISSILE;
+       set_movetype(proj, MOVETYPE_FLYMISSILE);
        proj.velocity           = normalize(actor.tur_shotdir_updated + randomvec() * actor.shot_spread) * actor.shot_speed;
        proj.flags                = FL_PROJECTILE;
        proj.enemy                = actor.enemy;
@@ -1329,7 +1329,7 @@ bool turret_initialize(entity this, Turret tur)
        this.ammo_recharge                 *= this.ticrate;
        this.solid                                      = SOLID_BBOX;
        this.takedamage                         = DAMAGE_AIM;
-       this.move_movetype                              = MOVETYPE_NOCLIP;
+       set_movetype(this, MOVETYPE_NOCLIP);
        this.view_ofs                           = '0 0 0';
        this.turret_firecheckfunc       = turret_firecheck;
        this.event_damage                       = turret_damage;
index be6e3fd01adaf5514dfdc60bdb3d0faf8580c9f3..7bc1b56188832e534fc64f846e91f0dd319c805f 100644 (file)
@@ -257,8 +257,7 @@ void ewheel_draw(entity this)
         METHOD(EWheel, tr_setup, void(EWheel this, entity it))
         {
             it.gravity         = 1;
-            it.move_movetype           = MOVETYPE_BOUNCE;
-            it.move_movetype   = MOVETYPE_BOUNCE;
+            it.move_movetype = MOVETYPE_BOUNCE;
             it.move_time               = time;
             it.draw                    = ewheel_draw;
         }
index afc3ed17cba8d489d3edfeca9b7acfe8d1ff2a18..c2e9d6a14691dc5d5d3be5e31bd9e8bd75e87c1c 100644 (file)
@@ -207,7 +207,7 @@ void turret_hk_missile_think(entity this)
     {
         this.cnt = time + 0.25;
         this.nextthink = 0;
-        this.move_movetype              = MOVETYPE_BOUNCE;
+        set_movetype(this, MOVETYPE_BOUNCE);
         return;
     }
 
index 18af3d37d4c91c88333e783314899fa7ea208c65..3f55280e8fa372cf790d726b29eb41bde633e703 100644 (file)
@@ -255,7 +255,7 @@ void walker_fire_rocket(entity this, vector org)
     rocket.event_damage           = walker_rocket_damage;
 
     rocket.nextthink             = time;
-    rocket.move_movetype                  = MOVETYPE_FLY;
+    set_movetype(rocket, MOVETYPE_FLY);
     rocket.velocity               = normalize((v_forward + v_up * 0.5) + (randomvec() * 0.2)) * (autocvar_g_turrets_unit_walker_rocket_speed);
     rocket.angles                       = vectoangles(rocket.velocity);
     settouch(rocket, walker_rocket_touch);
index e5736abd4a3bdbfd51332a2978b2ce1bd7df5aa4..0f6d1b53cdf1d6d1165fffeba24862a4066eea39 100644 (file)
@@ -227,7 +227,7 @@ entity vehicles_projectile(entity this, string _mzlfx, Sound _mzlsound,
        proj.shot_force    = _force;
        proj.totalfrags    = _deahtype;
        proj.solid                      = SOLID_BBOX;
-       proj.move_movetype               = MOVETYPE_FLYMISSILE;
+       set_movetype(proj, MOVETYPE_FLYMISSILE);
        proj.flags                      = FL_PROJECTILE;
        proj.bot_dodge          = true;
        proj.bot_dodgerating  = _dmg;
@@ -777,7 +777,7 @@ void vehicles_exit(entity vehic, bool eject)
 
                player.takedamage               = DAMAGE_AIM;
                player.solid                    = SOLID_SLIDEBOX;
-               player.move_movetype            = MOVETYPE_WALK;
+               set_movetype(player, MOVETYPE_WALK);
                player.effects             &= ~EF_NODRAW;
                player.teleportable     = TELEPORT_NORMAL;
                player.alpha                    = 1;
@@ -947,7 +947,8 @@ void vehicles_enter(entity pl, entity veh)
        pl.angles                       = veh.angles;
        pl.takedamage           = DAMAGE_NO;
        pl.solid                        = SOLID_NOT;
-       pl.move_movetype                        = MOVETYPE_NOCLIP;
+       pl.disableclientprediction = 0; // physics is no longer run, so this won't be reset
+       set_movetype(pl, MOVETYPE_NOCLIP);
        pl.teleportable         = false;
        pl.alpha                        = -1;
        pl.event_damage         = func_null;
@@ -1051,7 +1052,7 @@ void vehicles_spawn(entity this)
        this.iscreature                 = true;
        this.teleportable               = false; // no teleporting for vehicles, too buggy
        this.damagedbycontents  = true;
-       this.move_movetype                      = MOVETYPE_WALK;
+       set_movetype(this, MOVETYPE_WALK);
        this.solid                              = SOLID_SLIDEBOX;
        this.takedamage                 = DAMAGE_AIM;
        this.deadflag                   = DEAD_NO;
index 1842ebe7b405e7e45d86dea9207226bde805f051..33fb571c358304cf25e88a759cbca9168b159d44 100644 (file)
@@ -256,7 +256,7 @@ void bumblebee_gunner_exit(entity this, int _exitflag)
 
        player.takedamage     = DAMAGE_AIM;
        player.solid          = SOLID_SLIDEBOX;
-       player.move_movetype       = MOVETYPE_WALK;
+       set_movetype(player, MOVETYPE_WALK);
        player.effects       &= ~EF_NODRAW;
        player.alpha          = 1;
        player.PlayerPhysplug = func_null;
@@ -319,7 +319,7 @@ bool bumblebee_gunner_enter(entity this, entity player)
        player.takedamage               = DAMAGE_NO;
        player.solid                    = SOLID_NOT;
        player.alpha                    = -1;
-       player.move_movetype            = MOVETYPE_NOCLIP;
+       set_movetype(player, MOVETYPE_NOCLIP);
        player.event_damage     = func_null;
        player.view_ofs                 = '0 0 0';
        player.hud                              = gunner.hud;
@@ -824,7 +824,7 @@ METHOD(Bumblebee, vr_death, void(Bumblebee thisveh, entity instance))
     instance.solid                     = SOLID_NOT;
     instance.takedamage                = DAMAGE_NO;
     instance.deadflag          = DEAD_DYING;
-    instance.move_movetype             = MOVETYPE_NONE;
+    set_movetype(instance, MOVETYPE_NONE);
     instance.effects           = EF_NODRAW;
     instance.colormod          = '0 0 0';
     instance.avelocity         = '0 0 0';
index e216a740c5dbb26b090824437ebfa31fae59b6c3..277326ffd2a18e055ab6c2b3ff8258356c23639a 100644 (file)
@@ -439,7 +439,7 @@ void racer_exit(entity this, int eject)
 
        setthink(this, racer_think);
        this.nextthink  = time;
-       this.move_movetype   = MOVETYPE_BOUNCE;
+       set_movetype(this, MOVETYPE_BOUNCE);
        sound (this.tur_head, CH_TRIGGER_SINGLE, SND_Null, VOL_VEHICLEENGINE, ATTEN_NORM);
 
        if(!this.owner)
@@ -490,7 +490,7 @@ void racer_blowup(entity this)
 
        this.nextthink  = time + autocvar_g_vehicle_racer_respawntime;
        setthink(this, vehicles_spawn);
-       this.move_movetype   = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        this.effects    = EF_NODRAW;
        this.solid = SOLID_NOT;
 
@@ -572,7 +572,7 @@ METHOD(Racer, vr_spawn, void(Racer thisveh, entity instance))
     instance.vehicle_health = autocvar_g_vehicle_racer_health;
     instance.vehicle_shield = autocvar_g_vehicle_racer_shield;
 
-    instance.move_movetype       = MOVETYPE_TOSS;
+    set_movetype(instance, MOVETYPE_TOSS);
     instance.solid               = SOLID_SLIDEBOX;
     instance.delay               = time;
     instance.scale               = 0.5;
@@ -596,7 +596,7 @@ METHOD(Racer, vr_death, void(Racer thisveh, entity instance))
     instance.solid                     = SOLID_CORPSE;
     instance.takedamage                = DAMAGE_NO;
     instance.deadflag          = DEAD_DYING;
-    instance.move_movetype             = MOVETYPE_BOUNCE;
+    set_movetype(instance, MOVETYPE_BOUNCE);
     instance.wait                      = time;
     instance.delay                     = 2 + time + random() * 3;
     instance.cnt                       = 1 + random() * 2;
index 8e286694687a1cf9325e19d31f8f346fb6d054fe..d938c4ad396cd6f760d78ad22a0a9857a4706b87 100644 (file)
@@ -517,7 +517,7 @@ void raptor_blowup(entity this, entity toucher)
        RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_RAPT_DEATH.m_id, NULL);
 
        this.alpha                = -1;
-       this.move_movetype         = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        this.effects            = EF_NODRAW;
        this.colormod      = '0 0 0';
        this.avelocity    = '0 0 0';
@@ -613,7 +613,7 @@ METHOD(Raptor, vr_enter, void(Raptor thisveh, entity instance))
 {
     instance.vehicle_weapon2mode = RSM_BOMB;
     instance.owner.PlayerPhysplug = raptor_takeoff;
-    instance.move_movetype        = MOVETYPE_BOUNCEMISSILE;
+    set_movetype(instance, MOVETYPE_BOUNCEMISSILE);
     instance.solid               = SOLID_SLIDEBOX;
     instance.owner.vehicle_health = (instance.vehicle_health / autocvar_g_vehicle_raptor_health) * 100;
     instance.owner.vehicle_shield = (instance.vehicle_shield / autocvar_g_vehicle_raptor_shield) * 100;
@@ -635,7 +635,7 @@ METHOD(Raptor, vr_death, void(Raptor thisveh, entity instance))
     instance.solid                             = SOLID_CORPSE;
     instance.takedamage                        = DAMAGE_NO;
     instance.deadflag                  = DEAD_DYING;
-    instance.move_movetype                     = MOVETYPE_BOUNCE;
+    set_movetype(instance, MOVETYPE_BOUNCE);
     setthink(instance, raptor_diethink);
     instance.nextthink                 = time;
     instance.wait                              = time + 5 + (random() * 5);
@@ -724,7 +724,7 @@ METHOD(Raptor, vr_spawn, void(Raptor thisveh, entity instance))
     instance.frame               = 0;
     instance.vehicle_health = autocvar_g_vehicle_raptor_health;
     instance.vehicle_shield = autocvar_g_vehicle_raptor_shield;
-    instance.move_movetype        = MOVETYPE_TOSS;
+    set_movetype(instance, MOVETYPE_TOSS);
     instance.solid               = SOLID_SLIDEBOX;
     instance.vehicle_energy = 1;
 
index 94fb9eaa580420924d70ffe7df678d4d24e2dddc..14405460ed4b9db955973cfb900744c479522019 100644 (file)
@@ -128,7 +128,7 @@ void raptor_bomb_burst(entity this)
         bomblet = spawn();
         setorigin(bomblet, this.origin);
 
-        bomblet.move_movetype  = MOVETYPE_TOSS;
+        set_movetype(bomblet, MOVETYPE_TOSS);
         settouch(bomblet, raptor_bomblet_touch);
         setthink(bomblet, raptor_bomblet_boom);
         bomblet.nextthink   = time + 5;
@@ -160,7 +160,8 @@ void raptor_bombdrop(entity this)
     org = gettaginfo(this, gettagindex(this, "bombmount_right"));
     setorigin(bomb_2, org);
 
-    bomb_1.move_movetype        = bomb_2.move_movetype   = MOVETYPE_BOUNCE;
+    set_movetype(bomb_1, MOVETYPE_BOUNCE);
+    set_movetype(bomb_2, MOVETYPE_BOUNCE);
     bomb_1.velocity     = bomb_2.velocity   = this.velocity;
     settouch(bomb_1, raptor_bomb_touch);
     settouch(bomb_2, raptor_bomb_touch);
index c81a88b742e3f025e8a8784f3ecd400b1edf4580..fbe82436c7ceb6f97a8eec7caf80878dc5fe63db 100644 (file)
@@ -232,7 +232,7 @@ void spiderbot_rocket_do(entity this)
             float h2 = 0.75 * vlen(rocket.pos1 - v);
 
             rocket.velocity  = spiberbot_calcartillery(v, rocket.pos1, ((h1 < h2) ? h1 : h2));
-            rocket.move_movetype  = MOVETYPE_TOSS;
+            set_movetype(rocket, MOVETYPE_TOSS);
             rocket.gravity   = 1;
             //setthink(rocket, spiderbot_rocket_artillery);
         break;
index 7ef0367db418449eabc27a31bccb1999f929842c..bcfbc4c5cf28fed2c9a6134133efd117771a3197 100644 (file)
@@ -293,7 +293,7 @@ void W_Seeker_Fire_Missile(Weapon thiswep, entity actor, vector f_diff, entity m
 
        setorigin(missile, w_shotorg);
        setsize(missile, '-4 -4 -4', '4 4 4');
-       missile.move_movetype    = MOVETYPE_FLYMISSILE;
+       set_movetype(missile, MOVETYPE_FLYMISSILE);
        missile.flags       = FL_PROJECTILE;
        missile.missile_flags = MIF_SPLASH | MIF_GUIDED_TAG;
 
@@ -578,7 +578,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep, entity actor)
        settouch(missile, W_Seeker_Tag_Touch);
        setthink(missile, SUB_Remove);
        missile.nextthink       = time + WEP_CVAR(seeker, tag_lifetime);
-       missile.move_movetype        = MOVETYPE_FLY;
+       set_movetype(missile, MOVETYPE_FLY);
        missile.solid           = SOLID_BBOX;
 
        missile.takedamage       = DAMAGE_YES;
@@ -592,7 +592,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep, entity actor)
        missile.flags       = FL_PROJECTILE;
        //missile.missile_flags = MIF_..?;
 
-       missile.move_movetype    = MOVETYPE_FLY;
+       set_movetype(missile, MOVETYPE_FLY);
        W_SetupProjVelocity_PRE(missile, seeker, tag_);
        missile.angles = vectoangles(missile.velocity);
 
index 2b5302af22995f269f7b637289dcd9b0e6738e7c..ef95e7b64d64e6687788e9c88d86e8f795ea06f8 100644 (file)
@@ -556,7 +556,7 @@ void spawn_flocker(entity this)
     setthink(flocker, flocker_think);
     flocker.nextthink  = time + random() * 5;
     PROJECTILE_MAKETRIGGER(flocker);
-    flocker.move_movetype   = MOVETYPE_BOUNCEMISSILE;
+    set_movetype(flocker, MOVETYPE_BOUNCEMISSILE);
     flocker.effects    = EF_LOWPRECISION;
     flocker.velocity   = randomvec() * 300;
     flocker.angles     = vectoangles(flocker.velocity);
@@ -649,7 +649,7 @@ spawnfunc(flockerspawn)
 
     this.enemy.scale     = 3;
     this.enemy.effects   = EF_LOWPRECISION;
-    this.enemy.move_movetype  = MOVETYPE_BOUNCEMISSILE;
+    set_movetype(this.enemy, MOVETYPE_BOUNCEMISSILE);
     PROJECTILE_MAKETRIGGER(this.enemy);
     setthink(this.enemy, flocker_hunter_think);
     this.enemy.nextthink = time + 10;