Fixing my own stupid crap (coconut).

shapetextures
Clonkonaut 2015-12-12 16:16:24 +01:00
parent f9f7d17208
commit 461d147859
1 changed files with 12 additions and 1 deletions

View File

@ -12,17 +12,28 @@ public func AttachToTree(object tree)
ScheduleCall(this, "DeattachFromTree", 4200 + Random(500));
}
public func DeattachFromTree()
public func DeattachFromTree(bool no_bounce)
{
ClearScheduleCall(this, "DeattachFromTree");
SetCategory(GetCategory() ^ C4D_StaticBack);
if (mother) mother->LostCoconut();
var effect = AddEffect("IntSeed", this, 100, 18, this);
effect.SeedTime = GetSeedTime();
mother = nil;
AddEffect("Bouncy", this, 1, 175);
}
private func Entrance()
{
if (mother) DeattachFromTree(true);
}
private func Destruction()
{
if (mother) DeattachFromTree(true);
}
/** Destroy coconut instead of seeding if it tries to seed outside given area
*/
public func SetConfinement(conf)