From b93a5c530506da8d0a02b5dde0378bb91c9f1da0 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 28 Aug 2025 16:25:35 +0200 Subject: [PATCH] replace those with P_GetLocalPlayerForNum --- src/p_map.c | 3 +-- src/p_spec.c | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index e4713b431..4789dcaef 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -225,8 +225,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) { for (UINT8 j = 0; j <= splitscreen; ++j) { - INT32 id = (j == 0 ? consoleplayer : displayplayers[j]); - if (object->player == &players[id]) + if (object->player == P_GetLocalPlayerForNum(j)) { localangle[j] = spring->angle; break; diff --git a/src/p_spec.c b/src/p_spec.c index 93f3ba42c..02d4cbd36 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3537,9 +3537,7 @@ DoneSection2: { for (UINT8 j = 0; j <= splitscreen; ++j) { - INT32 id = (j == 0 ? consoleplayer : displayplayers[j]); - - if (player == &players[id]) + if (player == P_GetLocalPlayerForNum(j)) { localangle[j] = player->mo->angle; break; @@ -7482,8 +7480,7 @@ void T_Pusher(pusher_t *p) { for (UINT8 i = 0; i <= splitscreen; ++i) { - INT32 id = (i == 0 ? consoleplayer : displayplayers[i]); - if (thing->player == &players[id]) + if (thing->player == P_GetLocalPlayerForNum(i)) { if (thing->angle - localangle[i] > ANGLE_180) localangle[i] -= (localangle[i] - thing->angle) / 8;