MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / move

Method move

src/Savegame/MovingTarget.cpp:188–204  ·  view source on GitHub ↗

* Executes a movement cycle for the moving target. */

Source from the content-addressed store, hash-verified

186 * Executes a movement cycle for the moving target.
187 */
188void MovingTarget::move()
189{
190 calculateSpeed();
191 if (_dest != 0)
192 {
193 if (getDistance(_dest) > _speedRadian)
194 {
195 setLongitude(_lon + _speedLon);
196 setLatitude(_lat + _speedLat);
197 }
198 else
199 {
200 setLongitude(_dest->getLongitude());
201 setLatitude(_dest->getLatitude());
202 }
203 }
204}
205
206}

Callers

nothing calls this directly

Calls 2

getLongitudeMethod · 0.45
getLatitudeMethod · 0.45

Tested by

no test coverage detected