From ec44b24f72416c20bbee02bcaa400dfa8f0bb8c0 Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 13 Nov 2019 17:06:54 +0000 Subject: [PATCH] Ok, I'm really paying for my hubris. Corrected a faulty optimisation in my fix. --- src/p_enemy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 1c6625bd9..00f3c52c6 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -5175,9 +5175,13 @@ void A_SignPlayer(mobj_t *actor) if (!skincheck(skincount)) skincount++; skinnum = P_RandomKey(skincount); - for (skincount = skinnum; skincount < numskins; skincount++) + for (skincount = 0; skincount < numskins; skincount++) + { if (skincheck(skincount)) skinnum++; + if (skincount > skinnum) + break; + } } else // otherwise, advance 1 skin {