Skip to content

Commit

Permalink
Merge pull request #1193 from ScrawnyRonnie/trades
Browse files Browse the repository at this point in the history
No More Kill Trades?
  • Loading branch information
ScrawnyRonnie authored Apr 18, 2024
2 parents cc29ee3 + e91d912 commit 2163710
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -609,11 +609,13 @@ private[support] class WeaponAndProjectileOperations(
if (tool.Magazine <= 0) { //safety: enforce ammunition depletion
prefire -= weaponGUID
EmptyMagazine(weaponGUID, tool)
(o, Some(tool))
} 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 &&
Expand All @@ -628,8 +630,8 @@ private[support] 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 {
Expand Down

0 comments on commit 2163710

Please sign in to comment.