Skip to content

Commit

Permalink
Merge pull request #376 from qw-ctf/spm-compat
Browse files Browse the repository at this point in the history
SPAWN: Better k_spm_custom_model compatibility.
  • Loading branch information
tcsabina authored Dec 1, 2024
2 parents c8395d7 + 006760e commit f8d7cb1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/items.c
Original file line number Diff line number Diff line change
Expand Up @@ -2875,13 +2875,9 @@ char *Spawn_GetModel(void)
if (!spawn_model[0])
{
char *mdl = cvar_string("k_spm_custom_model");
if (!strcmp(mdl, "0") || strlen(mdl) == 0)
if (only_digits(mdl))
{
strlcpy(spawn_model, "progs/w_g_key.mdl", sizeof(spawn_model));
}
else if (!strcmp(mdl, "1"))
{
strlcpy(spawn_model, "progs/wizard.mdl", sizeof(spawn_model));
strlcpy(spawn_model, atoi(mdl) ? "progs/wizard.mdl" : "progs/w_g_key.mdl", sizeof(spawn_model));
}
else
{
Expand Down

0 comments on commit f8d7cb1

Please sign in to comment.