Repository navigation
Update getLocationFlags to include tmFlags parameter - #804
Conversation
|
Thanks for the PR - what issue does this solve? |
Line 6504 calls: so it updates tFlags but does not refresh tmFlags for the current (x, y). As a result, the condition at line 6507: is evaluating tmFlags using the stale value last loaded at line 6487 (from impactLoc.x, impactLoc.y), not the tile currently being tested in the loop. My thought: If the goal of this loop is to find a safe landing spot, tmFlags needs to be validated per candidate cell — meaning line 6504 should also retrieve tmFlags like tFlags. |
|
I agree that the fix implements the intended behavior. I’m having trouble finding a situation where this would change the behavior of the game. Is there a specific situation that brought this fix to your attention? In order for the TMFlags to affect a blink path, it would have to be a path over lava where the terrain had TM_EXTINGUISHES_FIRE, but this only occurs for water tiles. Since water and lava occupy the same layer in the tile map, this should never occur. Maybe a water trap that was activated next to lava? |
|
Yeah, I'm mostly curious whether you observed a bug or this was found by reading/analysis. I'm happy to merge though, thanks |
No description provided.