fixed weapon boosts being used with 0 batteryW

This commit is contained in:
Kamil 2020-11-12 09:28:12 +01:00 committed by Gent Semaj
parent 9cee8f2c87
commit 59ab81d3c6

View File

@ -1255,7 +1255,7 @@ int8_t MobManager::addBullet(Player* plr, bool isGrenade) {
toAdd.bulletType = isGrenade ? 1 : plr->Equip[0].iID; toAdd.bulletType = isGrenade ? 1 : plr->Equip[0].iID;
// temp solution Jade fix plz // temp solution Jade fix plz
toAdd.weaponBoost = plr->batteryW >= 0; toAdd.weaponBoost = plr->batteryW > 0;
if (toAdd.weaponBoost) { if (toAdd.weaponBoost) {
int boostCost = rand() % 11 + 20; int boostCost = rand() % 11 + 20;
plr->batteryW = boostCost > plr->batteryW ? 0 : plr->batteryW - boostCost; plr->batteryW = boostCost > plr->batteryW ? 0 : plr->batteryW - boostCost;