X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fvehicles%2Fvehicle%2Fraptor.qc;h=b05dd9812e4443e6332e5d81d9364b9f3b6246f9;hb=b834eab77489d98d5d722d67c8a96cf6c3549436;hp=2b349e11db949724ba2024f9ef302136a64128cf;hpb=50d8efb863874f811bdcc118d7e873836902e453;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index 2b349e11d..b05dd9812 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -83,6 +83,8 @@ void raptor_land(entity this) void raptor_exit(entity this, int eject) { + entity player = this.owner; + this.tur_head.exteriormodeltoclient = NULL; if(!IS_DEAD(this)) @@ -91,7 +93,7 @@ void raptor_exit(entity this, int eject) this.nextthink = time; } - if(!this.owner) + if(!player) return; makevectors(this.angles); @@ -99,33 +101,33 @@ void raptor_exit(entity this, int eject) if(eject) { spot = this.origin + v_forward * 100 + '0 0 64'; - spot = vehicles_findgoodexit(this, spot); - setorigin(this.owner , spot); - this.owner.velocity = (v_up + v_forward * 0.25) * 750; - this.owner.oldvelocity = this.owner.velocity; + spot = vehicles_findgoodexit(this, player, spot); + setorigin(player, spot); + player.velocity = (v_up + v_forward * 0.25) * 750; + player.oldvelocity = player.velocity; } else { if(vdist(this.velocity, >, 2 * autocvar_sv_maxairspeed)) { - this.owner.velocity = normalize(this.velocity) * autocvar_sv_maxairspeed * 2; - this.owner.velocity_z += 200; + player.velocity = normalize(this.velocity) * autocvar_sv_maxairspeed * 2; + player.velocity_z += 200; spot = this.origin + v_forward * 32 + '0 0 64'; - spot = vehicles_findgoodexit(this, spot); + spot = vehicles_findgoodexit(this, player, spot); } else { - this.owner.velocity = this.velocity * 0.5; - this.owner.velocity_z += 10; + player.velocity = this.velocity * 0.5; + player.velocity_z += 10; spot = this.origin - v_forward * 200 + '0 0 64'; - spot = vehicles_findgoodexit(this, spot); + spot = vehicles_findgoodexit(this, player, spot); } - this.owner.oldvelocity = this.owner.velocity; - setorigin(this.owner , spot); + player.oldvelocity = player.velocity; + setorigin(player, spot); } - antilag_clear(this.owner, CS(this.owner)); this.owner = NULL; + antilag_clear(player, CS(player)); } bool raptor_frame(entity this, float dt) @@ -133,7 +135,7 @@ bool raptor_frame(entity this, float dt) entity vehic = this.vehicle; return = true; - if(gameover) + if(game_stopped) { vehic.solid = SOLID_NOT; vehic.takedamage = DAMAGE_NO; @@ -463,6 +465,8 @@ bool raptor_takeoff(entity this, float dt) else this.PlayerPhysplug = raptor_frame; + this.vehicle_weapon2mode = vehic.vehicle_weapon2mode; + if(vehic.vehicle_flags & VHF_SHIELDREGEN) vehicles_regen(vehic, vehic.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, dt, true);