Skip to content

Commit f8d7cb1

Browse files
authored
Merge pull request #376 from qw-ctf/spm-compat
SPAWN: Better k_spm_custom_model compatibility.
2 parents c8395d7 + 006760e commit f8d7cb1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/items.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -2875,13 +2875,9 @@ char *Spawn_GetModel(void)
28752875
if (!spawn_model[0])
28762876
{
28772877
char *mdl = cvar_string("k_spm_custom_model");
2878-
if (!strcmp(mdl, "0") || strlen(mdl) == 0)
2878+
if (only_digits(mdl))
28792879
{
2880-
strlcpy(spawn_model, "progs/w_g_key.mdl", sizeof(spawn_model));
2881-
}
2882-
else if (!strcmp(mdl, "1"))
2883-
{
2884-
strlcpy(spawn_model, "progs/wizard.mdl", sizeof(spawn_model));
2880+
strlcpy(spawn_model, atoi(mdl) ? "progs/wizard.mdl" : "progs/w_g_key.mdl", sizeof(spawn_model));
28852881
}
28862882
else
28872883
{

0 commit comments

Comments
 (0)