Replace old Decay methods in some animals.

# Conflicts:
#	planet/Objects.ocd/Animals.ocd/Bat.ocd/Script.c
liquid_container
Armin Schäfer 2016-02-08 00:22:18 +01:00 committed by David Dormagen
parent 2893b22551
commit 40016ae586
3 changed files with 3 additions and 25 deletions

View File

@ -480,17 +480,7 @@ private func Death()
this.BorderBound = 0;
this.ContactCalls = false;
// Decay the dead bat.
AddTimer(this.Decaying, 100);
return;
}
private func Decaying()
{
if (GetCon() < 20)
return RemoveObject();
DoCon(-1);
return;
Decay();
}

View File

@ -93,7 +93,7 @@ func Death()
this.MeshTransformation = Trans_Rotate(160 + Random(41), 1, 0, 0);
if (base_transform) this.MeshTransformation = Trans_Mul(base_transform, this.MeshTransformation);
StopAnimation(swim_animation);
AddTimer(this.Decaying, 500);
Decay();
this.Collectible = true;
// maybe respawn a new fish if roe is near
@ -104,12 +104,6 @@ func Death()
return _inherited(...);
}
func Decaying()
{
if (GetCon()<20) RemoveObject(); else DoCon(-5);
return true;
}
protected func ControlUse(object clonk, int iX, int iY)
{
clonk->Eat(this);

View File

@ -136,7 +136,7 @@ public func Death()
{
RemoveTimer(this.UpdateSwim);
RemoveTimer(this.Activity);
AddTimer(this.Decaying, 500);
Decay();
this.Collectible = true;
this.MeshTransformation = base_transform;
@ -155,12 +155,6 @@ public func CatchBlow()
DoInk();
}
private func Decaying()
{
if (GetCon()<20) RemoveObject(); else DoCon(-5);
return true;
}
public func ControlUse(object clonk, int iX, int iY)
{
clonk->Eat(this);