mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-11 06:24:38 +00:00
made all jammable objects have the same duration for the jamming effect and the jamming sound, except for Infantry which have a longer sound time
This commit is contained in:
parent
6c76997675
commit
9c0738e864
2 changed files with 7 additions and 33 deletions
|
|
@ -128,7 +128,7 @@ trait JammableBehavior {
|
|||
val radius = cause.projectile.profile.DamageRadius
|
||||
JammingUnit.FindJammerDuration(cause.projectile.profile, obj) match {
|
||||
case Some(dur) if Vector3.DistanceSquared(cause.hit_pos, cause.target.Position) < radius * radius =>
|
||||
StartJammeredSound(obj)
|
||||
StartJammeredSound(obj, dur)
|
||||
StartJammeredStatus(obj, dur)
|
||||
case _ => ;
|
||||
}
|
||||
|
|
@ -148,7 +148,7 @@ trait JammableBehavior {
|
|||
jammedSound = true
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
jammeredSoundTimer.cancel
|
||||
jammeredSoundTimer = context.system.scheduler.scheduleOnce(30 seconds, self, JammableUnit.ClearJammeredSound())
|
||||
jammeredSoundTimer = context.system.scheduler.scheduleOnce(dur seconds, self, JammableUnit.ClearJammeredSound())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue