git-svn-id: https://svn.eduke32.com/eduke32@6636 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-01-31 04:13:35 +00:00
parent d9a5b4aa13
commit cd02a9223e

View file

@ -4036,9 +4036,10 @@ finish_qsprintf:
int const findPicnum = *insptr++; int const findPicnum = *insptr++;
int const maxDist = Gv_GetVarX(*insptr++); int const maxDist = Gv_GetVarX(*insptr++);
int const returnVar = *insptr++; int const returnVar = *insptr++;
int foundSprite = -1;
int findStatnum = 1; int foundSprite = -1;
int spriteNum; int findStatnum = STAT_ACTOR;
int spriteNum;
if (tw == CON_FINDNEARSPRITEVAR || tw == CON_FINDNEARSPRITE3DVAR) if (tw == CON_FINDNEARSPRITEVAR || tw == CON_FINDNEARSPRITE3DVAR)
findStatnum = MAXSTATUS-1; findStatnum = MAXSTATUS-1;
@ -4103,12 +4104,13 @@ finish_qsprintf:
int const maxDist = Gv_GetVarX(*insptr++); int const maxDist = Gv_GetVarX(*insptr++);
int const maxZDist = Gv_GetVarX(*insptr++); int const maxZDist = Gv_GetVarX(*insptr++);
int const returnVar = *insptr++; int const returnVar = *insptr++;
int foundSprite = -1;
int findStatnum = MAXSTATUS - 1; int foundSprite = -1;
int findStatnum = MAXSTATUS - 1;
do do
{ {
int spriteNum = headspritestat[tw == CON_FINDNEARACTORZVAR ? 1 : findStatnum]; // all sprites int spriteNum = headspritestat[tw == CON_FINDNEARACTORZVAR ? STAT_ACTOR : findStatnum]; // all sprites
if (spriteNum == -1) if (spriteNum == -1)
continue; continue;
@ -4129,6 +4131,7 @@ finish_qsprintf:
spriteNum = nextspritestat[spriteNum]; spriteNum = nextspritestat[spriteNum];
} }
while (spriteNum>=0); while (spriteNum>=0);
if (tw==CON_FINDNEARACTORZVAR || spriteNum == MAXSPRITES) if (tw==CON_FINDNEARACTORZVAR || spriteNum == MAXSPRITES)
break; break;
} }