Maxes and Turrets Fixes (#237)

* modified DCData to account for Max suit encoding; modified converters for the avatar that would make use of DCData changes; corrections to enforce that Max/ex-Max always has correct hand showing

* separating initialization-time random GUID assignments from initialization-time fixed GUID assignments by performing them all later
This commit is contained in:
Fate-JH 2018-11-21 20:00:33 -05:00 committed by GitHub
parent 5a67fcd88d
commit 7588166ac0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 452 additions and 28 deletions

View file

@ -1460,17 +1460,17 @@ class WorldSessionActor extends Actor with MDCContextAware {
}
else {
//remove potential MAX weapon
tplayer.DrawnSlot = Player.HandsDownSlot
sendResponse(ObjectHeldMessage(tplayer.GUID, Player.HandsDownSlot, true))
val normalWeapons = if(originalSuit == ExoSuitType.MAX) {
val (maxWeapons, normalWeapons) = beforeHolsters.partition(elem => elem.obj.Size == EquipmentSize.Max)
maxWeapons.foreach(entry => {
taskResolver ! GUIDTask.UnregisterEquipment(entry.obj)(continent.GUID)
})
avatarService ! AvatarServiceMessage(player.Continent, AvatarAction.ObjectHeld(player.GUID, player.LastDrawnSlot))
normalWeapons
}
else {
tplayer.DrawnSlot = Player.HandsDownSlot
sendResponse(ObjectHeldMessage(tplayer.GUID, Player.HandsDownSlot, true))
avatarService ! AvatarServiceMessage(tplayer.Continent, AvatarAction.ObjectHeld(tplayer.GUID, Player.HandsDownSlot))
beforeHolsters
}
//fill holsters
@ -2879,7 +2879,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
//we're driving the vehicle
player.Position = pos //convenient
if(seat.ControlledWeapon.isEmpty) {
player.Orientation = Vector3(0f, 0f, ang.z) //convenient
player.Orientation = Vector3.z(ang.z) //convenient
}
obj.Position = pos
obj.Orientation = ang

View file

@ -476,6 +476,7 @@ class PacketCodingActorITest extends ActorTest {
100, 100,
50,
100, 100,
None,
List(CertificationType.StandardAssault, CertificationType.MediumAssault, CertificationType.ATV, CertificationType.Harasser, CertificationType.StandardExoSuit, CertificationType.AgileExoSuit, CertificationType.ReinforcedExoSuit),
List(),
List(),
@ -601,6 +602,7 @@ class PacketCodingActorKTest extends ActorTest {
50,
32831L,
100, 100,
None,
0, 0, 0L,
List(0, 0, 0, 0, 0, 0),
List(