✅Military fence decoration

Do you have any issues? Don't hesitate to tell us about it.
User avatar
CommanderABab
AB
Reactions:
Posts: 11102
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

✅Military fence decoration

#1

Post by CommanderABab »

Doesn't rotate well.
Screenshot_20170719-180808.jpg
Screenshot_20170719-180830.jpg

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: Military fence decoration

#2

Post by Bearbear76 »

That's strange
Maybe because it refreshed the texture to it's original state

User avatar
Brody Craft
Inhabitant of a Infinity
Reactions:
Posts: 8034
Joined: 24 Jan 2017, 11:15
Location: SE Asia
Plugins: Showcase Store
Version: Beta

Platform

Re: Military fence decoration

#3

Post by Brody Craft »

That always happen when you try to make a 3×2 fences

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: Military fence decoration

#4

Post by Lobby »

Thank for spotting this issue, I thought I tested it...

The bug is in this code fragment which calculates the rotated frame

Code: Select all

currentFrame & 0xFFFFFFF0 + Direction.rotateCW(currentFrame & 0xF, d.rotation);
The problem is, that the operator & (bitwise and) has a lower precedence than the + operator. The fix is the use of parenthesis

Code: Select all

(currentFrame & 0xFFFFFFF0) + Direction.rotateCW(currentFrame & 0xF, d.rotation);

User avatar
BetterBear
Inhabitant of a Galaxy Cluster
Reactions:
Posts: 2896
Joined: 18 Apr 2017, 09:03
Location: In a place you don't expect.
Plugins: Showcase Store
Version: Beta

Platform

Re: [Fixed]Military fence decoration

#5

Post by BetterBear »

How do you know nearly everything about fixing codes :shock:

Post Reply Previous topicNext topic

Return to “Problems and Errors (bugs)”