| 328 | } |
| 329 | |
| 330 | void Agent::enterBuilding(GameState &state, StateRef<Building> b) |
| 331 | { |
| 332 | if (currentVehicle) |
| 333 | { |
| 334 | currentVehicle->currentAgents.erase({&state, shared_from_this()}); |
| 335 | currentVehicle = nullptr; |
| 336 | } |
| 337 | currentBuilding = b; |
| 338 | currentBuilding->currentAgents.insert({&state, shared_from_this()}); |
| 339 | position = (Vec3<float>)b->crewQuarters + Vec3<float>{0.5f, 0.5f, 0.5f}; |
| 340 | goalPosition = position; |
| 341 | } |
| 342 | |
| 343 | void Agent::enterVehicle(GameState &state, StateRef<Vehicle> v) |
| 344 | { |
no test coverage detected