| 178 | } |
| 179 | |
| 180 | void AgentAssignment::setLocation(sp<Agent> agent) |
| 181 | { |
| 182 | this->agent = agent; |
| 183 | this->vehicle = agent->currentVehicle; |
| 184 | this->building = agent->currentBuilding; |
| 185 | |
| 186 | if (agent->currentVehicle && agent->currentVehicle->currentBuilding) |
| 187 | { |
| 188 | this->building = agent->currentVehicle->currentBuilding; |
| 189 | } |
| 190 | |
| 191 | updateLocation(); |
| 192 | } |
| 193 | |
| 194 | void AgentAssignment::setLocation(sp<Vehicle> vehicle) |
| 195 | { |