Author Topic: [Bug?] Melee attacks on large units will always hit from top corner down.  (Read 90 times)

Offline CrazedHarpooner

  • Colonel
  • ****
  • Posts: 148
    • View Profile
While making a debug script for melee hits I discovered that all melee hits done vs a large unit will always be considered to be coming from the top (NW) corner, facing downwards (SE) to the target. Attacker's position and facing is irrelevant and only the target's facing is considered.
In the image attached you can see I'm attacking my own hover tank with a stun rod and in theory hitting the rear. But the script log returns this:
Code: [Select]
[27-01-2025_14-31-22] [DEBUG] Script debug log: ----------
[27-01-2025_14-31-22] [DEBUG] Script debug log: Attacker: Tile(x: 45 y: 45 z: 0 isVoid: false unit: "SOLDIER")
[27-01-2025_14-31-22] [DEBUG] Script debug log: Target: Tile(x: 43 y: 43 z: 0 isVoid: false unit: "STR_HOVERTANK_PLASMA")
[27-01-2025_14-31-22] [DEBUG] Script debug log: Attacker facing: 7   Target facing: 7   Target size: 2
[27-01-2025_14-31-22] [DEBUG] Script debug log: Power: 0   Target part: 1   Target side: 0

If I turn on my script that alters the side and part hit it returns this:
Code: [Select]
[27-01-2025_14-32-50] [DEBUG] Script debug log: ----------
[27-01-2025_14-32-50] [DEBUG] Script debug log: Attacker: Tile(x: 45 y: 45 z: 0 isVoid: false unit: "SOLDIER")
[27-01-2025_14-32-50] [DEBUG] Script debug log: Target: Tile(x: 43 y: 43 z: 0 isVoid: false unit: "STR_HOVERTANK_PLASMA")
[27-01-2025_14-32-50] [DEBUG] Script debug log: Attacker facing: 7   Target facing: 7   Target size: 2
[27-01-2025_14-32-50] [DEBUG] Script debug log: Power: 0   Target part: 1   Target side: 3

I haven't tested if this issue is present in OXC or if it even may be OG UFO behaviour
Rather than reattaching the mods for both scripts here I'll just be putting the link to the post I made under the 'OXCE Support Y-scripts' board and the attachments there. Let me know if something like this should be linked differently.

Topic: https://openxcom.org/forum/index.php?topic=12432.0
Melee Logging attachment: https://openxcom.org/forum/index.php?action=dlattach;topic=12432.0;attach=65573
Melee Handler attachment: https://openxcom.org/forum/index.php?action=dlattach;topic=12432.0;attach=65572