Revert "Fix grow and invin color sticking with previous commit"
This reverts commit a8a5392304.
This commit is contained in:
parent
ee60ffb938
commit
ab9368a15b
7 changed files with 21 additions and 38 deletions
|
|
@ -1901,7 +1901,7 @@ static void SendNameAndColor(UINT8 n)
|
|||
|
||||
player->skincolor = cv_playercolor[n].value;
|
||||
|
||||
K_KartResetPlayerColor(player, true);
|
||||
K_KartResetPlayerColor(player);
|
||||
|
||||
// Update follower for local games:
|
||||
if (cv_follower[n].value >= -1)
|
||||
|
|
|
|||
33
src/k_kart.c
33
src/k_kart.c
|
|
@ -3453,7 +3453,7 @@ void K_RemoveGrowShrink(player_t *player)
|
|||
else if (player->growshrinktimer < 0) // Play Grow noise
|
||||
S_StartSound(player->mo, sfx_kc5a);
|
||||
|
||||
K_KartResetPlayerColor(player, true);
|
||||
K_KartResetPlayerColor(player);
|
||||
|
||||
player->mo->scalespeed = mapobjectscale/TICRATE;
|
||||
player->mo->destscale = mapobjectscale;
|
||||
|
|
@ -7319,9 +7319,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
player->invincibilitybottleneck = 0;
|
||||
player->invincibilitywarning = 0;
|
||||
}
|
||||
|
||||
if (!player->invincibilitytimer)
|
||||
K_KartResetPlayerColor(player,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -7485,7 +7482,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
{
|
||||
mobj_t *eggsexplode;
|
||||
|
||||
K_KartResetPlayerColor(player, true);
|
||||
K_KartResetPlayerColor(player);
|
||||
|
||||
//player->flashing = 0;
|
||||
eggsexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_SPBEXPLOSION);
|
||||
|
|
@ -7632,7 +7629,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
K_UpdateSPBTimer();
|
||||
}
|
||||
|
||||
void K_KartResetPlayerColor(player_t *player, boolean disablecolor)
|
||||
void K_KartResetPlayerColor(player_t *player)
|
||||
{
|
||||
boolean fullbright = false;
|
||||
|
||||
|
|
@ -7641,8 +7638,13 @@ void K_KartResetPlayerColor(player_t *player, boolean disablecolor)
|
|||
|
||||
if (player->mo->health <= 0 || player->playerstate == PST_DEAD) // Override everything
|
||||
{
|
||||
player->mo->colorized = (player->dye != 0);
|
||||
player->mo->color = player->dye ? player->dye : player->skincolor;
|
||||
if (player->dye)
|
||||
{
|
||||
player->mo->colorized = (player->dye != 0);
|
||||
player->mo->color = player->dye;
|
||||
}
|
||||
else
|
||||
player->mo->color = player->skincolor;
|
||||
|
||||
goto finalise;
|
||||
}
|
||||
|
|
@ -7711,12 +7713,6 @@ void K_KartResetPlayerColor(player_t *player, boolean disablecolor)
|
|||
fullbright = true;
|
||||
goto finalise;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->mo->colorized = (player->dye != 0);
|
||||
player->mo->color = player->dye ? player->dye : player->skincolor;
|
||||
goto finalise;
|
||||
}
|
||||
}
|
||||
|
||||
if (player->ringboost && (leveltime & 1)) // ring boosting
|
||||
|
|
@ -7725,11 +7721,10 @@ void K_KartResetPlayerColor(player_t *player, boolean disablecolor)
|
|||
fullbright = true;
|
||||
goto finalise;
|
||||
}
|
||||
else if (disablecolor || player->dye)
|
||||
else if (player->dye)
|
||||
{
|
||||
player->mo->colorized = (player->dye != 0);
|
||||
player->mo->color = player->dye ? player->dye : player->skincolor;
|
||||
goto finalise;
|
||||
player->mo->color = player->dye;
|
||||
}
|
||||
|
||||
finalise:
|
||||
|
|
@ -7752,7 +7747,7 @@ finalise:
|
|||
|
||||
void K_KartPlayerAfterThink(player_t *player)
|
||||
{
|
||||
K_KartResetPlayerColor(player, false);
|
||||
K_KartResetPlayerColor(player);
|
||||
|
||||
// Move held objects (Bananas, Orbinaut, etc)
|
||||
K_MoveHeldObjects(player);
|
||||
|
|
@ -10407,7 +10402,7 @@ void K_StripOther(player_t *player)
|
|||
player->eggmanexplode = 0;
|
||||
player->eggmanblame = -1;
|
||||
|
||||
K_KartResetPlayerColor(player, true);
|
||||
K_KartResetPlayerColor(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ void K_SpawnInvincibilitySpeedLines(mobj_t *mo);
|
|||
void K_SpawnBumpEffect(mobj_t *mo);
|
||||
void K_KartMoveAnimation(player_t *player);
|
||||
void K_KartPlayerHUDUpdate(player_t *player);
|
||||
void K_KartResetPlayerColor(player_t *player, boolean disablecolor);
|
||||
void K_KartResetPlayerColor(player_t *player);
|
||||
UINT8 K_RaceLapCount(INT16 mapNum);
|
||||
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
|
||||
void K_KartPlayerAfterThink(player_t *player);
|
||||
|
|
|
|||
|
|
@ -1357,15 +1357,8 @@ static int player_set(lua_State *L)
|
|||
plr->carry = luaL_checkinteger(L, 3);
|
||||
break;
|
||||
case player_dye:
|
||||
{
|
||||
UINT16 dye = luaL_checkinteger(L, 3);
|
||||
|
||||
if (!dye)
|
||||
K_KartResetPlayerColor(plr, true);
|
||||
|
||||
plr->dye = dye;
|
||||
plr->dye = luaL_checkinteger(L, 3);
|
||||
break;
|
||||
}
|
||||
case player_position:
|
||||
plr->position = luaL_checkinteger(L, 3);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -2048,7 +2048,7 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source,
|
|||
|
||||
player->carry = CR_NONE;
|
||||
|
||||
K_KartResetPlayerColor(player, true);
|
||||
K_KartResetPlayerColor(player);
|
||||
|
||||
P_ResetPlayer(player);
|
||||
|
||||
|
|
|
|||
|
|
@ -1806,7 +1806,7 @@ static void P_CheckInvincibilityTimer(player_t *player)
|
|||
// Resume normal music stuff.
|
||||
if (player->invincibilitytimer == 1 || player->powers[pw_invulnerability] == 1)
|
||||
{
|
||||
//K_KartResetPlayerColor(player, true); -- this gets called every tic anyways
|
||||
//K_KartResetPlayerColor(player); -- this gets called every tic anyways
|
||||
G_GhostAddColor((INT32) (player - players), GHC_NORMAL);
|
||||
|
||||
P_RestoreMusic(player);
|
||||
|
|
@ -2702,7 +2702,7 @@ static void P_DeathThink(player_t *player)
|
|||
if (!player->mo)
|
||||
return;
|
||||
|
||||
//K_KartResetPlayerColor(player, true); -- called at death, don't think we need to re-establish
|
||||
//K_KartResetPlayerColor(player); -- called at death, don't think we need to re-establish
|
||||
|
||||
P_CalcHeight(player);
|
||||
}
|
||||
|
|
@ -4401,13 +4401,8 @@ void P_PlayerThink(player_t *player)
|
|||
player->powers[pw_sneakers]--;
|
||||
|
||||
if (player->powers[pw_invulnerability] && player->powers[pw_invulnerability] < UINT16_MAX)
|
||||
{
|
||||
player->powers[pw_invulnerability]--;
|
||||
|
||||
if (!player->powers[pw_invulnerability])
|
||||
K_KartResetPlayerColor(player,true);
|
||||
}
|
||||
|
||||
if (player->flashing && player->flashing < UINT16_MAX &&
|
||||
(player->spectator || player->flashing < K_GetKartFlashing(player)))
|
||||
player->flashing--;
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
|
|||
}
|
||||
|
||||
player->skincolor = newcolor = skin->prefcolor;
|
||||
K_KartResetPlayerColor(player, true);
|
||||
K_KartResetPlayerColor(player);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue