diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 7d88cb466..235cde3a2 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -49,6 +49,7 @@ #include "m_anigif.h" #include "k_kart.h" // SRB2kart #include "y_inter.h" +#include "fastcmp.h" #include "m_perfstats.h" #ifdef NETGAME_DEVMODE @@ -4649,21 +4650,31 @@ static boolean DumbStartsWith(const char *pre, const char *str) static void Command_Addskins (void) { - if (COM_Argc() != 2) + if (COM_Argc() > 3) { CONS_Printf( - "addskins : load skins bro\n"); + "addskins : Load a skin file.\n"); return; } - // we dont want anything that aint a skin - if (DumbStartsWith("KC_", COM_Argv(1))) - P_AddWadFile(COM_Argv(1), true); - else if (DumbStartsWith("KCL_", COM_Argv(1)) && demo.playback) // KCL only for demos - P_AddWadFile(COM_Argv(1), true); - else if (DumbStartsWith("KCL_", COM_Argv(1)) && !demo.playback) - CONS_Alert(CONS_ERROR, M_GetText("Cannot add file %s as it is a skin with lua."), COM_Argv(1)); - else - CONS_Alert(CONS_ERROR, M_GetText("Cannot add file %s as it is not a skin."), COM_Argv(1)); + // no forcing? + if (fasticmp(COM_Argv(2), "-force") || fasticmp(COM_Argv(2), "-f")) { + CONS_Alert(CONS_NOTICE, M_GetText("Adding file %s. May or may not be a skin.\n"), COM_Argv(1)); + P_AddWadFile(COM_Argv(1), 0, true); + } else { + if (DumbStartsWith("KC_", COM_Argv(1))) { + P_AddWadFile(COM_Argv(1), 0, true); + } else if (DumbStartsWith("KCL_", COM_Argv(1))) { + if (!demo.playback) { + CONS_Alert(CONS_ERROR, M_GetText("Cannot add file %s as it is a skin with lua. Include -force or -f to force it to load.\n"), COM_Argv(1)); + return; + } else { + P_AddWadFile(COM_Argv(1), 0, true); + } + } else { + CONS_Alert(CONS_ERROR, M_GetText("Cannot add file %s as it is not a skin.\n"), COM_Argv(1)); + return; + } + } } static void Command_Localskin1 (void) { diff --git a/src/m_menu.c b/src/m_menu.c index a4941bdb2..872af2530 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -5629,7 +5629,7 @@ static void M_HandleAddons(INT32 choice) // no characters? if (DumbStartsWith("KC_", dirmenu[dir_on[menudepthleft]]+DIR_STRING)) { M_StartMessage(va("%c%s\x80\nYou are loading a local skin.\nLocal skins will not be usable\nafter going back from\nthe title screen.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), dirmenu[dir_on[menudepthleft]]+DIR_STRING),NULL,MM_NOTHING); - COM_BufAddText(va("addskins \"%s%s\"", menupath, dirmenu[dir_on[menudepthleft]]+DIR_STRING)); + COM_BufAddText(va("addskins \"%s%s\" -force", menupath, dirmenu[dir_on[menudepthleft]]+DIR_STRING)); } else S_StartSound(NULL, sfx_s26d); diff --git a/src/p_user.c b/src/p_user.c index 5130c8f55..c625e5fcc 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1741,13 +1741,13 @@ void P_DoPlayerExit(player_t *player) sfxenum_t sfx_id; // fix godjjsa win sounds if (K_IsPlayerLosing(player)) { - if (player->mo->skinlocal) + if (player->mo->localskin) sfx_id = ((skin_t *)player->mo->localskin)->soundsid[S_sfx[sfx_klose].skinsound]; else sfx_id = ((skin_t *)player->mo->skin)->soundsid[S_sfx[sfx_klose].skinsound]; } else { - if (player->mo->skinlocal) + if (player->mo->localskin) sfx_id = ((skin_t *)player->mo->localskin)->soundsid[S_sfx[sfx_kwin].skinsound]; else sfx_id = ((skin_t *)player->mo->skin)->soundsid[S_sfx[sfx_kwin].skinsound]; diff --git a/src/y_inter.c b/src/y_inter.c index 71011ed60..02b88f834 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -482,13 +482,14 @@ void Y_IntermissionDrawer(void) if (data.match.color[i]) { UINT8 *colormap = R_GetTranslationColormap(*data.match.character[i], *data.match.color[i], GTC_CACHE); - if (!players[i].skinlocal) { - if (!players[i].localskin) + // i fucking hate this i fucking hate this i hate this so much + if (!players[data.match.num[i]].skinlocal) { + if (!players[data.match.num[i]].localskin) V_DrawMappedPatch(x+16, y-4, 0, facerankprefix[*data.match.character[i]], colormap); else - V_DrawMappedPatch(x+16, y-4, 0, facerankprefix[players[i].localskin - 1], colormap); + V_DrawMappedPatch(x+16, y-4, 0, facerankprefix[players[data.match.num[i]].localskin - 1], colormap); } else { - V_DrawMappedPatch(x+16, y-4, 0, localfacerankprefix[players[i].localskin - 1], colormap); + V_DrawMappedPatch(x+16, y-4, 0, localfacerankprefix[players[data.match.num[i]].localskin - 1], colormap); } }