mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-26 23:10:05 +00:00
fixed weapon boosts being used with 0 batteryW
This commit is contained in:
parent
9cee8f2c87
commit
59ab81d3c6
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user