Skip to content

Commit

Permalink
Merge pull request #1296 from BeakMeister/configurable-gren-lockout
Browse files Browse the repository at this point in the history
Configurable gren lockout
  • Loading branch information
drzel authored Jan 28, 2024
2 parents a52b04e + baa12ca commit 2659b75
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ sound files are found in `fortress/sound/hitaudio/` and `fortress/sound/announc
* localinfo server_sbflaginfo : 0 - disables sbar flaginfo, 1 enables it [default: 1]
* localinfo reverse_cap : 0 - normal gameplay, 1: you have to take your flag and capture in the enemy base [default: 0]
* localinfo engineer_move / em : 0 - normal gameplay, 1: engineers can move while building [default: 1]
* localinfo grenade_lockout / gl : Time in seconds grenade throw is locked out [default: 0.1]
* localinfo round_delay_time : interval time between rounds in quadmode - seconds [default: 30]
* localinfo max_gren2_soldier : maximum number of active nail/shock grenades (TF 2.8 = 3, OzTF = 1) [default: 3]
* localinfo distance_based_cuss_duration : on/off - enables cuss duration to be proportional to the distance from the explosion [default: off]
Expand Down
1 change: 1 addition & 0 deletions ssqc/client.qc
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@ void () DecodeLevelParms = {
}

engineer_move = CF_GetSetting("em","engineer_move", "1");
grenade_lockout = CF_GetSetting("gl","grenade_lockout", "0.1");

max_active_gren2_soldier = CF_GetSetting("mg2s","max_active_gren2_soldier", "3");

Expand Down
1 change: 1 addition & 0 deletions ssqc/qw.qc
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ float deathammo_cells;
//float server_sbflaginfo;
float reverse_cap;
float engineer_move;
float grenade_lockout;

float fo_projectiles;

Expand Down
4 changes: 2 additions & 2 deletions ssqc/tfort.qc
Original file line number Diff line number Diff line change
Expand Up @@ -922,11 +922,11 @@ void () FO_GrenadeThink = {
void () FO_ThrowGrenade = {
entity timer = self.grenade_timer;

float throwtime = time, lockout = 0.1;
float throwtime = time;
if (RewindFlagEnabled(REWIND_GRENADES))
throwtime = bounded_remote_time(FO_RewindGrenDt(timer.fpp.gren_type));

if ((timer.nextthink < timer.heat || throwtime > timer.heat - lockout) &&
if ((timer.nextthink < timer.heat || throwtime > timer.heat - grenade_lockout) &&
!IsClownMode(CLOWN_SPAM_GRENADES)) {
// We do not allow throwing within the 0.8s, or the last 0.1s.
// The former is a priming time, the latter is so that client side
Expand Down

0 comments on commit 2659b75

Please sign in to comment.