diff --git a/polymer/eduke32/source/actors.h b/polymer/eduke32/source/actors.h index 3bbaa6d2b..cd1722701 100644 --- a/polymer/eduke32/source/actors.h +++ b/polymer/eduke32/source/actors.h @@ -263,6 +263,7 @@ enum sflags_t { SFLAG_ROTFIXED = 0x00020000, SFLAG_HARDCODED_BADGUY = 0x00040000, SFLAG_DIDNOSE7WATER = 0x00080000, // used temporarily + SFLAG_NODAMAGEPUSH = 0x00100000, }; // Custom projectiles "workslike" flags. diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index c34e569cb..7735c050a 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10691,6 +10691,7 @@ static void G_LoadExtraPalettes(void) } #define SETBGFLAG(Tilenum) g_tile[Tilenum].flags |= SFLAG_HARDCODED_BADGUY +#define SETNDPFLAG(Tilenum) g_tile[Tilenum].flags |= SFLAG_NODAMAGEPUSH // Has to be after setting the dynamic names (e.g. SHARK). static void A_InitEnemyFlags(void) @@ -10729,8 +10730,17 @@ static void A_InitEnemyFlags(void) SETBGFLAG(BOSS4); SETBGFLAG(RAT); SETBGFLAG(ROTATEGUN); + + SETNDPFLAG(TANK); + SETNDPFLAG(BOSS1); + SETNDPFLAG(BOSS4); + SETNDPFLAG(BOSS2); + SETNDPFLAG(BOSS3); + SETNDPFLAG(RECON); + SETNDPFLAG(ROTATEGUN); } #undef SETBGFLAG +#undef SETNDPFLAG extern int32_t startwin_run(void); static void G_SetupGameButtons(void); diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 46b6e368d..b1f7e2057 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -4570,6 +4570,7 @@ static int32_t C_ParseCommand(int32_t loop) continue; } + // XXX: may remove bits set in A_InitEnemyFlags! g_tile[j].flags = *g_scriptPtr; continue; @@ -6170,6 +6171,7 @@ static void C_AddDefaultDefinitions(void) C_AddDefinition("SFLAG_NOCLIP", SFLAG_NOCLIP, LABEL_DEFINE); C_AddDefinition("SFLAG_SMOOTHMOVE", SFLAG_SMOOTHMOVE, LABEL_DEFINE); C_AddDefinition("SFLAG_NOTELEPORT", SFLAG_NOTELEPORT, LABEL_DEFINE); + C_AddDefinition("SFLAG_NODAMAGEPUSH", SFLAG_NODAMAGEPUSH, LABEL_DEFINE); C_AddDefinition("STR_MAPNAME",STR_MAPNAME,LABEL_DEFINE); C_AddDefinition("STR_MAPFILENAME",STR_MAPFILENAME,LABEL_DEFINE); diff --git a/polymer/eduke32/source/lunatic/con_lang.lua b/polymer/eduke32/source/lunatic/con_lang.lua index 74b65195f..d78e731d0 100644 --- a/polymer/eduke32/source/lunatic/con_lang.lua +++ b/polymer/eduke32/source/lunatic/con_lang.lua @@ -196,6 +196,7 @@ SFLAG = { SFLAG_ROTFIXED = -0x00020000, SFLAG_HARDCODED_BADGUY = -0x00040000, SFLAG_DIDNOSE7WATER = -0x00080000, + SFLAG_NODAMAGEPUSH = 0x00100000, -- RESERVED for actor.FLAGS.chain_*/replace_*: -- 0x08000000, 0x10000000, 0x20000000, 0x40000000 } diff --git a/polymer/eduke32/source/lunatic/defs.ilua b/polymer/eduke32/source/lunatic/defs.ilua index 6f29d06f6..b578bc7f8 100644 --- a/polymer/eduke32/source/lunatic/defs.ilua +++ b/polymer/eduke32/source/lunatic/defs.ilua @@ -2110,6 +2110,7 @@ local function our_gameactor(args) -- All good, set the tile bits in initial run and register the actor! -- XXX: Need to see if some other state living on the C side is clobbered -- by Lua state recreation. + -- TILE_FLAGS_SET_ONLY_ON_FIRST_RUN if (g_firstRun) then -- NOTE: when chaining, this allows passing different flags which are -- silently ORed. This may or may not be what the user intends, but it diff --git a/polymer/eduke32/source/lunatic/doc/lunatic.txt b/polymer/eduke32/source/lunatic/doc/lunatic.txt index d4859fa31..ee0e99797 100644 --- a/polymer/eduke32/source/lunatic/doc/lunatic.txt +++ b/polymer/eduke32/source/lunatic/doc/lunatic.txt @@ -1115,7 +1115,7 @@ Provides a mapping of symbolic names to values applicable as sprite Contains symbolic names of values applicable to <>'s `flags` input argument, most of which are described there. + `SHADOW`, `NVG`, `NOSHADE`, `NOPAL`, `NOEVENTS`, `NOLIGHT`, -`USEACTIVATOR`, `NOCLIP`, `SMOOTHMOVE`, `NOTELEPORT`. +`USEACTIVATOR`, `NOCLIP`, `SMOOTHMOVE`, `NOTELEPORT`, `NODAMAGEPUSH`. //`BADGUY`, diff --git a/polymer/eduke32/source/lunatic/test.lua b/polymer/eduke32/source/lunatic/test.lua index 7124922de..ff3d80d1c 100644 --- a/polymer/eduke32/source/lunatic/test.lua +++ b/polymer/eduke32/source/lunatic/test.lua @@ -525,6 +525,10 @@ gameactor{ D.APLAYER, AF.chain_end, end } +-- Add NODAMAGEPUSH flag to NEWBEAST. +-- XXX: Doesn't work because of defs.lua: TILE_FLAGS_SET_ONLY_ON_FIRST_RUN +gameactor { D.NEWBEAST, AF.chain_end + AF.NODAMAGEPUSH, function() end } + -- Also test actor code chaining: strength is doubled. gameactor { diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index f9def7340..d8be8f250 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -2265,7 +2265,7 @@ void A_DamageObject(int32_t i,int32_t sn) A_Shoot(i,BLOODSPLAT4); } - if (PN != TANK && PN != BOSS1 && PN != BOSS4 && PN != BOSS2 && PN != BOSS3 && PN != RECON && PN != ROTATEGUN) + if (!A_CheckSpriteFlags(i, SFLAG_NODAMAGEPUSH)) { if (sprite[i].extra > 0) {