Upper Body Angle (#292)

* constrain angles on specialized yaw and pitch fields

* integrated new Angular Codec into OCM and OCDM of avatar; corrected tests; wrote shortcut for whether a unit is moving (under its own power)

* apply clamp

* Accessed containers while moving

Removed unintentional code duplication outside of conditional.
This commit is contained in:
Fate-JH 2019-11-29 11:14:25 -05:00 committed by GitHub
parent 9e99dc75e3
commit a5a85e6cc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 209 additions and 108 deletions

View file

@ -66,7 +66,7 @@ class PlayerStateMessageTest extends Specification {
vel.get.y mustEqual 6.5625f
vel.get.z mustEqual 0.0f
facingYaw mustEqual 22.5f
facingPitch mustEqual 348.75f
facingPitch mustEqual -11.25f
facingUpper mustEqual 0f
unk1 mustEqual 165
crouching mustEqual false
@ -105,7 +105,7 @@ class PlayerStateMessageTest extends Specification {
PlanetSideGUID(1696),
Vector3(4008.6016f, 5987.6016f, 44.1875f),
Some(Vector3(2.53125f, 6.5625f, 0f)),
22.5f, 348.75f, 0f, 165,
22.5f, -11.25f, 0f, 165,
false, false, false, false)
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string_vel