forked from Mirrors/openclonk
Fixed a few C4Script runtime errors
parent
be410432a8
commit
930505ee0d
|
@ -79,8 +79,11 @@ public func OnProjectileHit()
|
|||
//Pop!
|
||||
CastParticles("Air",20,5,0,-10,170,190,RGB(255,255,255),RGB(255,255,255));
|
||||
Sound("BalloonPop");
|
||||
if(rider!=nil) rider->SetAction("Tumble");
|
||||
rider->SetSpeed(GetXDir(),GetYDir());
|
||||
if (rider)
|
||||
{
|
||||
rider->SetAction("Tumble");
|
||||
rider->SetSpeed(GetXDir(),GetYDir());
|
||||
}
|
||||
parent->RemoveObject();
|
||||
RemoveObject();
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ protected func Initialize()
|
|||
public func Launch(int shooter)
|
||||
{
|
||||
SetController(shooter);
|
||||
AddEffect("HitCheck", this, 1,1, nil,nil, shooter);
|
||||
AddEffect("HitCheck", this, 1,1, nil, nil);
|
||||
}
|
||||
|
||||
protected func FxFadeTimer(object target, int num, int timer)
|
||||
|
|
|
@ -15,7 +15,7 @@ global func FxHitCheckStart(object target, proplist effect, int temp, object by_
|
|||
return;
|
||||
effect.x = target->GetX();
|
||||
effect.y = target->GetY();
|
||||
if (!by_obj)
|
||||
if (!by_obj || GetType(by_obj) != C4V_C4Object)
|
||||
by_obj = target;
|
||||
if (by_obj->Contained())
|
||||
by_obj = by_obj->Contained();
|
||||
|
|
Loading…
Reference in New Issue