From 72027c82a051dfbec192e31de62f799bd0c7fa48 Mon Sep 17 00:00:00 2001 From: jenz Date: Sun, 28 Jan 2024 23:26:23 +0100 Subject: [PATCH] changed how .mdl loading behaves. now one skin is instead used for the store --- ZombieRiot/scripting/unloze_zr.sp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ZombieRiot/scripting/unloze_zr.sp b/ZombieRiot/scripting/unloze_zr.sp index 8eef2610..ff8a7080 100644 --- a/ZombieRiot/scripting/unloze_zr.sp +++ b/ZombieRiot/scripting/unloze_zr.sp @@ -1478,16 +1478,15 @@ public Action ModelSelection(int client, int state, int modelIndex) } if (StrContains(g_cUniqueName[i][g_iLength], l_cUniqueModel, false) > -1) { - if (StrContains(g_cModelPath[i][g_iLength], "mdl") == -1) + + if (StrContains(g_cModelPath[i][g_iLength], ".mdl") != -1) { - //incorrect modelpaths crash at SetEntityModel - //LoadClasses(); - //ForcePlayerSuicide(client); - return Plugin_Continue; + //if its a public skin we go in here. we skip this if its the "store skin". in those cases we let the store decide the .mdl for the player. + //otherwise we assign the .mdl here. + //in practise only one human skin will not have .mdl set. we only do not end here when its that one human model. + SetEntityModel(client, g_cModelPath[i][g_iLength]); } - - SetEntityModel(client, g_cModelPath[i][g_iLength]); g_bClientProtection[client] = true; if (StrContains(g_cNoFallDmg[i][g_iLength], "YES") > -1) g_bFallDamage[client] = true;