Differential D4599 Diff 20093 binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
Show First 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | |||||
TS_ASSERT_EQUALS(height, 5); | TS_ASSERT_EQUALS(height, 5); | ||||
cmpUnitMotionFlying.OnUpdate({ "turnLength": 0 }); | cmpUnitMotionFlying.OnUpdate({ "turnLength": 0 }); | ||||
TS_ASSERT_EQUALS(cmpUnitMotionFlying.GetCurrentSpeed(), 0); | TS_ASSERT_EQUALS(cmpUnitMotionFlying.GetCurrentSpeed(), 0); | ||||
TS_ASSERT_EQUALS(height, 5); | TS_ASSERT_EQUALS(height, 5); | ||||
cmpUnitMotionFlying.OnUpdate({ "turnLength": 900 }); | cmpUnitMotionFlying.OnUpdate({ "turnLength": 900 }); | ||||
TS_ASSERT_EQUALS(cmpUnitMotionFlying.GetCurrentSpeed(), 0); | TS_ASSERT_EQUALS(cmpUnitMotionFlying.GetCurrentSpeed(), 0); | ||||
TS_ASSERT_EQUALS(height, 5); | TS_ASSERT_EQUALS(height, 5); | ||||
TS_ASSERT_EQUALS(cmpUnitMotionFlying.GetPassabilityClassName(), "unrestricted"); | |||||
const newPassabilityClass = "newClass"; | |||||
cmpUnitMotionFlying.SetPassabilityClassName(newPassabilityClass); | |||||
TS_ASSERT_EQUALS(cmpUnitMotionFlying.GetPassabilityClassName(), newPassabilityClass); | |||||
Freagarach: This looks bad. It means that `UnitMotionFlying` behaves differently than `UnitMotion` in this… |
Wildfire Games · Phabricator
This looks bad. It means that UnitMotionFlying behaves differently than UnitMotion in this case.
(The former will default back to the template, whilst the latter will error.)