changed how .mdl loading behaves. now one skin is instead used for the store

This commit is contained in:
jenz 2024-01-28 23:26:23 +01:00
parent 15e53c7759
commit 72027c82a0

View File

@ -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_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 //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.
//LoadClasses(); //otherwise we assign the .mdl here.
//ForcePlayerSuicide(client); //in practise only one human skin will not have .mdl set. we only do not end here when its that one human model.
return Plugin_Continue; SetEntityModel(client, g_cModelPath[i][g_iLength]);
} }
SetEntityModel(client, g_cModelPath[i][g_iLength]);
g_bClientProtection[client] = true; g_bClientProtection[client] = true;
if (StrContains(g_cNoFallDmg[i][g_iLength], "YES") > -1) if (StrContains(g_cNoFallDmg[i][g_iLength], "YES") > -1)
g_bFallDamage[client] = true; g_bFallDamage[client] = true;