0x0046FC83
| 12 | |
| 13 | // 0x0046FC83 |
| 14 | void EntityBase::moveTo(const World::Pos3& loc) |
| 15 | { |
| 16 | // Pre invalidation. |
| 17 | if (position.x != Location::null) |
| 18 | { |
| 19 | invalidateSprite(); |
| 20 | } |
| 21 | |
| 22 | EntityManager::moveSpatialEntry(*this, loc); |
| 23 | |
| 24 | // Update position |
| 25 | position = loc; |
| 26 | |
| 27 | // Update sprite boundaries |
| 28 | if (position.x == Location::null) |
| 29 | { |
| 30 | spriteLeft = Location::null; |
| 31 | return; |
| 32 | } |
| 33 | |
| 34 | const auto vpPos = World::gameToScreen(loc, Ui::WindowManager::getCurrentRotation()); |
| 35 | spriteLeft = vpPos.x - spriteWidth; |
| 36 | spriteRight = vpPos.x + spriteWidth; |
| 37 | spriteTop = vpPos.y - spriteHeightNegative; |
| 38 | spriteBottom = vpPos.y + spriteHeightPositive; |
| 39 | |
| 40 | // Post invalidation. |
| 41 | invalidateSprite(); |
| 42 | } |
| 43 | |
| 44 | // 0x004CBB01 |
| 45 | void EntityBase::invalidateSprite() |
no test coverage detected