mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
Fix issues with CON_FOR
git-svn-id: https://svn.eduke32.com/eduke32@6574 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
09c03151db
commit
fcfac7c1d9
1 changed files with 7 additions and 26 deletions
|
@ -5198,7 +5198,7 @@ finish_qsprintf:
|
|||
switch (iterType)
|
||||
{
|
||||
case ITER_ALLSPRITES:
|
||||
for (bssize_t jj=0; jj<MAXSPRITES; ++jj)
|
||||
for (bssize_t jj=0; jj<Numsprites; ++jj)
|
||||
{
|
||||
if (sprite[jj].statnum == MAXSTATUS)
|
||||
continue;
|
||||
|
@ -5240,54 +5240,35 @@ finish_qsprintf:
|
|||
|
||||
case ITER_DRAWNSPRITES:
|
||||
{
|
||||
/*
|
||||
uspritetype lastSpriteBackup;
|
||||
uspritetype *const lastSpritePtr = (uspritetype *) &sprite[MAXSPRITES-1];
|
||||
*/
|
||||
|
||||
// Back up sprite MAXSPRITES-1.
|
||||
/*
|
||||
Bmemcpy(&lastSpriteBackup, lastSpritePtr, sizeof(uspritetype));
|
||||
*/
|
||||
|
||||
for (bssize_t ii=0; ii<spritesortcnt; ii++)
|
||||
{
|
||||
/*
|
||||
Bmemcpy(lastSpritePtr, &tsprite[ii], sizeof(uspritetype));
|
||||
*/
|
||||
Gv_SetVarX(returnVar, ii);
|
||||
insptr = pNext;
|
||||
VM_Execute(0);
|
||||
|
||||
// Copy over potentially altered tsprite.
|
||||
/*
|
||||
Bmemcpy(&tsprite[ii], lastSpritePtr, sizeof(uspritetype));
|
||||
*/
|
||||
}
|
||||
|
||||
// Restore sprite MAXSPRITES-1.
|
||||
/*
|
||||
Bmemcpy(lastSpritePtr, &lastSpriteBackup, sizeof(uspritetype));
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
case ITER_SPRITESOFSECTOR:
|
||||
if ((unsigned)nIndex >= MAXSECTORS) goto badindex;
|
||||
for (bssize_t jj=headspritesect[nIndex]; jj>=0; jj=nextspritesect[jj])
|
||||
for (bssize_t jj=headspritesect[nIndex]; jj>=0;)
|
||||
{
|
||||
int const kk=nextspritesect[jj];
|
||||
Gv_SetVarX(returnVar, jj);
|
||||
insptr = pNext;
|
||||
VM_Execute(0);
|
||||
jj=kk;
|
||||
}
|
||||
break;
|
||||
case ITER_SPRITESOFSTATUS:
|
||||
if ((unsigned) nIndex >= MAXSTATUS) goto badindex;
|
||||
for (bssize_t jj=headspritestat[nIndex]; jj>=0; jj=nextspritestat[jj])
|
||||
for (bssize_t jj=headspritestat[nIndex]; jj>=0;)
|
||||
{
|
||||
int const kk=nextspritestat[jj];
|
||||
Gv_SetVarX(returnVar, jj);
|
||||
insptr = pNext;
|
||||
VM_Execute(0);
|
||||
jj=kk;
|
||||
}
|
||||
break;
|
||||
case ITER_WALLSOFSECTOR:
|
||||
|
|
Loading…
Reference in a new issue