DecalGroups_Place: cancel out if the group wasn't found.

This commit is contained in:
Marco Cawthorne 2024-02-23 13:20:15 -08:00
parent 5c90692873
commit 0f86ba61a1
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 8 additions and 3 deletions

View File

@ -194,12 +194,17 @@ DecalGroups_NumForName(string group)
void void
DecalGroups_Place(string group, vector org) DecalGroups_Place(string group, vector org)
{ {
int index; int index = -1i;
if (g_decalgroup_count <= 0i) if (g_decalgroup_count <= 0i) {
return; return;
}
index = (int)hash_get(g_hashdecalgroup, strtolower(group), -1); index = (int)hash_get(g_hashdecalgroup, strtolower(group), -1i);
if (index == -1i) {
return;
}
#ifdef SERVER #ifdef SERVER
/* on the server we only need to tell the clients in the PVS /* on the server we only need to tell the clients in the PVS