From: Mario Date: Sat, 23 Jul 2016 12:31:25 +0000 (+1000) Subject: Fix up some missed movetype setters X-Git-Tag: xonotic-v0.8.2~700^2~39^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ad034bcf9100a7a0672cc2b8ad202f2bd72f28b6;p=xonotic%2Fxonotic-data.pk3dir.git Fix up some missed movetype setters --- diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 4013e9d4f..ae7dc5157 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -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'; diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 0ce4777b3..ba3095347 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -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); diff --git a/qcsrc/common/turrets/cl_turrets.qc b/qcsrc/common/turrets/cl_turrets.qc index 7dfab581b..e2deb3980 100644 --- a/qcsrc/common/turrets/cl_turrets.qc +++ b/qcsrc/common/turrets/cl_turrets.qc @@ -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; diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index d26405da4..b5dde01e9 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -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; diff --git a/qcsrc/common/turrets/turret/ewheel.qc b/qcsrc/common/turrets/turret/ewheel.qc index be6e3fd01..7bc1b5618 100644 --- a/qcsrc/common/turrets/turret/ewheel.qc +++ b/qcsrc/common/turrets/turret/ewheel.qc @@ -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; } diff --git a/qcsrc/common/turrets/turret/hk_weapon.qc b/qcsrc/common/turrets/turret/hk_weapon.qc index afc3ed17c..c2e9d6a14 100644 --- a/qcsrc/common/turrets/turret/hk_weapon.qc +++ b/qcsrc/common/turrets/turret/hk_weapon.qc @@ -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; } diff --git a/qcsrc/common/turrets/turret/walker.qc b/qcsrc/common/turrets/turret/walker.qc index 18af3d37d..3f55280e8 100644 --- a/qcsrc/common/turrets/turret/walker.qc +++ b/qcsrc/common/turrets/turret/walker.qc @@ -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); diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index e5736abd4..0f6d1b53c 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -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; diff --git a/qcsrc/common/vehicles/vehicle/bumblebee.qc b/qcsrc/common/vehicles/vehicle/bumblebee.qc index 1842ebe7b..33fb571c3 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee.qc +++ b/qcsrc/common/vehicles/vehicle/bumblebee.qc @@ -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'; diff --git a/qcsrc/common/vehicles/vehicle/racer.qc b/qcsrc/common/vehicles/vehicle/racer.qc index e216a740c..277326ffd 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qc +++ b/qcsrc/common/vehicles/vehicle/racer.qc @@ -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; diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index 8e2866946..d938c4ad3 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -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; diff --git a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc index 94fb9eaa5..14405460e 100644 --- a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc @@ -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); diff --git a/qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc b/qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc index c81a88b74..fbe82436c 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc @@ -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; diff --git a/qcsrc/common/weapons/weapon/seeker.qc b/qcsrc/common/weapons/weapon/seeker.qc index 7ef0367db..bcfbc4c5c 100644 --- a/qcsrc/common/weapons/weapon/seeker.qc +++ b/qcsrc/common/weapons/weapon/seeker.qc @@ -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); diff --git a/qcsrc/server/steerlib.qc b/qcsrc/server/steerlib.qc index 2b5302af2..ef95e7b64 100644 --- a/qcsrc/server/steerlib.qc +++ b/qcsrc/server/steerlib.qc @@ -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;