diff --git a/src/g_game.c b/src/g_game.c index 653433df9..b1246b98e 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4409,8 +4409,10 @@ void G_AfterFileDeletion(void) { for (INT32 i = 0; i < MAXPLAYERS; i++) { - if (!playeringame[i] && players[i].skin >= numskins) - SetPlayerSkinByNum(i, -1); + if (players[i].skin >= numskins) + SetPlayerSkinByNum(i, GetPlayerDefaultSkin(i)); + else + SetPlayerSkinByNum(i, players[i].skin); } if (!Playing()) diff --git a/src/r_things.c b/src/r_things.c index e1744264f..51f58dc23 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -569,6 +569,9 @@ void R_InitSprites(void) if (!numsprites) I_Error("R_AddSpriteDefs: no sprites in namelist\n"); + if (sprites) + Z_Free(sprites); + sprites = Z_Calloc(numsprites * sizeof (*sprites), PU_STATIC, NULL); // find sprites in each -file added pwad