Skip to content
Permalink
Browse files

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.
  • Loading branch information...
lluchs committed Dec 26, 2017
1 parent 31fee7a commit a4f25ecd4c5993bef2d058d85466c4aca9c644d7
@@ -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;

0 comments on commit a4f25ec

Please sign in to comment.
You can’t perform that action at this time.