mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-13 15:34:42 +00:00
projectile change
This commit is contained in:
parent
a30f89fc50
commit
e91d91294e
2 changed files with 3 additions and 3 deletions
|
|
@ -2208,8 +2208,6 @@ class SessionData(
|
||||||
// auto kick players damaging spectators
|
// auto kick players damaging spectators
|
||||||
if (obj.spectator && obj != player) {
|
if (obj.spectator && obj != player) {
|
||||||
administrativeKick(player)
|
administrativeKick(player)
|
||||||
} else if (!player.isAlive) {
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
obj.Actor ! Vitality.Damage(func)
|
obj.Actor ! Vitality.Damage(func)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,8 +630,8 @@ 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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue