X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fvehicles%2Fvehicle%2Fraptor.qc;h=04c985c31f4dbb62910d724a58003b157e919a2d;hb=5e813f65d212e2cfc5c32eae682c0a1b0c0f73da;hp=eedadfcebb51a7b7f70849d733be80d38f75f216;hpb=47bb613bdb4eb2ca68c51542d32660569e2e88ec;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index eedadfceb..04c985c31 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -96,7 +96,7 @@ void raptor_land(entity this) if(hgt < 16) { - this.movetype = MOVETYPE_TOSS; + set_movetype(this, MOVETYPE_TOSS); setthink(this, vehicles_think); this.frame = 0; } @@ -287,7 +287,7 @@ bool raptor_frame(entity this) vehic.gun1.enemy = NULL; if(trace_ent) - if(trace_ent.movetype) + if(trace_ent.move_movetype) if(trace_ent.takedamage) if(!IS_DEAD(trace_ent) && !STAT(FROZEN, trace_ent)) { @@ -313,7 +313,7 @@ bool raptor_frame(entity this) vf = real_origin(vehic.gun1.enemy); UpdateAuxiliaryXhair(this, vf, '1 0 0', 1); vector _vel = vehic.gun1.enemy.velocity; - if(vehic.gun1.enemy.movetype == MOVETYPE_WALK) + if(vehic.gun1.enemy.move_movetype == MOVETYPE_WALK) _vel_z *= 0.1; if(autocvar_g_vehicle_raptor_cannon_predicttarget) @@ -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.movetype = MOVETYPE_NONE; + set_movetype(this, MOVETYPE_NONE); this.effects = EF_NODRAW; this.colormod = '0 0 0'; this.avelocity = '0 0 0'; @@ -600,8 +600,8 @@ bool raptor_impulse(entity this, int _imp) spawnfunc(vehicle_raptor) { - if(!autocvar_g_vehicle_raptor) { remove(this); return; } - if(!vehicle_initialize(this, VEH_RAPTOR, false)) { remove(this); return; } + if(!autocvar_g_vehicle_raptor) { delete(this); return; } + if(!vehicle_initialize(this, VEH_RAPTOR, false)) { delete(this); return; } } METHOD(Raptor, vr_impact, void(Raptor thisveh, entity instance)) @@ -613,7 +613,7 @@ METHOD(Raptor, vr_enter, void(Raptor thisveh, entity instance)) { instance.vehicle_weapon2mode = RSM_BOMB; instance.owner.PlayerPhysplug = raptor_takeoff; - instance.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.movetype = MOVETYPE_BOUNCE; + set_movetype(instance, MOVETYPE_BOUNCE); setthink(instance, raptor_diethink); instance.nextthink = time; instance.wait = time + 5 + (random() * 5); @@ -702,7 +702,7 @@ METHOD(Raptor, vr_spawn, void(Raptor thisveh, entity instance)) spinner.owner = instance; setmodel(spinner, MDL_VEH_RAPTOR_PROP); setattachment(spinner, instance, "engine_left"); - spinner.movetype = MOVETYPE_NOCLIP; + set_movetype(spinner, MOVETYPE_NOCLIP); spinner.avelocity = '0 90 0'; instance.bomb1.gun1 = spinner; @@ -710,7 +710,7 @@ METHOD(Raptor, vr_spawn, void(Raptor thisveh, entity instance)) spinner.owner = instance; setmodel(spinner, MDL_VEH_RAPTOR_PROP); setattachment(spinner, instance, "engine_right"); - spinner.movetype = MOVETYPE_NOCLIP; + set_movetype(spinner, MOVETYPE_NOCLIP); spinner.avelocity = '0 -90 0'; instance.bomb1.gun2 = spinner; @@ -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.movetype = MOVETYPE_TOSS; + set_movetype(instance, MOVETYPE_TOSS); instance.solid = SOLID_SLIDEBOX; instance.vehicle_energy = 1; @@ -763,6 +763,9 @@ METHOD(Raptor, vr_setup, void(Raptor thisveh, entity instance)) instance.vehicle_health = autocvar_g_vehicle_raptor_health; instance.vehicle_shield = autocvar_g_vehicle_raptor_shield; instance.max_health = instance.vehicle_health; + + if(!autocvar_g_vehicle_raptor_swim) + instance.dphitcontentsmask |= DPCONTENTS_LIQUIDSMASK; } #endif @@ -786,7 +789,7 @@ METHOD(Raptor, vr_crosshair, void(Raptor thisveh, entity player)) } vector tmpSize = '0 0 0'; - if(weapon2mode != RSM_FLARE) + if(weapon2mode != RSM_FLARE && !spectatee_status) { vector where;