Fix "too many sprites spawned" check

git-svn-id: https://svn.eduke32.com/eduke32@6716 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-03-03 06:37:16 +00:00
parent 1adf766fac
commit 478165f00c

View file

@ -1301,7 +1301,7 @@ int32_t A_InsertSprite(int16_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int1
{ {
int32_t i = Net_IsRelevantStat(s_ss) ? Net_InsertSprite(whatsect, s_ss) : insertsprite(whatsect, s_ss); int32_t i = Net_IsRelevantStat(s_ss) ? Net_InsertSprite(whatsect, s_ss) : insertsprite(whatsect, s_ss);
if (EDUKE32_PREDICT_FALSE(i) < 0) if (EDUKE32_PREDICT_FALSE((unsigned)i >= MAXSPRITES))
{ {
G_DumpDebugInfo(); G_DumpDebugInfo();
OSD_Printf("Failed spawning pic %d spr from pic %d spr %d at x:%d,y:%d,z:%d,sect:%d\n", OSD_Printf("Failed spawning pic %d spr from pic %d spr %d at x:%d,y:%d,z:%d,sect:%d\n",