From c97e9af14c713b0208e5fc96e13d7d057f9cfa5d Mon Sep 17 00:00:00 2001 From: Kp Date: Mon, 25 Jul 2016 03:48:09 +0000 Subject: [PATCH] Use player object passed to maybe_steal_secondary_weapon --- d2x-rebirth/main/escort.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/d2x-rebirth/main/escort.cpp b/d2x-rebirth/main/escort.cpp index ab49e5d32..3dbcc75e5 100644 --- a/d2x-rebirth/main/escort.cpp +++ b/d2x-rebirth/main/escort.cpp @@ -1416,8 +1416,7 @@ static int maybe_steal_flag_item(const vobjptr_t playerobjp, const PLAYER_FLAG f // ---------------------------------------------------------------------------- static int maybe_steal_secondary_weapon(const vobjptr_t playerobjp, int weapon_num) { - (void)playerobjp; - if (auto &secondary_ammo = get_local_player_secondary_ammo()[weapon_num]) + if (auto &secondary_ammo = playerobjp->ctype.player_info.secondary_ammo[weapon_num]) if (d_rand() < THIEF_PROBABILITY) { if (weapon_index_is_player_bomb(weapon_num)) {