Open mvdhout1992 opened 3 years ago
Looking at the code for TechoClass::Fire_Coord() it adjusts for Height when finding the nortern coordinate but it does not adjust for width when finding the eastern coordinate
Note that the bug only happens when unit fire north, so might need to add a check for the current facing.
https://github.com/TheAssemblyArmada/Vanilla-Conquer/blob/vanilla/redalert/techno.cpp#L553
Facing is indeed important. I tested (in TD) that Gun Turrets can sometimes not shoot units when facing away from them, but can if they happen to face the right direction.
I'm wondering why these offsets are ever even taken into account. All calculations should take the central point of the unit/structure, as in, the point where enemy attacks would be targeted, as point from which to calculate its own attacks.
They use a reciprocal_check, so the range is dynamically modified based on who is shooting who.
https://github.com/TheAssemblyArmada/Vanilla-Conquer/blob/vanilla/redalert/techno.cpp#L1379
The issue is that when shooting to the north units have one cell more range.