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 "ifvarboth", // 394
"movesector", // 395 "movesector", // 395
"for", // 396 "for", // 396
"nextsectorneighborz", // 397
"<null>" "<null>"
}; };
#endif #endif
@ -4696,6 +4697,7 @@ DO_DEFSTATE:
case CON_MOVESPRITE: case CON_MOVESPRITE:
case CON_SETSPRITE: case CON_SETSPRITE:
case CON_NEXTSECTORNEIGHBORZ:
C_GetManyVars(4); C_GetManyVars(4);
if (tw == CON_MOVESPRITE) if (tw == CON_MOVESPRITE)
{ {

View file

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

View file

@ -2550,6 +2550,15 @@ nullquote:
G_InitTimer(Gv_GetVarX(*insptr++)); G_InitTimer(Gv_GetVarX(*insptr++));
continue; 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: case CON_MOVESECTOR:
insptr++; insptr++;
A_MoveSector(Gv_GetVarX(*insptr++)); A_MoveSector(Gv_GetVarX(*insptr++));