PDA

View Full Version : ZC 2.53 Beta 10 8-way homing is bugged.



Tamamo
03-19-2018, 09:58 AM
I created a keese type enemy with bat movement and 255 homing factor to test if the lined up function was bugged. Or if it was something else.
Here's the result. Link's position is the blue square. The black line is the path of the keese.
Despite not being lined up diagonally it always follows that path.
https://i.imgur.com/mQ7ovEs.png

Avataro
03-19-2018, 01:41 PM
How would you want it to move instead?

Tamamo
03-19-2018, 08:07 PM
it shouldn't always move diagonally upright. as they are not currently lined up within 15 pixels of the 4 axis or the 4 imaginary diagonal axis.

ZoriaRPG
03-20-2018, 05:46 AM
Good spot. Let me know when you check this.

For integration, on this, and trap sensitivity, I'll need to add a rule, so that if a quest author depends on this behaviour for some obscure reason, we don't completely wreck their quests. I forsee this being a bigger issue with traps:

Anarchy_Balsac Do your quests depend on the present, overly-sensitive, trap sensitivity, or weird enemy homing? I don't want this to turn into another issue, like the statues bugfix.

Tamamo I'll also backport whatever you push to 2.54, into 2.53 once it's tested. If you have issues building, to test the change, let me know.

I have one other thing to do in 2.53, before I was going to call it 'done', so, I may as well roll this into it and knock out b14 as soon as I have free time. I'm working double-time this spring, so that I have all summer to dedicate to ZC. :/

Anarchy_Balsac
03-20-2018, 08:59 AM
I don't use traps much, but when I do it's nothing a fix should hurt. The statues thing was only a problem b/c it can make statues do nothing.

I kinda feel bad about that TBH.

Tamamo
03-20-2018, 10:29 AM
and few 8dir enemies are even giving homing factor. with the enemy editor they can all have it. But I think gleeok heads are the only ones with it IIRC.

Avataro
03-20-2018, 11:53 AM
I still don't see the bug. You want it to home onto the center of link instead of the upper left corner of link?

Tamamo
03-20-2018, 02:58 PM
It's a bit hard to explain. It has to do with how the homing actually works.
It's based off whether or not link is within range along either the x or y axis. for 8dir it should change direction only when lined up every 45 degrees. do to the way the lined_up function was written. Because it was always abs(lx-x)-abs(ly-y)<=range. but if link is farther on the y axis then the x axis but not lined up 8way (45 degrees again) then it doesn't matter because it results in a negative number. Similarily it will always result in a positive if link is far enough on the x axis and very close on the y axis to it's relative point.

Avataro
03-20-2018, 05:55 PM
Like this then?
https://i.imgur.com/Wr52e0C.png

Or this
https://i.imgur.com/w0bmEeC.png

ZoriaRPG
09-25-2018, 08:23 AM
This should be patched in all branches. Could use a re-test.