X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fvehicles%2Fbumblebee.qc;h=b9c7dbfb8339e406603dbbea763f63c28ea81c24;hb=278f5440b4272f696c6b6e5bb9bb3139b8b53a11;hp=0f984129fe589e406439e67aa846ccd36df14318;hpb=cf26ba11220f6f3d6280c26040ad311ee92ebeb2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/vehicles/bumblebee.qc b/qcsrc/server/vehicles/bumblebee.qc index 0f984129f..b9c7dbfb8 100644 --- a/qcsrc/server/vehicles/bumblebee.qc +++ b/qcsrc/server/vehicles/bumblebee.qc @@ -236,18 +236,17 @@ void bumb_gunner_exit(float _exitflag) self.movetype = MOVETYPE_WALK; self.effects &~= EF_NODRAW; self.alpha = 1; - self.PlayerPhysplug = SUB_Null; + self.PlayerPhysplug = func_null; self.view_ofs = PL_VIEW_OFS; self.event_damage = PlayerDamage; self.hud = HUD_NORMAL; self.switchweapon = self.vehicle.switchweapon; - if(self.flagcarried) - { - self.flagcarried.scale = 0.6; - setattachment(self.flagcarried, self, ""); - setorigin(self.flagcarried, FLAG_CARRY_POS); - } + vh_player = self; + vh_vehicle = self.vehicle; + MUTATOR_CALLHOOK(VehicleExit); + self = vh_player; + self.vehicle = vh_vehicle; self.vehicle.vehicle_hudmodel.viewmodelforclient = self.vehicle; @@ -308,7 +307,7 @@ float bumb_gunner_enter() other.solid = SOLID_NOT; other.movetype = MOVETYPE_NOCLIP; other.alpha = -1; - other.event_damage = SUB_Null; + other.event_damage = func_null; other.view_ofs = '0 0 0'; other.hud = _gun.hud; other.PlayerPhysplug = _gun.PlayerPhysplug; @@ -331,17 +330,11 @@ float bumb_gunner_enter() CSQCVehicleSetup(other, other.hud); - if(other.flagcarried) - { - if(!autocvar_g_vehicles_allow_flagcarry) - DropFlag(other.flagcarried, world, world); - else - { - other.flagcarried.scale = 1; - setattachment(other.flagcarried, self, ""); - setorigin(other.flagcarried, '0 0 1' * self.maxs_z); - } - } + vh_player = other; + vh_vehicle = _gun; + MUTATOR_CALLHOOK(VehicleEnter); + other = vh_player; + _gun = vh_vehicle; return TRUE; } @@ -801,7 +794,7 @@ void bumb_die() if(random() > 0.5) _body.touch = bumb_blowup; else - _body.touch = SUB_Null; + _body.touch = func_null; _body.think = bumb_diethink; _body.nextthink = time; @@ -812,7 +805,7 @@ void bumb_die() pointparticles(particleeffectnum("explosion_medium"), findbetterlocation(self.origin, 16), '0 0 0', 1); self.health = 0; - self.event_damage = SUB_Null; + self.event_damage = func_null; self.solid = SOLID_CORPSE; self.takedamage = DAMAGE_NO; self.deadflag = DEAD_DYING; @@ -821,7 +814,7 @@ void bumb_die() self.colormod = '0 0 0'; self.avelocity = '0 0 0'; self.velocity = '0 0 0'; - self.touch = SUB_Null; + self.touch = func_null; self.nextthink = 0; setorigin(self, self.pos1);