forked from Mirrors/openclonk
Don't accidentally reattach coconuts (#1858)
I'm not sure how exactly that issue happens, but in the attached video it looks like C4D_StaticBack was accidentally set again. As the XOR operation can do that, I'm changing it to always set the C4D_StaticBack bit to 0.install-platforms
parent
31fee7a46d
commit
a4f25ecd4c
|
@ -25,7 +25,7 @@ public func AttachToTree(object tree)
|
|||
public func DetachFromTree(bool no_bounce)
|
||||
{
|
||||
ClearScheduleCall(this, "DetachFromTree");
|
||||
SetCategory(GetCategory() ^ C4D_StaticBack);
|
||||
SetCategory(GetCategory() & (~C4D_StaticBack));
|
||||
SetXDir(Random(3)-1);
|
||||
if (mother) mother->LostCoconut();
|
||||
mother = nil;
|
||||
|
|
Loading…
Reference in New Issue