void bumblebee_gunner_exit(entity this, int _exitflag)
{
- entity player = this;
- entity gunner = player.vehicle;
+ entity player = ((this.owner.gun1 == this) ? this.owner.gunner1 : this.owner.gunner2);
+ entity gunner = this;
entity vehic = gunner.owner;
if(IS_REAL_CLIENT(player))
if(instance.gunner1)
{
entity e = instance.gunner1;
- instance.gun1.vehicle_exit(e, VHEF_EJECT);
+ instance.gun1.vehicle_exit(instance.gun1, VHEF_EJECT);
entity oldother = other;
other = e;
instance.phase = 0;
if(instance.gunner2)
{
entity e = instance.gunner2;
- instance.gun2.vehicle_exit(e, VHEF_EJECT);
+ instance.gun2.vehicle_exit(instance.gun2, VHEF_EJECT);
entity oldother = other;
other = e;
instance.phase = 0;
instance.gun3.enemy.effects |= EF_NODRAW;
if(instance.gunner1)
- instance.gun1.vehicle_exit(instance.gunner1, VHEF_EJECT);
+ instance.gun1.vehicle_exit(instance.gun1, VHEF_EJECT);
if(instance.gunner2)
- instance.gun2.vehicle_exit(instance.gunner2, VHEF_EJECT);
+ instance.gun2.vehicle_exit(instance.gun2, VHEF_EJECT);
instance.vehicle_exit(instance, VHEF_EJECT);