diff --git a/src/deh_lua.c b/src/deh_lua.c index 516f9e2be..c9b750c0b 100644 --- a/src/deh_lua.c +++ b/src/deh_lua.c @@ -479,6 +479,13 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word) CacheAndPushConstant(L, word, i); return 1; } + + if (lua_compatmode) + for (i = 0; MOBJ_ALIASES[i].n; i++) + if (fastcmp(p, MOBJ_ALIASES[i].n)) { + CacheAndPushConstant(L, word, MOBJ_ALIASES[i].v); + return 1; + } return luaL_error(L, "mobjtype '%s' does not exist.\n", word); } else if (fastncmp("SPR_",word,4)) { diff --git a/src/deh_tables.c b/src/deh_tables.c index d8b904ab1..0107d7431 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -128,6 +128,16 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t #undef _ }; +struct int_const_s const MOBJ_ALIASES[] = { + {"BIRD", MT_FLICKY_01}, + {"BUNNY" , MT_FLICKY_02}, + {"MOUSE" , MT_FLICKY_12}, + {"CHICKEN" , MT_FLICKY_03}, + {"REDBIRD", MT_FLICKY_10}, + {"COW", MT_FLICKY_11}, + { NULL, 0 } +}; + const char *const MOBJFLAG_LIST[] = { "SPECIAL", "SOLID", @@ -944,13 +954,13 @@ struct int_const_s const INT_CONST[] = { {"PRECIP_NONE",PRECIP_NONE}, {"PRECIP_RAIN",PRECIP_RAIN}, {"PRECIP_SNOW",PRECIP_SNOW}, - {"PRECIP_BLIZZARD",PRECIP_BLIZZARD}, {"PRECIP_STORM",PRECIP_STORM}, {"PRECIP_STORM_NORAIN",PRECIP_STORM_NORAIN}, {"PRECIP_STORM_NOSTRIKES",PRECIP_STORM_NOSTRIKES}, // Carrying {"CR_NONE",CR_NONE}, + {"CR_SLIDING",CR_SLIDING}, {"CR_ZOOMTUBE",CR_ZOOMTUBE}, // Character flags (skinflags_t) diff --git a/src/deh_tables.h b/src/deh_tables.h index 65f05b0d3..4451f6b51 100644 --- a/src/deh_tables.h +++ b/src/deh_tables.h @@ -74,6 +74,7 @@ extern actionpointer_t actionpointers[]; // Array mapping action names to action extern const char *const STATE_LIST[]; extern struct int_const_s const STATE_ALIASES[]; extern const char *const MOBJTYPE_LIST[]; +extern struct int_const_s const MOBJ_ALIASES[]; extern const char *const MOBJFLAG_LIST[]; extern const char *const MOBJFLAG2_LIST[]; // \tMF2_(\S+).*// (.+) --> \t"\1", // \2 extern const char *const MOBJEFLAG_LIST[]; diff --git a/src/doomstat.h b/src/doomstat.h index 90ec96e2e..63a368d77 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -76,7 +76,6 @@ typedef enum PRECIP_RAIN, PRECIP_SNOW, - PRECIP_BLIZZARD, PRECIP_STORM, PRECIP_STORM_NORAIN, PRECIP_STORM_NOSTRIKES, diff --git a/src/g_game.c b/src/g_game.c index 62876415b..f0dc9e830 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -107,7 +107,6 @@ precipprops_t precipprops[MAXPRECIP] = {"NONE", MT_NULL, 0}, // PRECIP_NONE {"RAIN", MT_RAIN, 0}, // PRECIP_RAIN {"SNOW", MT_SNOWFLAKE, 0}, // PRECIP_SNOW - {"BLIZZARD", MT_BLIZZARDSNOW, 0}, // PRECIP_BLIZZARD {"STORM", MT_RAIN, PRECIPFX_THUNDER|PRECIPFX_LIGHTNING}, // PRECIP_STORM {"STORM_NORAIN", MT_NULL, PRECIPFX_THUNDER|PRECIPFX_LIGHTNING}, // PRECIP_STORM_NORAIN {"STORM_NOSTRIKES", MT_RAIN, PRECIPFX_THUNDER} // PRECIP_STORM_NOSTRIKES diff --git a/src/info/mobjs.h b/src/info/mobjs.h index 9458fe8de..0eca5525f 100644 --- a/src/info/mobjs.h +++ b/src/info/mobjs.h @@ -426,7 +426,6 @@ _(SEED) // Environmental Effects _(RAIN) // Rain _(SNOWFLAKE) // Snowflake -_(BLIZZARDSNOW) // Blizzard Snowball _(SPLISH) // Water splish! _(LAVASPLISH) // Lava splish! _(SMOKE) @@ -569,14 +568,6 @@ _(ROCKCRUMBLE14) _(ROCKCRUMBLE15) _(ROCKCRUMBLE16) -// Level debris -_(GFZDEBRIS) -_(BRICKDEBRIS) -_(WOODDEBRIS) -_(REDBRICKDEBRIS) // for CEZ3 -_(BLUEBRICKDEBRIS) // for CEZ3 -_(YELLOWBRICKDEBRIS) // for CEZ3 - // SRB1 Badniks _(SRB1_CRAWLA) _(SRB1_BAT) diff --git a/src/info/sprites.h b/src/info/sprites.h index 210902f9d..b8328f6ab 100644 --- a/src/info/sprites.h +++ b/src/info/sprites.h @@ -292,7 +292,6 @@ _(BSTR) // Red Booster // Environmental Effects _(RAIN) // Rain _(SNO1) // Snowflake -_(SNO2) // Blizzard Snowball _(SPLH) // Water Splish _(LSPL) // Lava Splish _(SPLA) // Water Splash diff --git a/src/info/states.h b/src/info/states.h index 1524c4efa..cbeb41bb4 100644 --- a/src/info/states.h +++ b/src/info/states.h @@ -2026,11 +2026,6 @@ _(SNOW1) _(SNOW2) _(SNOW3) -// Blizzard Snowball -_(BLIZZARDSNOW1) -_(BLIZZARDSNOW2) -_(BLIZZARDSNOW3) - // Water Splish _(SPLISH1) _(SPLISH2) @@ -2527,14 +2522,6 @@ _(ROCKCRUMBLEN) _(ROCKCRUMBLEO) _(ROCKCRUMBLEP) -// Level debris -_(GFZDEBRIS) -_(BRICKDEBRIS) -_(WOODDEBRIS) -_(REDBRICKDEBRIS) // for CEZ3 -_(BLUEBRICKDEBRIS) // for CEZ3 -_(YELLOWBRICKDEBRIS) // for CEZ3 - // SRB1 Badniks _(SRB1_CRAWLA1) _(SRB1_CRAWLA2) diff --git a/src/p_floor.c b/src/p_floor.c index 05cfe8191..cbd3bfded 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -1030,7 +1030,6 @@ static mobj_t *SearchMarioNode(msecnode_t *node) case MT_SUPERSPARK: case MT_RAIN: case MT_SNOWFLAKE: - case MT_BLIZZARDSNOW: case MT_SPLISH: case MT_LAVASPLISH: case MT_SMOKE: diff --git a/src/p_local.h b/src/p_local.h index 8df94fe9e..dd0980b32 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -577,7 +577,7 @@ struct BasicFF_t #define DMG_SPECTATOR 0x83 #define DMG_TIMEOVER 0x84 // Masks -//free 0x10 // Flag - setting this flag allows objects to damage you if you're already in spinout. The effect is reversed on objects with MF_MISSILE (setting it prevents them from comboing in spinout) +//free 0x10 #define DMG_STEAL 0x20 // Flag - can steal bumpers, will only deal damage to players, and will not deal damage outside Battle Mode. #define DMG_CANTHURTSELF 0x40 // Flag - cannot hurt your self or your team #define DMG_DEATHMASK DMG_INSTAKILL // if bit 7 is set, this is a death type instead of a damage type diff --git a/src/p_mobj.c b/src/p_mobj.c index b4cd4438d..4e8933e12 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -5655,8 +5655,6 @@ static void P_MobjSceneryThink(mobj_t *mobj) case MT_ROCKCRUMBLE14: case MT_ROCKCRUMBLE15: case MT_ROCKCRUMBLE16: - case MT_WOODDEBRIS: - case MT_BRICKDEBRIS: if (mobj->z <= P_FloorzAtPos(mobj->x, mobj->y, mobj->z, mobj->height) && mobj->state != &states[mobj->info->deathstate]) { diff --git a/src/p_mobj.h b/src/p_mobj.h index 32edf7dde..ae887a9f0 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -173,7 +173,7 @@ typedef enum typedef enum { MF2_AXIS = 1, // It's a NiGHTS axis! (For faster checking) - MF2_SHADOW = 1<<3, // DO NOT USE: for lua compatibility only + MF2_SHADOW = 1<<1, // DO NOT USE: for lua compatibility only MF2_DONTRESPAWN = 1<<2, // Don't respawn this object! MF2_DONTDRAW = 1<<3, // DO NOT USE: for lua compatibility only MF2_AUTOMATIC = 1<<4, // Thrown ring has automatic properties