Add a customizable decay timer to the S-Monitor
This commit is contained in:
parent
e036028948
commit
4bc810207e
4 changed files with 9 additions and 3 deletions
|
|
@ -672,8 +672,11 @@ consvar_t cv_kartinvindamage = CVAR_INIT ("kartinvindamage", "Flip-over", CV_NET
|
|||
|
||||
// How far the player must be from the cluster to roll an S-Monitor.
|
||||
static CV_PossibleValue_t smonitordist_cons_t[] = {{1, "MIN"}, {32000, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_kartsmonitordist = CVAR_INIT ("smonitordist", "17000", CV_NETVAR|CV_CHEAT|CV_GUARD, smonitordist_cons_t, NULL);
|
||||
consvar_t cv_kartsmonitor_decaydist = CVAR_INIT ("smonitor_decaydist", "2500", CV_NETVAR|CV_CHEAT|CV_GUARD, smonitordist_cons_t, NULL);
|
||||
consvar_t cv_kartsmonitordist = CVAR_INIT ("smonitor_startdist", "17000", CV_NETVAR|CV_CHEAT|CV_GUARD, smonitordist_cons_t, NULL);
|
||||
consvar_t cv_kartsmonitor_decaydist = CVAR_INIT ("smonitor_decaydist", "3600", CV_NETVAR|CV_CHEAT|CV_GUARD, smonitordist_cons_t, NULL);
|
||||
|
||||
static CV_PossibleValue_t smonitordecaytime_cons_t[] = {{1, "MIN"}, {6, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_kartsmonitor_decaytime = CVAR_INIT ("smonitor_decaytime", "2", CV_NETVAR|CV_CHEAT|CV_GUARD, smonitordecaytime_cons_t, NULL);
|
||||
|
||||
// opinionated stuff for testing balance tweaks on the shields
|
||||
consvar_t cv_kartbubble_defense_canidle = CVAR_INIT ("kartbubble_defense_canidle", "On", CV_NETVAR, CV_OnOff, NULL);
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ extern consvar_t cv_kartinvintheme;
|
|||
extern consvar_t cv_kartinvindamage;
|
||||
extern consvar_t cv_kartsmonitordist;
|
||||
extern consvar_t cv_kartsmonitor_decaydist;
|
||||
extern consvar_t cv_kartsmonitor_decaytime;
|
||||
|
||||
// opinionated stuff for testing
|
||||
extern consvar_t cv_kartbubble_defense_canidle;
|
||||
|
|
|
|||
|
|
@ -437,6 +437,7 @@ void K_RegisterKartStuff(void)
|
|||
|
||||
CV_RegisterVar(&cv_kartsmonitordist);
|
||||
CV_RegisterVar(&cv_kartsmonitor_decaydist);
|
||||
CV_RegisterVar(&cv_kartsmonitor_decaytime);
|
||||
|
||||
// experimental stuff
|
||||
CV_RegisterVar(&cv_kartbubble_defense_canidle);
|
||||
|
|
@ -7471,7 +7472,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
|
||||
// Value to subtract from the S-Monitor timer.
|
||||
INT16 smonitor_subtrahend = (pingame > 1) ? 3 : 1;
|
||||
INT16 smonitor_subtrahend = (pingame > 1) ? SMONITORDECAYTIME : 1;
|
||||
|
||||
if (player->distancefromcluster > SMONITORDECAYDIST)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ extern vector3_t clusterpoint, clusterdtf;
|
|||
// S-Monitor distance value
|
||||
#define SMONITORDIST CV_Get(&cv_kartsmonitordist)
|
||||
#define SMONITORDECAYDIST CV_Get(&cv_kartsmonitor_decaydist)
|
||||
#define SMONITORDECAYTIME CV_Get(&cv_kartsmonitor_decaytime)
|
||||
|
||||
// Precalculated constants for stacked boost diminishing
|
||||
// *Somewhat* matches old calc but doesn't use arrays, which makes it faster and more memory efficent
|
||||
|
|
|
|||
Loading…
Reference in a new issue