From ad7b0e56ab53604ae26eae007c1639b597617111 Mon Sep 17 00:00:00 2001 From: Vasilii Rogin Date: Mon, 13 Jan 2025 17:41:18 +0200 Subject: [PATCH] Fix default hit location on called shots (#429) Co-authored-by: Alexander Batalov --- src/combat.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/combat.cc b/src/combat.cc index 63d48059..825a5734 100644 --- a/src/combat.cc +++ b/src/combat.cc @@ -5475,11 +5475,13 @@ static void _draw_loc_(int eventCode, int color) // 0x426218 static int calledShotSelectHitLocation(Object* critter, int* hitLocation, int hitMode) { + *hitLocation = HIT_LOCATION_TORSO; + if (critter == nullptr) { return 0; } - if (critter->pid >> 24 != OBJ_TYPE_CRITTER) { + if (PID_TYPE(critter->pid) != OBJ_TYPE_CRITTER) { return 0; }