| 135 | }; |
| 136 | |
| 137 | TEST_F(CTestGameWorld, ClosestCharacter) |
| 138 | { |
| 139 | CNetObj_PlayerInput Input = {}; |
| 140 | CCharacter *pChr1 = new(0) CCharacter(&GameServer()->m_World, Input); |
| 141 | pChr1->m_Pos = vec2(0, 0); |
| 142 | GameServer()->m_World.InsertEntity(pChr1); |
| 143 | |
| 144 | CCharacter *pChr2 = new(1) CCharacter(&GameServer()->m_World, Input); |
| 145 | pChr2->m_Pos = vec2(10, 10); |
| 146 | GameServer()->m_World.InsertEntity(pChr2); |
| 147 | |
| 148 | CCharacter *pClosest = GameServer()->m_World.ClosestCharacter(vec2(1, 1), 20, nullptr); |
| 149 | EXPECT_EQ(pClosest, pChr1); |
| 150 | } |
| 151 | |
| 152 | TEST_F(CTestGameWorld, IntersectEntity) |
| 153 | { |
nothing calls this directly
no test coverage detected