Invincibility damage toggle, bring back S-Monitor's distance check
This commit is contained in:
parent
fb6066dea9
commit
e036028948
5 changed files with 33 additions and 7 deletions
|
|
@ -664,9 +664,16 @@ consvar_t cv_kartaltshrinktime = CVAR_INIT ("kartaltshrinktime", "14", CV_NETVAR
|
|||
static CV_PossibleValue_t kartinvintheme_cons_t[] = {{0, "Standard"}, {1, "Full"}, {0, NULL}};
|
||||
consvar_t cv_kartinvintheme = CVAR_INIT ("kartinvintheme", "Standard", CV_SAVE, kartinvintheme_cons_t, NULL);
|
||||
|
||||
// Invincibility damage toggles
|
||||
static CV_PossibleValue_t kartinvindmg_cons_t[] = {{0, "None"}, {DMG_WIPEOUT, "Wipe-out"}, {DMG_FLIPOVER, "Flip-over"}, {0, NULL}};
|
||||
|
||||
// Experiment: Let's default to flip-over for now.
|
||||
consvar_t cv_kartinvindamage = CVAR_INIT ("kartinvindamage", "Flip-over", CV_NETVAR|CV_CHEAT|CV_GUARD, kartinvindmg_cons_t, NULL);
|
||||
|
||||
// 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);
|
||||
|
||||
// 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);
|
||||
|
|
|
|||
|
|
@ -212,7 +212,9 @@ extern consvar_t cv_kartexplosion_limitlifetime_cap;
|
|||
extern consvar_t cv_kartslipdash;
|
||||
extern consvar_t cv_kartslopeboost;
|
||||
extern consvar_t cv_kartinvintheme;
|
||||
extern consvar_t cv_kartinvindamage;
|
||||
extern consvar_t cv_kartsmonitordist;
|
||||
extern consvar_t cv_kartsmonitor_decaydist;
|
||||
|
||||
// opinionated stuff for testing
|
||||
extern consvar_t cv_kartbubble_defense_canidle;
|
||||
|
|
|
|||
|
|
@ -968,10 +968,13 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
|||
boolean t1Condition = false;
|
||||
boolean t2Condition = false;
|
||||
|
||||
t1Condition = (t1->player->invincibilitytimer > 0);
|
||||
t2Condition = (t2->player->invincibilitytimer > 0);
|
||||
UINT8 invindamage = INVINDAMAGE;
|
||||
|
||||
UINT8 invindamage = DMG_WIPEOUT; // TODO: make this a cvar value
|
||||
if (invindamage)
|
||||
{
|
||||
t1Condition = (t1->player->invincibilitytimer > 0);
|
||||
t2Condition = (t2->player->invincibilitytimer > 0);
|
||||
}
|
||||
|
||||
if ((t1Condition == true || flameT1 == true) && (t2Condition == true || flameT2 == true))
|
||||
{
|
||||
|
|
|
|||
18
src/k_kart.c
18
src/k_kart.c
|
|
@ -432,9 +432,11 @@ void K_RegisterKartStuff(void)
|
|||
|
||||
CV_RegisterVar(&cv_kartaltshrinktime);
|
||||
|
||||
CV_RegisterVar(&cv_kartinvindamage);
|
||||
CV_RegisterVar(&cv_kartinvintheme);
|
||||
|
||||
CV_RegisterVar(&cv_kartsmonitordist);
|
||||
CV_RegisterVar(&cv_kartsmonitor_decaydist);
|
||||
|
||||
// experimental stuff
|
||||
CV_RegisterVar(&cv_kartbubble_defense_canidle);
|
||||
|
|
@ -7469,12 +7471,20 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
|
||||
// Value to subtract from the S-Monitor timer.
|
||||
INT16 smonitor_subtrahend = (pingame > 1) ? 2 : 1;
|
||||
INT16 smonitor_subtrahend = (pingame > 1) ? 3 : 1;
|
||||
|
||||
if ((player->distancefromcluster > 0) && (!player->smonitorexpiring) && (pingame > 1))
|
||||
if (player->distancefromcluster > SMONITORDECAYDIST)
|
||||
{
|
||||
// Don't subtract shit until we get past the cluster player.
|
||||
smonitor_subtrahend = 0;
|
||||
if ((!player->smonitorexpiring) && (pingame > 1))
|
||||
{
|
||||
// Don't subtract shit until we get near or past the cluster player.
|
||||
smonitor_subtrahend = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Getting close; expire the timer!
|
||||
player->smonitorexpiring = 1;
|
||||
}
|
||||
|
||||
player->smonitortimer = (UINT16)(max(
|
||||
|
|
|
|||
|
|
@ -85,8 +85,12 @@ extern vector3_t clusterpoint, clusterdtf;
|
|||
// Bump weight for a Bubble Shield
|
||||
#define BUBBLEMINWEIGHT (5 * FRACUNIT)
|
||||
|
||||
// Invincibility damage value
|
||||
#define INVINDAMAGE CV_Get(&cv_kartinvindamage)
|
||||
|
||||
// S-Monitor distance value
|
||||
#define SMONITORDIST CV_Get(&cv_kartsmonitordist)
|
||||
#define SMONITORDECAYDIST CV_Get(&cv_kartsmonitor_decaydist)
|
||||
|
||||
// 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