Shared: sanity check for when decalgroups are attempted to be placed, but not available.
This commit is contained in:
parent
b7167a553e
commit
8cd6d3967d
3 changed files with 5 additions and 26 deletions
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2022 Vera Visions LLC.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
void
|
||||
ClientGame_ModelEvent(float flTimeStamp, int iCode, string strData)
|
||||
{
|
||||
switch (iCode) {
|
||||
default:
|
||||
Event_ProcessModel(flTimeStamp, iCode, strData);
|
||||
}
|
||||
}
|
|
@ -29,9 +29,7 @@ entities.qc
|
|||
camera.qc
|
||||
cmds.qc
|
||||
game_event.qc
|
||||
modelevent.qc
|
||||
viewmodel.qc
|
||||
view.qc
|
||||
hud.qc
|
||||
hud_weaponselect.qc
|
||||
scoreboard.qc
|
||||
|
|
|
@ -100,6 +100,7 @@ DecalGroups_Init(void)
|
|||
filestream fh;
|
||||
string line;
|
||||
|
||||
g_decalgroup_count = 0i;
|
||||
print("--------- Initializing Decal Groups ----------\n");
|
||||
|
||||
/* create the hash-table if it doesn't exist */
|
||||
|
@ -194,6 +195,10 @@ void
|
|||
DecalGroups_Place(string group, vector org)
|
||||
{
|
||||
int index;
|
||||
|
||||
if (g_decalgroup_count <= 0i)
|
||||
return;
|
||||
|
||||
index = (int)hash_get(g_hashdecalgroup, strtolower(group), -1);
|
||||
|
||||
#ifdef SERVER
|
||||
|
|
Loading…
Reference in a new issue