CON_CANSEE

git-svn-id: https://svn.eduke32.com/eduke32@97 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-04-23 06:00:08 +00:00
parent f1ae584227
commit 910613a6d5
3 changed files with 24 additions and 2 deletions

View File

@ -433,6 +433,7 @@ char *keyw[] = {
"setinput", // 286
"getinput", // 287
"save", // 288
"cansee", // 289
"<null>"
};
@ -3850,9 +3851,10 @@ char parsecommand(void)
break;
case CON_HITSCAN:
case CON_CANSEE:
// get the ID of the DEF
transmultvars(7);
transmultvarstype(GAMEVAR_FLAG_READONLY,6);
transmultvars(tw==CON_CANSEE?8:7);
transmultvarstype(GAMEVAR_FLAG_READONLY,tw==CON_CANSEE?1:6);
transvar();
break;

View File

@ -713,5 +713,6 @@ enum keywords {
CON_SETINPUT, // 286
CON_GETINPUT, // 287
CON_SAVE, // 288
CON_CANSEE, // 289
END
};

View File

@ -4688,6 +4688,25 @@ SKIPJIBS:
break;
}
case CON_CANSEE:
{
long x1, y1, z1, sect1, x2, y2, z2, sect2, r, rvar;
insptr++;
x1=GetGameVarID(*insptr++,g_i,g_p);
y1=GetGameVarID(*insptr++,g_i,g_p);
z1=GetGameVarID(*insptr++,g_i,g_p);
sect1=GetGameVarID(*insptr++,g_i,g_p);
x2=GetGameVarID(*insptr++,g_i,g_p);
y2=GetGameVarID(*insptr++,g_i,g_p);
z2=GetGameVarID(*insptr++,g_i,g_p);
sect2=GetGameVarID(*insptr++,g_i,g_p);
rvar=*insptr++;
r = cansee(x1,y1,z1,sect1,x2,y2,z2,sect2);
SetGameVarID(rvar, r, g_i, g_p);
break;
}
case CON_ROTATEPOINT:
{
long xpivot, ypivot, x, y, x2, y2, x2var, y2var;