forked from Mirrors/openclonk
fixed non-moving, high-velocity coconuts (#1627)
Coconuts were C4D_Object AND C4D_StaticBack. That meant that they would save speed (e.g. by explosions?) and could hit Clonks that passed by them.install-platforms
parent
91ff13b81f
commit
9214257424
|
@ -17,7 +17,7 @@ private func GetHangingTime() { return 4200; }
|
|||
|
||||
public func AttachToTree(object tree)
|
||||
{
|
||||
SetCategory(GetCategory() | C4D_StaticBack);
|
||||
SetCategory((GetCategory() | C4D_StaticBack) & (~C4D_Object));
|
||||
mother = tree;
|
||||
ScheduleCall(this, "DetachFromTree", 4200 + Random(500));
|
||||
}
|
||||
|
@ -25,7 +25,8 @@ public func AttachToTree(object tree)
|
|||
public func DetachFromTree(bool no_bounce)
|
||||
{
|
||||
ClearScheduleCall(this, "DetachFromTree");
|
||||
SetCategory(GetCategory() & (~C4D_StaticBack));
|
||||
SetCategory((GetCategory() | C4D_Object) & (~C4D_StaticBack));
|
||||
SetYDir(0);
|
||||
SetXDir(Random(3)-1);
|
||||
if (mother) mother->LostCoconut();
|
||||
mother = nil;
|
||||
|
|
Loading…
Reference in New Issue