|
Xonotic
|
Source file that contains implementation of the Dynamic handicap mutator. More...
#include "sv_dynamic_handicap.qh"
Include dependency graph for sv_dynamic_handicap.qc:Go to the source code of this file.
Functions | |
| float | DynamicHandicap_ClampHandicap (float handicap) |
| Clamps the value of the handicap. More... | |
| void | DynamicHandicap_UpdateHandicap () |
| Updates the handicap of all players. More... | |
| MUTATOR_HOOKFUNCTION (dynamic_handicap, BuildMutatorsString) | |
| MUTATOR_HOOKFUNCTION (dynamic_handicap, BuildMutatorsPrettyString) | |
| MUTATOR_HOOKFUNCTION (dynamic_handicap, ClientDisconnect) | |
| MUTATOR_HOOKFUNCTION (dynamic_handicap, PutClientInServer) | |
| MUTATOR_HOOKFUNCTION (dynamic_handicap, MakePlayerObserver) | |
| MUTATOR_HOOKFUNCTION (dynamic_handicap, AddedPlayerScore) | |
| REGISTER_MUTATOR (dynamic_handicap, autocvar_g_dynamic_handicap) | |
Variables | |
| int | autocvar_g_dynamic_handicap |
| Whether to enable dynamic handicap. More... | |
| float | autocvar_g_dynamic_handicap_exponent |
| The exponent used to calculate handicap. More... | |
| float | autocvar_g_dynamic_handicap_max |
| The maximum value of the handicap. More... | |
| float | autocvar_g_dynamic_handicap_min |
| The minimum value of the handicap. More... | |
| float | autocvar_g_dynamic_handicap_scale |
| The scale of the handicap. More... | |
Source file that contains implementation of the Dynamic handicap mutator.
Definition in file sv_dynamic_handicap.qc.
Clamps the value of the handicap.
| [in] | handicap | Value to clamp. |
Definition at line 65 of file sv_dynamic_handicap.qc.
References autocvar_g_dynamic_handicap, autocvar_g_dynamic_handicap_max, autocvar_g_dynamic_handicap_min, and REGISTER_MUTATOR().
Referenced by DynamicHandicap_UpdateHandicap().
Here is the call graph for this function:
Here is the caller graph for this function:| void DynamicHandicap_UpdateHandicap | ( | ) |
Updates the handicap of all players.
Definition at line 32 of file sv_dynamic_handicap.qc.
References autocvar_g_dynamic_handicap_exponent, autocvar_g_dynamic_handicap_scale, DynamicHandicap_ClampHandicap(), fabs(), FOREACH_CLIENT, Handicap_SetForcedHandicap(), IS_PLAYER, and PlayerScore_Get.
Referenced by MUTATOR_HOOKFUNCTION().
Here is the call graph for this function:
Here is the caller graph for this function:| MUTATOR_HOOKFUNCTION | ( | dynamic_handicap | , |
| BuildMutatorsString | |||
| ) |
Definition at line 84 of file sv_dynamic_handicap.qc.
References M_ARGV, and strcat().
Here is the call graph for this function:| MUTATOR_HOOKFUNCTION | ( | dynamic_handicap | , |
| BuildMutatorsPrettyString | |||
| ) |
Definition at line 89 of file sv_dynamic_handicap.qc.
References M_ARGV, and strcat().
Here is the call graph for this function:| MUTATOR_HOOKFUNCTION | ( | dynamic_handicap | , |
| ClientDisconnect | |||
| ) |
Definition at line 94 of file sv_dynamic_handicap.qc.
References DynamicHandicap_UpdateHandicap().
Here is the call graph for this function:| MUTATOR_HOOKFUNCTION | ( | dynamic_handicap | , |
| PutClientInServer | |||
| ) |
Definition at line 99 of file sv_dynamic_handicap.qc.
References DynamicHandicap_UpdateHandicap().
Here is the call graph for this function:| MUTATOR_HOOKFUNCTION | ( | dynamic_handicap | , |
| MakePlayerObserver | |||
| ) |
Definition at line 104 of file sv_dynamic_handicap.qc.
References DynamicHandicap_UpdateHandicap().
Here is the call graph for this function:| MUTATOR_HOOKFUNCTION | ( | dynamic_handicap | , |
| AddedPlayerScore | |||
| ) |
Definition at line 109 of file sv_dynamic_handicap.qc.
References DynamicHandicap_UpdateHandicap(), entity(), and M_ARGV.
Here is the call graph for this function:| REGISTER_MUTATOR | ( | dynamic_handicap | , |
| autocvar_g_dynamic_handicap | |||
| ) |
| int autocvar_g_dynamic_handicap |
Whether to enable dynamic handicap.
Definition at line 10 of file sv_dynamic_handicap.qc.
Referenced by DynamicHandicap_ClampHandicap().
| float autocvar_g_dynamic_handicap_exponent |
The exponent used to calculate handicap.
1 means linear scale. Values more than 1 mean stronger non-linear handicap. Values less than 1 mean weaker non-linear handicap.
Definition at line 17 of file sv_dynamic_handicap.qc.
Referenced by DynamicHandicap_UpdateHandicap().
| float autocvar_g_dynamic_handicap_max |
The maximum value of the handicap.
Definition at line 19 of file sv_dynamic_handicap.qc.
Referenced by DynamicHandicap_ClampHandicap().
| float autocvar_g_dynamic_handicap_min |
The minimum value of the handicap.
Definition at line 18 of file sv_dynamic_handicap.qc.
Referenced by DynamicHandicap_ClampHandicap().
| float autocvar_g_dynamic_handicap_scale |
The scale of the handicap.
Larger values mean more penalties for strong players and more buffs for weak players.
Definition at line 13 of file sv_dynamic_handicap.qc.
Referenced by DynamicHandicap_UpdateHandicap().