Flame Shield improvin's

This commit is contained in:
Sally Cochenour 2020-03-22 22:01:40 -04:00
parent ec7528a333
commit 227a4dcbd3
2 changed files with 18 additions and 5 deletions

View file

@ -7068,6 +7068,7 @@ void K_StripOther(player_t *player)
static INT32 K_FlameShieldMax(player_t *player) static INT32 K_FlameShieldMax(player_t *player)
{ {
UINT32 disttofinish = 0;
UINT8 numplayers = 0; UINT8 numplayers = 0;
UINT8 i; UINT8 i;
@ -7075,14 +7076,22 @@ static INT32 K_FlameShieldMax(player_t *player)
{ {
if (playeringame[i] && !players[i].spectator) if (playeringame[i] && !players[i].spectator)
numplayers++; numplayers++;
if (players[i].kartstuff[k_position] == 1)
disttofinish = players[i].distancetofinish;
} }
if (numplayers <= 1) if (numplayers <= 1)
{
return 16; // max when alone, for testing return 16; // max when alone, for testing
}
else if (player->kartstuff[k_position] == 1) else if (player->kartstuff[k_position] == 1)
return 1; // minimum for first {
else return 0; // minimum for first
return (player->kartstuff[k_position] * 16) / numplayers; }
disttofinish = player->distancetofinish - disttofinish;
return 1 + (disttofinish / (DISTVAR*2));
} }
// //
@ -7588,7 +7597,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (player->kartstuff[k_flamemeter] > flamemax) if (player->kartstuff[k_flamemeter] > flamemax)
{ {
K_FlameShieldPop(player->mo); K_FlameShieldPop(player->mo);
P_Thrust(player->mo, R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy), player->speed); P_Thrust(
player->mo,
R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy),
20 * K_GetKartGameSpeedScalar(gamespeed)
);
player->kartstuff[k_flamemeter] = 0; player->kartstuff[k_flamemeter] = 0;
player->kartstuff[k_flamelength] = 0; player->kartstuff[k_flamelength] = 0;
player->kartstuff[k_holdready] = 0; player->kartstuff[k_holdready] = 0;

View file

@ -413,7 +413,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"s3k40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"s3k40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Thunder Shield spawned {"s3k41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Thunder Shield spawned
{"s3k42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"s3k42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"s3k43", false, 96, 48, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k44", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Bubble Shield reflect {"s3k44", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Bubble Shield reflect
{"s3k45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"s3k45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"s3k46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},