Skip to content

Commit 9efc5c2

Browse files
committed
Server: Add mp_blastradius cvar
1 parent 7cf64f3 commit 9efc5c2

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/game/server/combat.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "animation.h"
3030
#include "weapons.h"
3131
#include "func_break.h"
32+
#include "game.h"
3233

3334
extern DLL_GLOBAL Vector g_vecAttackDir;
3435
extern DLL_GLOBAL int g_iSkillLevel;
@@ -1018,6 +1019,8 @@ void RadiusDamage(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker
10181019
float flAdjustedDamage, falloff;
10191020
Vector vecSpot;
10201021

1022+
flRadius *= mp_blastradius.GetFloat();
1023+
10211024
if (flRadius)
10221025
falloff = flDamage / flRadius;
10231026
else

src/game/server/game.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ cvar_t motdfile_html = { "motdfile_html", "motd.html", FCVAR_SERVER };
6868

6969
ConVar mp_wallgauss("mp_wallgauss", "1.0", 0, "Wallgauss damage scale. 0 disables wallgauss.");
7070
ConVar mp_rpg_fix("mp_rpg_fix", "0", 0, "Fix RPG rocket exploding when firing it while moving backwards at high speed.");
71+
ConVar mp_blastradius("mp_blastradius", "1.0", 0, "Explosion radius scale.");
7172

7273
cvar_t mp_dmg_crowbar = { "mp_dmg_crowbar", "25", FCVAR_SERVER };
7374
cvar_t mp_dmg_glock = { "mp_dmg_glock", "12", FCVAR_SERVER };

src/game/server/game.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ extern ConVar mp_welcomecam_delay;
4949
extern cvar_t mp_respawn_fix;
5050
extern ConVar mp_wallgauss;
5151
extern ConVar mp_rpg_fix;
52+
extern ConVar mp_blastradius;
5253

5354
extern cvar_t mp_dmg_crowbar;
5455
extern cvar_t mp_dmg_glock;

0 commit comments

Comments
 (0)