Differential D3091 Diff 13906 ps/trunk/source/simulation2/components/tests/test_ObstructionManager.h
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/components/tests/test_ObstructionManager.h
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | void setUp() | ||||
ent2g = ent1g1; | ent2g = ent1g1; | ||||
ent3 = 3; | ent3 = 3; | ||||
ent3c = fixed::FromFloat(3); | ent3c = fixed::FromFloat(3); | ||||
ent3x = ent2x; | ent3x = ent2x; | ||||
ent3z = ent2z + ent2c + ent3c; // ensure it just touches the border of ent2 | ent3z = ent2z + ent2c + ent3c; // ensure it just touches the border of ent2 | ||||
ent3g = ent3; | ent3g = ent3; | ||||
testHelper = new ComponentTestHelper(g_ScriptRuntime); | testHelper = new ComponentTestHelper(g_ScriptContext); | ||||
cmp = testHelper->Add<ICmpObstructionManager>(CID_ObstructionManager, "", SYSTEM_ENTITY); | cmp = testHelper->Add<ICmpObstructionManager>(CID_ObstructionManager, "", SYSTEM_ENTITY); | ||||
cmp->SetBounds(fixed::FromInt(0), fixed::FromInt(0), fixed::FromInt(1000), fixed::FromInt(1000)); | cmp->SetBounds(fixed::FromInt(0), fixed::FromInt(0), fixed::FromInt(1000), fixed::FromInt(1000)); | ||||
shape1 = cmp->AddStaticShape(ent1, ent1x, ent1z, ent1a, ent1w, ent1h, | shape1 = cmp->AddStaticShape(ent1, ent1x, ent1z, ent1a, ent1w, ent1h, | ||||
ICmpObstructionManager::FLAG_BLOCK_CONSTRUCTION | | ICmpObstructionManager::FLAG_BLOCK_CONSTRUCTION | | ||||
ICmpObstructionManager::FLAG_BLOCK_MOVEMENT | | ICmpObstructionManager::FLAG_BLOCK_MOVEMENT | | ||||
ICmpObstructionManager::FLAG_MOVING, ent1g1, ent1g2); | ICmpObstructionManager::FLAG_MOVING, ent1g1, ent1g2); | ||||
▲ Show 20 Lines • Show All 479 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator