Skip to content

Commit

Permalink
Fix default hit location on called shots (#429)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Batalov <[email protected]>
  • Loading branch information
roginvs and alexbatalov authored Jan 13, 2025
1 parent e770e64 commit ad7b0e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/combat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ad7b0e5

Please sign in to comment.