|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
Header file that describes the handicap system. More...
#include <common/mapinfo.qh>#include <common/gametypes/gametype/cts/cts.qh>#include <common/gametypes/gametype/race/race.qh>Go to the source code of this file.
Macros | |
| #define | HANDICAP_DISABLED() |
| #define | HANDICAP_MAX_LEVEL_EQUIVALENT 2.0 |
Functions | |
| float | Handicap_GetForcedHandicap (entity player, bool receiving) |
| Returns the forced handicap of the player. | |
| float | Handicap_GetTotalHandicap (entity player, bool receiving) |
| Returns the total handicap of the player. | |
| float | Handicap_GetVoluntaryHandicap (entity player, bool receiving) |
| Returns the voluntary handicap of the player. | |
| void | Handicap_Initialize (entity player) |
| Initializes handicap to its default value. | |
| void | Handicap_SetForcedHandicap (entity player, float value, bool receiving) |
| Sets the forced handicap of the player. | |
| void | Handicap_UpdateHandicapLevel (entity player) |
| Updates .handicap_level for the player. | |
Variables | |
| float | handicap_avg_given_sum |
| float | handicap_avg_taken_sum |
| int | handicap_level |
Header file that describes the handicap system.
Definition in file handicap.qh.
| #define HANDICAP_DISABLED | ( | ) |
Definition at line 57 of file handicap.qh.
Referenced by Handicap_GetForcedHandicap(), Handicap_GetTotalHandicap(), Handicap_GetVoluntaryHandicap(), Handicap_SetForcedHandicap(), and Handicap_UpdateHandicapLevel().
| #define HANDICAP_MAX_LEVEL_EQUIVALENT 2.0 |
Definition at line 66 of file handicap.qh.
Referenced by Handicap_UpdateHandicapLevel().
Returns the forced handicap of the player.
| [in] | player | Player to check. |
| [in] | receiving | Whether handicap is for receiving or dealing. |
Definition at line 71 of file handicap.qc.
References CS(), entity(), and HANDICAP_DISABLED.
Referenced by Handicap_GetTotalHandicap().
Returns the total handicap of the player.
| [in] | player | Player to check. |
| [in] | receiving | Whether handicap is for receiving or dealing. |
Definition at line 96 of file handicap.qc.
References entity(), HANDICAP_DISABLED, Handicap_GetForcedHandicap(), and Handicap_GetVoluntaryHandicap().
Referenced by Handicap_UpdateHandicapLevel(), PlayerDamage(), and PlayerFrame().
Returns the voluntary handicap of the player.
| [in] | player | Player to check. |
| [in] | receiving | Whether handicap is for receiving or dealing. |
Definition at line 25 of file handicap.qc.
References bound(), CS_CVAR, entity(), and HANDICAP_DISABLED.
Referenced by Handicap_GetTotalHandicap().
Initializes handicap to its default value.
| [in,out] | player | Player to initialize. |
Definition at line 16 of file handicap.qc.
References CS(), entity(), and Handicap_UpdateHandicapLevel().
Referenced by ClientConnect().
Sets the forced handicap of the player.
| [in] | player | Player to alter. |
| [in] | value | Handicap value to set. |
| [in] | receiving | Whether handicap is for receiving or dealing. |
Definition at line 81 of file handicap.qc.
References CS(), entity(), error, HANDICAP_DISABLED, and Handicap_UpdateHandicapLevel().
Referenced by DynamicHandicap_UpdateHandicap().
Updates .handicap_level for the player.
| [in] | player | Player to check. |
Definition at line 104 of file handicap.qc.
References entity(), floor(), HANDICAP_DISABLED, Handicap_GetTotalHandicap(), HANDICAP_MAX_LEVEL_EQUIVALENT, and map_bound_ranges().
Referenced by Handicap_Initialize(), Handicap_SetForcedHandicap(), REPLICATE_APPLYCHANGE(), and REPLICATE_APPLYCHANGE().
| float handicap_avg_given_sum |
Definition at line 71 of file handicap.qh.
Referenced by PlayerFrame().
| float handicap_avg_taken_sum |
Definition at line 72 of file handicap.qh.
Referenced by PlayerFrame().
| int handicap_level |
Definition at line 64 of file handicap.qh.