Commit d14a3c39 authored by Richard Gobeille's avatar Richard Gobeille Committed by Richard Gobeille
Browse files

editor: allow printext256 in 2d mode, add "ifin2d3dmode" for scripts to detect PIP usage

parent d3c082c7
......@@ -324,6 +324,7 @@ const char *keyw[] =
"ifoutside",
"ifnosounds",
"ifin3dmode",
"ifin2d3dmode",
"ifaimingsprite",
"ifaimingwall",
"ifaimingsector",
......@@ -2956,6 +2957,7 @@ repeatcase:
/// case CON_IFCANSEETARGET:
case CON_IFNOSOUNDS:
case CON_IFIN3DMODE:
case CON_IFIN2D3DMODE:
case CON_IFAIMINGSPRITE:
case CON_IFAIMINGWALL:
case CON_IFAIMINGSECTOR:
......
......@@ -456,6 +456,7 @@ enum ScriptKeywords_t
/// CON_IFCANSEETARGET,
CON_IFNOSOUNDS,
CON_IFIN3DMODE,
CON_IFIN2D3DMODE,
CON_IFAIMINGSPRITE,
CON_IFAIMINGWALL,
CON_IFAIMINGSECTOR,
......
......@@ -2592,7 +2592,7 @@ badindex:
}
else if (tw==CON_PRINTEXT256)
{
if (in3dmode())
//if (in3dmode())
{
if (col>=256)
col=0;
......@@ -3149,7 +3149,9 @@ dodefault:
case CON_IFIN3DMODE:
VM_DoConditional(in3dmode());
continue;
case CON_IFIN2D3DMODE:
VM_DoConditional(m32_is2d3dmode());
continue;
// ifaimingsprite and -wall also work in 2d mode, but you must "and" with 16383 yourself
case CON_IFAIMINGSPRITE:
VM_DoConditional(AIMING_AT_SPRITE || (!in3dmode() && pointhighlight>=16384));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment