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
|
if (tool.Magazine <= 0) { //safety: enforce ammunition depletion
|
||||||
prefire -= weaponGUID
|
prefire -= weaponGUID
|
||||||
EmptyMagazine(weaponGUID, tool)
|
EmptyMagazine(weaponGUID, tool)
|
||||||
|
(o, Some(tool))
|
||||||
} else if (!player.isAlive) { //proper internal accounting, but no projectile
|
} else if (!player.isAlive) { //proper internal accounting, but no projectile
|
||||||
prefire += weaponGUID
|
prefire += weaponGUID
|
||||||
tool.Discharge()
|
tool.Discharge()
|
||||||
projectiles(projectileGUID.guid - Projectile.baseUID) = None
|
projectiles(projectileGUID.guid - Projectile.baseUID) = None
|
||||||
shotsWhileDead += 1
|
shotsWhileDead += 1
|
||||||
|
(None, None)
|
||||||
} else { //shooting
|
} else { //shooting
|
||||||
if (
|
if (
|
||||||
avatar.stamina > 0 &&
|
avatar.stamina > 0 &&
|
||||||
|
|
@ -628,9 +630,9 @@ private[support] class WeaponAndProjectileOperations(
|
||||||
tool.Discharge()
|
tool.Discharge()
|
||||||
prefire += weaponGUID
|
prefire += weaponGUID
|
||||||
addShotsFired(tool.Definition.ObjectId, tool.AmmoSlot.Chamber)
|
addShotsFired(tool.Definition.ObjectId, tool.AmmoSlot.Chamber)
|
||||||
}
|
|
||||||
(o, Some(tool))
|
(o, Some(tool))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
collectedTools.headOption.getOrElse((None, None))
|
collectedTools.headOption.getOrElse((None, None))
|
||||||
} else {
|
} else {
|
||||||
(None, None)
|
(None, None)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue