forked from Mirrors/openclonk
improve the hitbox of the balloon for projectile targets
This prevents the one hanging on the balloon from shooting himself down with e.g. a bow.objectmenu
parent
93ba7c5954
commit
d1d019ab09
|
@ -147,9 +147,12 @@ protected func OnUnmount(object clonk)
|
|||
return;
|
||||
}
|
||||
|
||||
public func IsProjectileTarget()
|
||||
public func IsProjectileTarget(object projectile, object shooter)
|
||||
{
|
||||
return true;
|
||||
// Exclude the bottom triangle edges from the hitbox such that projectiles can be shot while hanging on the balloon.
|
||||
var dx = GetX() - projectile->GetX();
|
||||
var dy = GetY() - projectile->GetY() + GetBottom();
|
||||
return dy > Abs(dx);
|
||||
}
|
||||
|
||||
public func OnProjectileHit(object projectile)
|
||||
|
|
Loading…
Reference in New Issue