ihm-tswow / Links-Awakening-DX-HD

Unaffiliated fork off https://linksawakeningdxhd.itch.io/links-awakening-dx-hd
365 stars 128 forks source link

Blade Traps are implemented incorrectly #42

Open SirGouki opened 9 months ago

SirGouki commented 9 months ago

I was messing around with the in game editor, trying to fix the incorrect block in the tail dungeon (there's a block in front of a blade trap you're supposed to be able to push upwards to block it, but in the map its a tile with a collision box instead). I finally figured out how to change the block, saved the map and pushed the block up to block the blade trap. When I went to cross its path, the blade trap traveled through the block and hit me anyway. Pulling up the source, I noticed that, unlike most entities, this one does not have anything assigning it a collision box that tells it it can't go through walls. It is instead coded to use some math to know where its beginning and final points are in all directions and will ignore anything placed in between them.

https://github.com/ihm-tswow/Links-Awakening-DX-HD/blob/165c727a01f5f843589a191dcd99c20b755a1488/InGame/GameObjects/Enemies/EnemyBladeTrap.cs#L44-L53

for comparison: https://github.com/ihm-tswow/Links-Awakening-DX-HD/blob/165c727a01f5f843589a191dcd99c20b755a1488/InGame/GameObjects/Enemies/EnemyDarknut.cs#L64-L76

There are no checks anywhere in the blade trap's code for any potential obstacles.