mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-04-20 03:45:21 +00:00
should fix players not performing damage after being broken for an unknown amount of time, maybe never working correctly
This commit is contained in:
parent
9645bd79d4
commit
c229d50261
1 changed files with 4 additions and 1 deletions
|
|
@ -102,11 +102,14 @@ class WeaponAndProjectileOperations(
|
|||
if (tool.Magazine <= 0) { //safety: enforce ammunition depletion
|
||||
prefire -= weaponGUID
|
||||
EmptyMagazine(weaponGUID, tool)
|
||||
projectiles(projectileGUID.guid - Projectile.baseUID) = None
|
||||
(None, None)
|
||||
} else if (!player.isAlive) { //proper internal accounting, but no projectile
|
||||
prefire += weaponGUID
|
||||
tool.Discharge()
|
||||
projectiles(projectileGUID.guid - Projectile.baseUID) = None
|
||||
shotsWhileDead += 1
|
||||
(None, None)
|
||||
} else { //shooting
|
||||
if (
|
||||
avatar.stamina > 0 &&
|
||||
|
|
@ -121,8 +124,8 @@ class WeaponAndProjectileOperations(
|
|||
tool.Discharge()
|
||||
prefire += weaponGUID
|
||||
addShotsFired(tool.Definition.ObjectId, tool.AmmoSlot.Chamber)
|
||||
(o, Some(tool))
|
||||
}
|
||||
(o, Some(tool))
|
||||
}
|
||||
collectedTools.headOption.getOrElse((None, None))
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue