mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-19 18:14:44 +00:00
projectile change
This commit is contained in:
parent
a30f89fc50
commit
e91d91294e
|
|
@ -2208,8 +2208,6 @@ class SessionData(
|
|||
// auto kick players damaging spectators
|
||||
if (obj.spectator && obj != player) {
|
||||
administrativeKick(player)
|
||||
} else if (!player.isAlive) {
|
||||
|
||||
} else {
|
||||
obj.Actor ! Vitality.Damage(func)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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