]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/handicap.qh
Merge branch 'master' into Lyberta/RandomStartWeapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / handicap.qh
1 #pragma once
2
3 /// \file
4 /// \brief Header file that describes the handicap system.
5 /// \author Lyberta
6 /// \copyright GNU GPLv2 or any later version.
7
8 // Handicap is used to make the game harder for strong players and easier for
9 // weak players. Values greater than 1 make the game harder and values less than
10 // 1 make the game easier. Right now handicap only affects damage. There are 2
11 // types of handicap: voluntary and forced. Voluntary handicap can be set via
12 // cl_handicap cvar. For obvious reasons, it can't be less than 1. Forced
13 // handicap can be set by server mutators. The total handicap is the product of
14 // voluntary and forced handicap.
15
16 /// \brief Initializes handicap to its default value.
17 /// \param[in,out] player Player to initialize.
18 /// \return No return.
19 void Handicap_Initialize(entity player);
20
21 /// \brief Returns the voluntary handicap of the player.
22 /// \param[in] player Player to check.
23 /// \return Voluntary handicap of the player.
24 float Handicap_GetVoluntaryHandicap(entity player);
25
26 /// \brief Returns the forced handicap of the player.
27 /// \param[in] player Player to check.
28 /// \return Forced handicap of the player.
29 float Handicap_GetForcedHandicap(entity player);
30
31 /// \brief Sets the forced handicap of the player.
32 /// \param[in] player Player to alter.
33 /// \param[in] value Handicap value to set.
34 /// \return No return.
35 void Handicap_SetForcedHandicap(entity player, float value);
36
37 /// \brief Returns the total handicap of the player.
38 /// \param[in] player Player to check.
39 /// \return Total handicap of the player.
40 float Handicap_GetTotalHandicap(entity player);