The Blockmap (#852)

* separating geometry classes

* 2d geometry; retirement of the *3D suffix

* makings of an early block map datastructure

* entities in a zone - players, corpses, vehicles, deployables, ground clutter, and buildings - divided between sectors of the zone upon creation, management, or mounting; superfluous messages to keep track of blockmap state, for now

* trait for entities to be added to the blockmap; internal entity data keeps track of current blockmap sector information; calls to add/remove/update functions changed

* modified pieces of environment into an entities that can be added to a block map and have a countable bounding region; fixes for vehicle control seat occcupant collection; fix for squad individual callback references (original issue still remains?)

* introduced the block map into various existijng game calculationa where target selection can be reduced by its probing

* he_mines and jammer_mines now trigger if a valid target is detected at the initial point of deploy; they also trigger later, after a valid target has moved into the arming range of the mine

* conversion of interactions with zone into a queued, periodic set of tasks

* explosive deployable control -> mine deployable control

* tests repaired and all tests working

* mostly comments and documentation

* amenities are now represented on the blockmap
This commit is contained in:
Fate-JH 2021-06-11 23:02:48 -04:00 committed by GitHub
parent 8bf0c4cbff
commit 3966b0264d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 2701 additions and 1011 deletions

View file

@ -786,6 +786,8 @@ class PlayerControlInteractWithWaterTest extends ActorTest {
override def LivePlayers = List(player1)
override def AvatarEvents = avatarProbe.ref
}
zone.blockMap.addTo(player1)
zone.blockMap.addTo(pool)
player1.Zone = zone
player1.Spawn()
@ -799,7 +801,7 @@ class PlayerControlInteractWithWaterTest extends ActorTest {
"cause drowning when player steps too deep in water" in {
assert(player1.Health == 100)
player1.Position = Vector3(5,5,-3) //right in the pool
player1.zoneInteraction() //trigger
player1.zoneInteractions() //trigger
val msg_drown = avatarProbe.receiveOne(250 milliseconds)
assert(
@ -838,6 +840,8 @@ class PlayerControlStopInteractWithWaterTest extends ActorTest {
override def LivePlayers = List(player1)
override def AvatarEvents = avatarProbe.ref
}
zone.blockMap.addTo(player1)
zone.blockMap.addTo(pool)
player1.Zone = zone
player1.Spawn()
@ -851,7 +855,7 @@ class PlayerControlStopInteractWithWaterTest extends ActorTest {
"stop drowning if player steps out of deep water" in {
assert(player1.Health == 100)
player1.Position = Vector3(5,5,-3) //right in the pool
player1.zoneInteraction() //trigger
player1.zoneInteractions() //trigger
val msg_drown = avatarProbe.receiveOne(250 milliseconds)
assert(
@ -865,7 +869,7 @@ class PlayerControlStopInteractWithWaterTest extends ActorTest {
)
//player would normally die in 60s
player1.Position = Vector3.Zero //pool's closed
player1.zoneInteraction() //trigger
player1.zoneInteractions() //trigger
val msg_recover = avatarProbe.receiveOne(250 milliseconds)
assert(
msg_recover match {
@ -902,6 +906,8 @@ class PlayerControlInteractWithLavaTest extends ActorTest {
override def AvatarEvents = avatarProbe.ref
override def Activity = TestProbe().ref
}
zone.blockMap.addTo(player1)
zone.blockMap.addTo(pool)
player1.Zone = zone
player1.Spawn()
@ -915,7 +921,7 @@ class PlayerControlInteractWithLavaTest extends ActorTest {
"take continuous damage if player steps into lava" in {
assert(player1.Health == 100) //alive
player1.Position = Vector3(5,5,-3) //right in the pool
player1.zoneInteraction() //trigger
player1.zoneInteractions() //trigger
val msg_burn = avatarProbe.receiveN(3, 1 seconds)
assert(
@ -962,6 +968,8 @@ class PlayerControlInteractWithDeathTest extends ActorTest {
override def AvatarEvents = avatarProbe.ref
override def Activity = TestProbe().ref
}
zone.blockMap.addTo(player1)
zone.blockMap.addTo(pool)
player1.Zone = zone
player1.Spawn()
@ -975,7 +983,7 @@ class PlayerControlInteractWithDeathTest extends ActorTest {
"take continuous damage if player steps into a pool of death" in {
assert(player1.Health == 100) //alive
player1.Position = Vector3(5,5,-3) //right in the pool
player1.zoneInteraction() //trigger
player1.zoneInteractions() //trigger
probe.receiveOne(250 milliseconds) //wait until oplayer1's implants deinitialize
assert(player1.Health == 0) //ded