forked from Mirrors/openclonk
Airship: modules delete themselves when airship is removed
parent
08246163b7
commit
f6b3790fed
|
@ -6,6 +6,13 @@ local parent;
|
|||
protected func Initialize()
|
||||
{
|
||||
propanim = PlayAnimation("Flight", 5, Anim_Const(0), Anim_Const(1000));
|
||||
AddEffect("CheckParent", this, 1, 1,this);
|
||||
}
|
||||
|
||||
private func FxCheckParentTimer(object target, proplist, int timer)
|
||||
{
|
||||
if(!parent) target->RemoveObject();
|
||||
else return;
|
||||
}
|
||||
|
||||
//Moves the propeller 1 tick per call
|
||||
|
|
|
@ -2,6 +2,16 @@
|
|||
|
||||
local parent;
|
||||
|
||||
public func Initialize()
|
||||
{
|
||||
AddEffect("CheckParent", this,1,1,this);
|
||||
}
|
||||
|
||||
private func FxCheckParentTimer(object target, proplist, int timer)
|
||||
{
|
||||
if(!parent) target->RemoveObject();
|
||||
}
|
||||
|
||||
public func IsProjectileTarget(target,shooter) { return true; }
|
||||
|
||||
public func Damage(int change)
|
||||
|
|
Loading…
Reference in New Issue