Merge pull request #5 from fvnkhead/main

Attempt negative charge count fix
This commit is contained in:
Legonzaur
2022-08-01 14:53:56 +02:00
committed by GitHub
@@ -33,6 +33,7 @@ bool IsLaunched = false
if(!player.IsPhaseShifted()){
if(player in playerDecoyActiveFrom){
float chargeCount = float(player.GetOffhandWeapon(1).GetWeaponPrimaryClipCountMax()) - ((Time() - playerDecoyActiveFrom[player])*rechargeMultiplier)
chargeCount = max(chargeCount, 0.0) // can be negative in weird cases
player.GetOffhandWeapon(1).SetWeaponPrimaryClipCount(int(chargeCount))
}
}