| 107 | } |
| 108 | |
| 109 | void BattleScanner::notifyMovement(Vec3<int> position) |
| 110 | { |
| 111 | static const Vec3<int> midPos = {MOTION_SCANNER_X / 2, MOTION_SCANNER_Y / 2, 0}; |
| 112 | |
| 113 | // FIXME: Fix display of big units |
| 114 | auto pos = position - lastPosition + midPos; |
| 115 | if (pos.x < 0 || pos.y < 0 || pos.x >= MOTION_SCANNER_X || pos.y >= MOTION_SCANNER_Y) |
| 116 | { |
| 117 | return; |
| 118 | } |
| 119 | version++; |
| 120 | movementTicks[pos.y * MOTION_SCANNER_X + pos.x] = TICKS_SCANNER_REMAIN_LIT; |
| 121 | } |
| 122 | } // namespace OpenApoc |