diff options
author | Petr Pudlak <petr.mvd@gmail.com> | 2014-08-16 14:26:16 +0200 |
---|---|---|
committer | Petr Pudlak <petr.mvd@gmail.com> | 2014-08-16 14:26:16 +0200 |
commit | 8816244ec329acdd5eb64e0518e69ae77df1cd75 (patch) | |
tree | c7a7614c537a79b29452695c94ee7597b69e7993 /src/game/g_main.c | |
parent | fc765f5f146627d282b4374dd0c575895d64a900 (diff) |
Add the ability for humans to heal their team members
The medkit handling is moved to a new function G_UseMedkit.
If there is a human within a given range that is either more wounded
than the player, or poisoned, the medkit is applied to him
(see G_NeedsMedkit).
The range and the breadth of the action is configurable by cvars.
The original patch was used on a server, but this port wasn't tested
(only that it compiles).
Diffstat (limited to 'src/game/g_main.c')
-rw-r--r-- | src/game/g_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c index 45f7b03..c644bdd 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -86,6 +86,8 @@ vmCvar_t g_suddenDeathVotePercent; vmCvar_t g_suddenDeathVoteDelay; vmCvar_t g_armageddonVotePercent; vmCvar_t g_armageddonPercent; +vmCvar_t g_humanMedkitRange; +vmCvar_t g_humanMedkitWidth; vmCvar_t g_readyPercent; vmCvar_t g_teamForceBalance; vmCvar_t g_smoothClients; @@ -217,6 +219,8 @@ static cvarTable_t gameCvarTable[ ] = { &g_maxclients, "sv_maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH | CVAR_ARCHIVE, 0, qfalse }, { &g_maxGameClients, "g_maxGameClients", "0", CVAR_SERVERINFO | CVAR_ARCHIVE, 0, qfalse }, { &g_timelimit, "timelimit", "0", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue }, + { &g_humanMedkitRange, "g_humanMedkitRange", "200", CVAR_ARCHIVE, 0, qfalse }, + { &g_humanMedkitWidth, "g_humanMedkitWidth", "20", CVAR_ARCHIVE, 0, qfalse }, { &g_suddenDeathTime, "g_suddenDeathTime", "40", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue }, { &g_armageddonTimeStep, "g_armageddonTimeStep", "5", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue }, { &g_armageddonInitialTimeStep, "g_armageddonInitialTimeStep", "10", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue }, |