_player.switchweapon = _vehicle.switchweapon;
_player.last_vehiclecheck = time + 3;
_player.vehicle_enter_delay = time + 2;
+ _player.spawnshieldtime = time + 0.5; // protect them long enough to escape the deadly vehicle
CSQCVehicleSetup(_player, HUD_NORMAL);
}
if((self.origin_z + self.maxs_z) > (other.origin_z))
if(vehicles_crushable(other))
{
- if(vlen(self.velocity) != 0)
+ if(vlen(self.velocity) >= 30)
Damage(other, self, self.owner, autocvar_g_vehicles_crush_dmg, DEATH_VH_CRUSH, '0 0 0', normalize(other.origin - self.origin) * autocvar_g_vehicles_crush_force);
return; // Dont do selfdamage when hitting "soft targets".
player.teleportable = TELEPORT_NORMAL;
player.switchweapon = gunner.switchweapon;
player.vehicle_enter_delay = time + 2;
+ player.spawnshieldtime = time + 0.5;
fixedmakevectors(vehic.angles);
if(player == vehic.gunner2) { vehic.gunner2 = world; v_right *= -1; }
vector spot = real_origin(gunner);
- spot += v_up * 128 + v_forward * 300 + v_right * 150;
- spot = vehicles_findgoodexit(spot);
- //setorigin(player, spot);
+ spot = spot + v_up * 128 + v_forward * 300 + v_right * 150;
+ spot = bumblebee_gunner_findgoodexit(spot, gunner, player);
+
+ // TODO: figure a way to move player out of the gunner
player.velocity = 0.75 * vehic.velocity + normalize(spot - vehic.origin) * 200;
player.velocity_z += 10;