From c1a54c60dbe602ff3b56602d663150cf532373c8 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 29 Aug 2015 10:21:52 +0000 Subject: [PATCH] CON: allow viewtype -8 for 'action', meaning to x-flip the shown sprite. Similarly to how -5 and -7 and are accepted since r3859. git-svn-id: https://svn.eduke32.com/eduke32@5335 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 6 +++++- polymer/eduke32/source/lunatic/control.lua | 2 +- polymer/eduke32/source/lunatic/lunacon.lua | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index f811da1f9..c9be00368 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7868,8 +7868,12 @@ PALONLY: k = getofs_viewtype7(s, t, getangle(s->x-ourx, s->y-oury), l<0); break; case 8: + case -8: k = (((s->ang+3072+128-oura)&2047)>>8)&7; - t->cstat &= ~4; + if (l > 0) + t->cstat &= ~4; + else + t->cstat |= 4; break; default: k = 0; diff --git a/polymer/eduke32/source/lunatic/control.lua b/polymer/eduke32/source/lunatic/control.lua index 9c80b512f..0aeca1702 100644 --- a/polymer/eduke32/source/lunatic/control.lua +++ b/polymer/eduke32/source/lunatic/control.lua @@ -104,7 +104,7 @@ local function truetab(tab) end -- KEEPINSYNC lunacon.lua -local ALLOWED_VIEWTYPE = truetab { 0, 1, 2, 3,4, 5, 7, 8, -5, -7 } +local ALLOWED_VIEWTYPE = truetab { 0, 1, 2, 3,4, 5, 7, 8, -5, -7, -8 } local function def_action_or_move(what, tab) if (lastid[what] <= -(2^31)) then diff --git a/polymer/eduke32/source/lunatic/lunacon.lua b/polymer/eduke32/source/lunatic/lunacon.lua index 391723118..985751e7a 100644 --- a/polymer/eduke32/source/lunatic/lunacon.lua +++ b/polymer/eduke32/source/lunatic/lunacon.lua @@ -1024,7 +1024,7 @@ function check.reserved_bits(flags, allowedbits, suffix) end -- KEEPINSYNC control.lua -Define.ALLOWED_VIEWTYPE = truetab { 0, 1, 2, 3,4, 5, 7, 8, -5, -7 } +Define.ALLOWED_VIEWTYPE = truetab { 0, 1, 2, 3,4, 5, 7, 8, -5, -7, -8 } function Define.composite(labeltype, identifier, ...) local oldtype = g_labeltype[identifier]