Implement CON_NEXTSECTORNEIGHBORZ

git-svn-id: https://svn.eduke32.com/eduke32@5616 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2016-02-07 02:38:32 +00:00
parent 69c928aa33
commit eaa2b90251
3 changed files with 12 additions and 0 deletions

View file

@ -571,6 +571,7 @@ const char *keyw[] =
"ifvarboth", // 394
"movesector", // 395
"for", // 396
"nextsectorneighborz", // 397
"<null>"
};
#endif
@ -4696,6 +4697,7 @@ DO_DEFSTATE:
case CON_MOVESPRITE:
case CON_SETSPRITE:
case CON_NEXTSECTORNEIGHBORZ:
C_GetManyVars(4);
if (tw == CON_MOVESPRITE)
{

View file

@ -1105,6 +1105,7 @@ enum ScriptKeywords_t
CON_IFVARBOTH, // 394
CON_MOVESECTOR, // 395
CON_FOR, // 396
CON_NEXTSECTORNEIGHBORZ,// 397
CON_END
};
// KEEPINSYNC with the keyword list in lunatic/con_lang.lua

View file

@ -2550,6 +2550,15 @@ nullquote:
G_InitTimer(Gv_GetVarX(*insptr++));
continue;
case CON_NEXTSECTORNEIGHBORZ:
insptr++;
{
int32_t params[4];
Gv_GetManyVars(4, params);
aGameVars[g_iReturnVarID].val.lValue = nextsectorneighborz(params[0], params[1], params[2], params[3]);
}
continue;
case CON_MOVESECTOR:
insptr++;
A_MoveSector(Gv_GetVarX(*insptr++));