mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
1. Fixed this crash (http://forums.3drealms.com/vb/showpost.php?p=706802&postcount=533)
2. Optimized the setactorvar,setplayervar,getactorvar,getplayervar commands. They may be compiled as the setvarvar command. git-svn-id: https://svn.eduke32.com/eduke32@761 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1747bc460e
commit
c634a708aa
2 changed files with 28 additions and 1 deletions
|
@ -6845,7 +6845,7 @@ int loadboard(char *filename, char fromwhere, int *daposx, int *daposy, int *dap
|
|||
|
||||
if (sprite[i].sectnum<0||sprite[i].sectnum>=MYMAXSECTORS)
|
||||
{
|
||||
initprintf("Map error: sprite #%d(%d,%d) with wrong sector(%d)\n",i,sprite[i].x,sprite[i].y,sprite[i].sectnum);
|
||||
initprintf("Map error: sprite #%d(%d,%d) with an illegal sector(%d)\n",i,sprite[i].x,sprite[i].y,sprite[i].sectnum);
|
||||
sprite[i].sectnum=MYMAXSECTORS-1;
|
||||
}
|
||||
}
|
||||
|
@ -7594,6 +7594,12 @@ int saveboard(char *filename, int *daposx, int *daposy, int *daposz,
|
|||
if ((fil = Bopen(filename,BO_BINARY|BO_TRUNC|BO_CREAT|BO_WRONLY,BS_IREAD|BS_IWRITE)) == -1)
|
||||
return(-1);
|
||||
|
||||
for (j=0;j<MAXSPRITES;j++)if((unsigned)sprite[j].statnum>MAXSTATUS)
|
||||
{
|
||||
initprintf("Map error: sprite #%d(%d,%d) with an illegal statnum(%d)\n",j,sprite[j].x,sprite[j].y,sprite[j].statnum);
|
||||
changespritestat(j,0);
|
||||
}
|
||||
|
||||
numsprites = 0;
|
||||
for (j=0;j<MAXSTATUS;j++)
|
||||
{
|
||||
|
|
|
@ -3106,6 +3106,27 @@ static int parsecommand(void)
|
|||
return 0;
|
||||
}
|
||||
textptr++;
|
||||
|
||||
if (scriptptr[-1] == g_iThisActorID) // convert to "setvarvar"
|
||||
{
|
||||
scriptptr--;
|
||||
scriptptr[-1]=CON_SETVARVAR;
|
||||
if (tw == CON_SETACTORVAR || tw == CON_SETPLAYERVAR)
|
||||
{
|
||||
transvartype(GAMEVAR_FLAG_READONLY);
|
||||
transvar();
|
||||
}
|
||||
else
|
||||
{
|
||||
scriptptr++;
|
||||
transvar();
|
||||
scriptptr-=2;
|
||||
transvartype(GAMEVAR_FLAG_READONLY);
|
||||
scriptptr++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/// now pointing at 'xxx'
|
||||
|
||||
// get the ID of the DEF
|
||||
|
|
Loading…
Reference in a new issue