* Fixed changing skins during differing-length sprite animations resulting in sprite errors.

* Added PF_BOUNCING to a place where it would likely be wanted.
This commit is contained in:
toasterbabe 2016-12-26 18:36:57 +00:00
parent 2ba3afaeda
commit 4a53d96099
2 changed files with 5 additions and 5 deletions

View File

@ -212,7 +212,7 @@ boolean B_CheckRespawn(player_t *player)
// Check if Sonic is busy first.
// If he's doing any of these things, he probably doesn't want to see us.
if (sonic->player->pflags & (PF_GLIDING|PF_SLIDING|PF_NIGHTSMODE)
if (sonic->player->pflags & (PF_GLIDING|PF_SLIDING|PF_BOUNCING|PF_NIGHTSMODE)
|| (sonic->player->panim != PA_IDLE && sonic->player->panim != PA_WALK)
|| (sonic->player->powers[pw_carry]))
return false;

View File

@ -2627,16 +2627,16 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
player->mo->color = newcolor;
P_SetScale(player->mo, player->mo->scale);
player->mo->radius = FixedMul(skin->radius, player->mo->scale);
P_SetPlayerMobjState(player->mo, player->mo->state-states); // Prevent visual errors when switching between skins with differing number of frames
}
return;
}
else if (skinnum >= 0 && skinnum < numskins)
skinnum = 255; // Cheeky emulation.
if (P_IsLocalPlayer(player))
CONS_Alert(CONS_WARNING, M_GetText("Skin %d not found\n"), skinnum);
CONS_Alert(CONS_WARNING, M_GetText("Requested skin not found\n"));
else if(server || adminplayer == consoleplayer)
CONS_Alert(CONS_WARNING, "Player %d (%s) skin %d not found\n", playernum, player_names[playernum], skinnum);
CONS_Alert(CONS_WARNING, "Player %d (%s) skin not found\n", playernum, player_names[playernum]);
SetPlayerSkinByNum(playernum, 0); // not found put the sonic skin
}