diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 042bc0ef9..783ae63c9 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -433,6 +433,7 @@ char *keyw[] = { "setinput", // 286 "getinput", // 287 "save", // 288 + "cansee", // 289 "" }; @@ -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; diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 4d2989422..2f5b68a25 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -713,5 +713,6 @@ enum keywords { CON_SETINPUT, // 286 CON_GETINPUT, // 287 CON_SAVE, // 288 + CON_CANSEE, // 289 END }; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 9d77c8479..06e5c9592 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -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;