mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-08 22:41:45 +00:00
Remove detection of sprites outside of sectors at map load and fix green sprites in Mapster32 with Polymer
git-svn-id: https://svn.eduke32.com/eduke32@1689 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1a214939d7
commit
ca382a894a
2 changed files with 10 additions and 3 deletions
|
@ -6656,12 +6656,15 @@ int32_t loadboard(char *filename, char fromwhere, int32_t *daposx, int32_t *dapo
|
||||||
for (i=0; i<numsprites; i++)
|
for (i=0; i<numsprites; i++)
|
||||||
{
|
{
|
||||||
int32_t k;
|
int32_t k;
|
||||||
|
/*
|
||||||
int16_t sect;
|
int16_t sect;
|
||||||
|
*/
|
||||||
|
|
||||||
if ((sprite[i].cstat & 48) == 48) sprite[i].cstat &= ~48;
|
if ((sprite[i].cstat & 48) == 48) sprite[i].cstat &= ~48;
|
||||||
|
|
||||||
k = insertsprite(sprite[i].sectnum,sprite[i].statnum);
|
k = insertsprite(sprite[i].sectnum,sprite[i].statnum);
|
||||||
|
|
||||||
|
/*
|
||||||
sect = sprite[k].sectnum;
|
sect = sprite[k].sectnum;
|
||||||
updatesector(sprite[k].x, sprite[k].y, §);
|
updatesector(sprite[k].x, sprite[k].y, §);
|
||||||
|
|
||||||
|
@ -6679,18 +6682,21 @@ int32_t loadboard(char *filename, char fromwhere, int32_t *daposx, int32_t *dapo
|
||||||
if (sect != -1) break;
|
if (sect != -1) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fuck it, the sprite is clearly not legitimately in any sector at this point
|
/ * fuck it, the sprite is clearly not legitimately in any sector at this point
|
||||||
so let's queue it up for deletion */
|
so let's queue it up for deletion * /
|
||||||
if (sect == -1)
|
if (sect == -1)
|
||||||
dq[dnum++] = k;
|
dq[dnum++] = k;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
while (dnum--)
|
while (dnum--)
|
||||||
{
|
{
|
||||||
initprintf(OSD_ERROR "Map error: removing sprite #%d(%d,%d) in null space. Map is corrupt!\n",dq[dnum],sprite[dq[dnum]].x,sprite[dq[dnum]].y);
|
initprintf(OSD_ERROR "Map error: removing sprite #%d(%d,%d) in null space. Map is corrupt!\n",dq[dnum],sprite[dq[dnum]].x,sprite[dq[dnum]].y);
|
||||||
deletesprite(dq[dnum]);
|
deletesprite(dq[dnum]);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//Must be after loading sectors, etc!
|
//Must be after loading sectors, etc!
|
||||||
updatesector(*daposx,*daposy,dacursectnum);
|
updatesector(*daposx,*daposy,dacursectnum);
|
||||||
|
|
|
@ -1092,7 +1092,7 @@ void polymer_updatesprite(int32_t snum)
|
||||||
curpicnum = tspr->picnum;
|
curpicnum = tspr->picnum;
|
||||||
if (picanm[curpicnum]&192) curpicnum += animateoffs(curpicnum,tspr->owner+32768);
|
if (picanm[curpicnum]&192) curpicnum += animateoffs(curpicnum,tspr->owner+32768);
|
||||||
|
|
||||||
if (tspr->cstat & 48)
|
if (tspr->cstat & 48 && searchit != 2)
|
||||||
{
|
{
|
||||||
uint32_t crc = crc32once((uint8_t *)tspr, offsetof(spritetype, owner));
|
uint32_t crc = crc32once((uint8_t *)tspr, offsetof(spritetype, owner));
|
||||||
int32_t curpriority = 0;
|
int32_t curpriority = 0;
|
||||||
|
@ -1144,6 +1144,7 @@ void polymer_updatesprite(int32_t snum)
|
||||||
s->plane.material.diffusemodulation[1] = ((GLubyte *)(&tspr->owner))[0];
|
s->plane.material.diffusemodulation[1] = ((GLubyte *)(&tspr->owner))[0];
|
||||||
s->plane.material.diffusemodulation[2] = ((GLubyte *)(&tspr->owner))[1];
|
s->plane.material.diffusemodulation[2] = ((GLubyte *)(&tspr->owner))[1];
|
||||||
s->plane.material.diffusemodulation[3] = 0xFF;
|
s->plane.material.diffusemodulation[3] = 0xFF;
|
||||||
|
s->crc = 0xdeadbeef;
|
||||||
}
|
}
|
||||||
|
|
||||||
curpicnum = tspr->picnum;
|
curpicnum = tspr->picnum;
|
||||||
|
|
Loading…
Reference in a new issue