MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getNextDestination

Method getNextDestination

game/state/city/agentmission.cpp:278–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278bool AgentMission::getNextDestination(GameState &state, Agent &a, Vec3<float> &destPos)
279{
280 if (cancelled)
281 {
282 return false;
283 }
284 switch (this->type)
285 {
286 case MissionType::GotoBuilding:
287 case MissionType::InvestigateBuilding:
288 {
289 return advanceAlongPath(state, a, destPos);
290 }
291 case MissionType::Snooze:
292 case MissionType::RestartNextMission:
293 case MissionType::AwaitPickup:
294 {
295 return false;
296 }
297 default:
298 LogWarning("TODO: Implement getNextDestination");
299 return false;
300 }
301 return false;
302}
303
304void AgentMission::update(GameState &state, Agent &a, unsigned int ticks, bool finished)
305{

Callers 2

getNewGoalMethod · 0.45
getNewGoalMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected