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

Method think

src/Geoscape/DogfightState.cpp:571–590  ·  view source on GitHub ↗

* Runs the dogfighter timers. */

Source from the content-addressed store, hash-verified

569 * Runs the dogfighter timers.
570 */
571void DogfightState::think()
572{
573 if(!_endDogfight)
574 {
575 _moveTimer->think(this, 0);
576 if(!_endDogfight && !_minimized) // check _endDogfight again, because moveTimer can change it
577 {
578 _animTimer->think(this, 0);
579 _w1Timer->think(this, 0);
580 _w2Timer->think(this, 0);
581 _ufoWtimer->think(this, 0);
582 _ufoEscapeTimer->think(this, 0);
583 _craftDamageAnimTimer->think(this, 0);
584 }
585 else if(!_endDogfight && (_craft->getDestination() != _ufo || _ufo->getStatus() == Ufo::LANDED))
586 {
587 endDogfight();
588 }
589 }
590}
591
592/**
593 * Animates interceptor damage by changing the color and redrawing the image.

Callers

nothing calls this directly

Calls 2

getDestinationMethod · 0.80
getStatusMethod · 0.45

Tested by

no test coverage detected