GetCrouchFactor

From ZDoom Wiki
Jump to navigation Jump to search

float GetCrouchFactor (int ptr)

Usage

Gets the crouch multiplier for the height of an actor. This is meaningless to actors that are not players.

Note that this function is to be used where an expression is expected. It is mostly useful when combined with A_JumpIf or Anonymous Functions.

Parameters

  • ptr: The pointer to check.

Return value

Returns 1 for actors that are not players, or players not crouching. A value of 0.5, for example, indicates a player is crouching.

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.