From 2ee22fc40a2862e2fa3eb0697172ea9c16572fe5 Mon Sep 17 00:00:00 2001
From: toasterbabe <rollerorbital@gmail.com>
Date: Wed, 13 Jul 2016 20:14:07 +0100
Subject: [PATCH] Dedicated servers have all skins unlocked for the purpose of
 forceskin.

Meanwhile, a sneaky sneaky for hiding hidden characters further.
---
 src/d_netcmd.c | 2 +-
 src/r_things.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/d_netcmd.c b/src/d_netcmd.c
index 8552e51aef..21008cbcf6 100644
--- a/src/d_netcmd.c
+++ b/src/d_netcmd.c
@@ -4002,7 +4002,7 @@ static void Command_Archivetest_f(void)
   */
 static void ForceSkin_OnChange(void)
 {
-	if ((server || adminplayer == consoleplayer) && (cv_forceskin.value < -1 || cv_forceskin.value >= numskins || !R_SkinUnlock(cv_forceskin.value)))
+	if ((server || adminplayer == consoleplayer) && (cv_forceskin.value < -1 || cv_forceskin.value >= numskins || !(dedicated || R_SkinUnlock(cv_forceskin.value)))) // Dedicated servers have everything when it comes to forceskin because they have no gamedata.
 	{
 		if (cv_forceskin.value == -2)
 			CV_SetValue(&cv_forceskin, numskins-1);
diff --git a/src/r_things.c b/src/r_things.c
index ba76dc5cee..4198ce99ba 100644
--- a/src/r_things.c
+++ b/src/r_things.c
@@ -2434,6 +2434,8 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
 			P_SetScale(player->mo, player->mo->scale);
 		return;
 	}
+	else if !R_SkinUnlock(skinnum) // Sneaky sneaky.
+		skinnum = -1;
 
 	if (P_IsLocalPlayer(player))
 		CONS_Alert(CONS_WARNING, M_GetText("Skin %d not found\n"), skinnum);
-- 
GitLab