From 8b4e5cb8e7881239a5d24260ba313a07dc8c0d28 Mon Sep 17 00:00:00 2001 From: Treeki Date: Tue, 28 May 2013 01:33:01 +0200 Subject: fixed shop giving lives to the wrong players --- src/koopatlas/shop.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/koopatlas/shop.cpp b/src/koopatlas/shop.cpp index 0df2efd..6f9566e 100644 --- a/src/koopatlas/shop.cpp +++ b/src/koopatlas/shop.cpp @@ -612,9 +612,10 @@ void dWMShop_c::buyItem(int item) { // Apply lives to everyone for (int i = 0; i < 4; i++) { if (Player_Active[i]) { - Player_Lives[i] += appliedItems[(int)ONE_UP]; - if (Player_Lives[i] > 99) - Player_Lives[i] = 99; + int id = Player_ID[i]; + Player_Lives[id] += appliedItems[(int)ONE_UP]; + if (Player_Lives[id] > 99) + Player_Lives[id] = 99; } } -- cgit v1.2.3