diff --git a/src/items/powerup.cpp b/src/items/powerup.cpp index fdd6382f8..8951d48b2 100644 --- a/src/items/powerup.cpp +++ b/src/items/powerup.cpp @@ -248,9 +248,9 @@ void Powerup::hitBonusBox(int n, const Item &item, int add_info) // Otherwise (server or no network): determine powerup randomly - //rand() is moduled by POWERUP_MAX - 1 - 2 because because we have to - //exclude the anvil and the parachute, but later we have to add 1 to prevent - //having a value of 0 since that isn't a valid powerup. + //(POWERUP_MAX - 1) is the last valid id. We substract 2 because because we have to + //exclude the anvil and the parachute which are handled above, but later we + //have to add 1 to prevent having a value of 0 since that isn't a valid powerup. PowerupType newC; while(true) { diff --git a/src/items/powerup_manager.hpp b/src/items/powerup_manager.hpp index 3a999243d..090f65f12 100644 --- a/src/items/powerup_manager.hpp +++ b/src/items/powerup_manager.hpp @@ -32,7 +32,7 @@ class ssgEntity; enum PowerupType {POWERUP_NOTHING, POWERUP_BUBBLEGUM, POWERUP_CAKE, POWERUP_BOWLING, POWERUP_ZIPPER, - POWERUP_PARACHUTE, POWERUP_ANVIL, + POWERUP_PARACHUTE, POWERUP_ANVIL, //powerup.cpp assumes these two come last POWERUP_MAX}; class PowerupManager