summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-05-28 01:33:01 +0200
committerTreeki <treeki@gmail.com>2013-05-28 01:33:01 +0200
commit8b4e5cb8e7881239a5d24260ba313a07dc8c0d28 (patch)
tree6fd1988b232ce8bd2ca8889db60f27bd328af538
parent46195b552eff070ab326f75c9265a40eeefee5d9 (diff)
downloadkamek-8b4e5cb8e7881239a5d24260ba313a07dc8c0d28.tar.gz
kamek-8b4e5cb8e7881239a5d24260ba313a07dc8c0d28.zip
fixed shop giving lives to the wrong players
-rw-r--r--src/koopatlas/shop.cpp7
1 files 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;
}
}