mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
Merge pull request #1193 from ScrawnyRonnie/trades
No More Kill Trades?
This commit is contained in:
commit
21637108c2
|
|
@ -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 &&
|
||||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue