make airship IsProjectileTarget failsafe as well

install-platforms
Maikel de Vries 2017-11-22 14:59:03 +01:00
parent 5c11b703a9
commit e228d84670
1 changed files with 3 additions and 0 deletions

View File

@ -311,6 +311,9 @@ public func GetCrewMembers()
// Only is a projectile target if the projectile hits the balloon part of the airship.
public func IsProjectileTarget(object projectile, object shooter)
{
// If there is no projectile assume it is a general request and thus return true.
if (!projectile)
return true;
// Ensure the hitbox overlaps roughly with the balloon part.
var dx = GetX() - projectile->GetX();
var dy = GetY() - projectile->GetY();