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

Method move

src/Battlescape/Projectile.cpp:331–343  ·  view source on GitHub ↗

* Moves further in the trajectory. * @return false if the trajectory is finished - no new position exists in the trajectory. */

Source from the content-addressed store, hash-verified

329 * @return false if the trajectory is finished - no new position exists in the trajectory.
330 */
331bool Projectile::move()
332{
333 for (int i = 0; i < _speed; ++i)
334 {
335 _position++;
336 if (_position == _trajectory.size())
337 {
338 _position--;
339 return false;
340 }
341 }
342 return true;
343}
344
345/**
346 * Gets the current position in voxel space.

Callers 1

thinkMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected