GetCrouchFactor

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

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.
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.