mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-25 14:59:07 +00:00
mechanism for server-driven emp caused by projectiles with emp properties; finalization of geometry elements and tests for geometric tests
This commit is contained in:
parent
e41e7e7cfa
commit
6e81ee7e95
11 changed files with 706 additions and 52 deletions
|
|
@ -82,7 +82,7 @@ class ExplosiveDeployableControl(mine: ExplosiveDeployable) extends Actor with D
|
|||
mine,
|
||||
DamageInteraction(
|
||||
SourceEntry(mine),
|
||||
TriggerUsedReason(PlayerSource(player), trigger),
|
||||
TriggerUsedReason(PlayerSource(player), trigger.GUID),
|
||||
mine.Position
|
||||
).calculate()(mine),
|
||||
damage = 0
|
||||
|
|
@ -239,6 +239,10 @@ object ExplosiveDeployableControl {
|
|||
val scalar = Vector3.ScalarProjection(dir, up)
|
||||
val point1 = g1.pointOnOutside(dir).asVector3
|
||||
val point2 = g2.pointOnOutside(Vector3.neg(dir)).asVector3
|
||||
(scalar >= 0 || Vector3.MagnitudeSquared(up * scalar) < 0.35f) && Vector3.DistanceSquared(point1, point2) <= maxDistance
|
||||
(scalar >= 0 || Vector3.MagnitudeSquared(up * scalar) < 0.35f) &&
|
||||
math.min(
|
||||
Vector3.DistanceSquared(g1.center.asVector3, g2.center.asVector3),
|
||||
Vector3.DistanceSquared(point1, point2)
|
||||
) <= maxDistance
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue