Don't spawn weapon tiles (WEAPONx_SPAWN) if any such value has been set

to negative numbers.  Previously, only checks for being zero were performed,
but CON code in the wild also has WEAPONx_SPAWN -1, which would propagate to
the sprite picnum...

git-svn-id: https://svn.eduke32.com/eduke32@2180 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-12-15 22:42:25 +00:00
parent b73b9cb732
commit 46ed3313e7

View file

@ -2194,7 +2194,7 @@ void P_DoWeaponSpawn(DukePlayer_t *p)
{
int32_t j, snum = sprite[p->i].yvel;
if (!aplWeaponSpawn[p->curr_weapon][snum])
if (aplWeaponSpawn[p->curr_weapon][snum] <= 0) // <=0 : AMC TC beta/RC2 has WEAPONx_SPAWN -1
return;
j = A_Spawn(p->i, aplWeaponSpawn[p->curr_weapon][snum]);