From b3ae2c71d843097411b19f601fb77b8e19195338 Mon Sep 17 00:00:00 2001 From: Dan Hemberger Date: Sat, 24 Apr 2021 20:41:36 -0700 Subject: [PATCH] combat_simulator.php: remove improper references See #317. --- src/engine/Default/combat_simulator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/Default/combat_simulator.php b/src/engine/Default/combat_simulator.php index 4a2ba5448..f8ce68926 100644 --- a/src/engine/Default/combat_simulator.php +++ b/src/engine/Default/combat_simulator.php @@ -70,16 +70,16 @@ if (isset($_REQUEST['death_run'])) { while (count($realAttackers) > 0 && count($realDefenders) > 0) { runAnAttack($realAttackers, $realDefenders); - foreach ($realAttackers as $key => &$teamPlayer) { + foreach ($realAttackers as $key => $teamPlayer) { if ($teamPlayer->isDead()) { unset($realAttackers[$key]); } - } unset($teamPlayer); - foreach ($realDefenders as $key => &$teamPlayer) { + } + foreach ($realDefenders as $key => $teamPlayer) { if ($teamPlayer->isDead()) { unset($realDefenders[$key]); } - } unset($teamPlayer); + } } } }