Recover retained route state and complete PostLoad availability tails
This commit is contained in:
1 parent
1dddfefc68
commit
9ad5a8ef6b
36 files changed
+1559
-32
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""Guard body-vector owners and their initialization/physics consumers."""
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / 'tools/binary'))
|
||||
from retained_player_body import collect
|
||||
|
||||
|
||||
class RetainedBodyTests(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.report = collect(ROOT.parent / 'Original')
|
||||
|
||||
def test_authored_body_vectors_reapplied_in_init(self):
|
||||
targets = {x['name']: x['target'] for x in self.report['tables']}
|
||||
self.assertEqual(targets['live velocity'], '0x471f70')
|
||||
self.assertEqual(targets['physics velocity'], '0x471f10')
|
||||
self.assertEqual(targets['live impulse'], '0x471cc0')
|
||||
self.assertEqual(targets['physics impulse'], '0x471c60')
|
||||
|
||||
def test_preparation_has_its_own_velocity_reset_boundary(self):
|
||||
sites = {x['name']: x['bytes'] for x in self.report['sites']}
|
||||
self.assertEqual(sites['prepare_velocity_xyz'], '6a006a006a008bceff90c4020000')
|
||||
self.assertEqual(sites['prepare_speed_clear'], 'c7860806000000000000')
|
||||
self.assertEqual(sites['postload_prepare'], 'ff9010040000')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user