When inserting a new sprite and determining its picnum by frequency count

of the picnums of all sprites, omit the newly inserted sprite itself!

git-svn-id: https://svn.eduke32.com/eduke32@2043 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-09-25 15:11:28 +00:00
parent 195ed466e3
commit 04d1ebb010

View file

@ -1927,7 +1927,8 @@ static int32_t insert_sprite_common(int32_t sucksect, int32_t dax, int32_t day)
Bmemset(localartfreq, 0, sizeof(localartfreq));
for (k=0; k<MAXSPRITES; k++)
localartfreq[sprite[k].picnum] += (sprite[k].statnum < MAXSTATUS);
if (sprite[k].statnum < MAXSTATUS && k!=i)
localartfreq[sprite[k].picnum]++;
j = 0;
for (k=0; k<MAXTILES; k++)