CheckMissileSpawn

From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.


bool CheckMissileSpawn(double maxdist)

Usage

Slightly shifts the missile forward in the direction of its velocity and checks if the missile is in a valid spot after doing so. Also handles randomizing the duration of the first state. Explodes the missile if the spot is invalid. Usually called immediately after spawning a missile.

Parameters

  • maxdist - The maximum distance the missile is allowed to move forward from its current position. If 0 it won't move at all. Cannot be greater than half the velocity of the missile.

Return value

Returns true if the missile was in a valid spot.

Examples

Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.