From 3475c4011fe23aae20c0d3d6f42944a8957e9193 Mon Sep 17 00:00:00 2001 From: sphere Date: Thu, 9 Apr 2020 13:25:10 +0200 Subject: [PATCH] Change gas jet actions & clean up some flags and names. --- src/info.c | 6 +++--- src/info.h | 4 ++-- src/p_enemy.c | 11 +++++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/info.c b/src/info.c index 9c53b90eb..50117f5c3 100644 --- a/src/info.c +++ b/src/info.c @@ -370,7 +370,7 @@ char sprnames[NUMSPRITES + 1][5] = // Springs "FANS", // Fan - "STEM", // Steam riser + "STEM", // Steam jet "BUMP", // Bumpers "BLON", // Balloons "SPRY", // Yellow spring @@ -3106,7 +3106,7 @@ state_t states[NUMSTATES] = {SPR_FANS, 3, 1, {A_FanBubbleSpawn}, 1024, 0, S_FAN5}, // S_FAN4 {SPR_FANS, 4, 1, {A_FanBubbleSpawn}, 512, 0, S_FAN}, // S_FAN5 - // Steam Riser + // Steam jet {SPR_STEM, 0, 2, {A_SetSolidSteam}, 0, 0, S_STEAM2}, // S_STEAM1 {SPR_STEM, 1, 2, {NULL}, 0, 0, S_STEAM3}, // S_STEAM2 {SPR_STEM, 2, 2, {NULL}, 0, 0, S_STEAM4}, // S_STEAM3 @@ -7408,7 +7408,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 20*FRACUNIT, // mass 0, // damage sfx_None, // activesound - MF_SOLID|MF_SPRING, // flags + MF_SPRING, // flags S_NULL // raisestate }, diff --git a/src/info.h b/src/info.h index f8a713674..b6246347f 100644 --- a/src/info.h +++ b/src/info.h @@ -633,7 +633,7 @@ typedef enum sprite // Springs SPR_FANS, // Fan - SPR_STEM, // Steam riser + SPR_STEM, // Steam jet SPR_BUMP, // Bumpers SPR_BLON, // Balloons SPR_SPRY, // Yellow spring @@ -3247,7 +3247,7 @@ typedef enum state S_FAN4, S_FAN5, - // Steam Riser + // Steam jet S_STEAM1, S_STEAM2, S_STEAM3, diff --git a/src/p_enemy.c b/src/p_enemy.c index 09d33c537..ce59a02e7 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -4921,7 +4921,7 @@ void A_ThrownRing(mobj_t *actor) // Function: A_SetSolidSteam // -// Description: Makes steam solid so it collides with the player to boost them. +// Description: Applies the spring flag to steam jets, and randomly plays one of two sounds. // // var1 = unused // var2 = unused @@ -4931,8 +4931,8 @@ void A_SetSolidSteam(mobj_t *actor) if (LUA_CallAction("A_SetSolidSteam", actor)) return; - actor->flags &= ~MF_NOCLIP; - actor->flags |= MF_SOLID; + actor->flags |= MF_SPRING; + if (!(actor->flags2 & MF2_AMBUSH)) { if (P_RandomChance(FRACUNIT/8)) @@ -4952,7 +4952,7 @@ void A_SetSolidSteam(mobj_t *actor) // Function: A_UnsetSolidSteam // -// Description: Makes an object non-solid and also noclip. Used by the steam. +// Description: Removes the spring flag from an object. Used by steam jets. // // var1 = unused // var2 = unused @@ -4962,8 +4962,7 @@ void A_UnsetSolidSteam(mobj_t *actor) if (LUA_CallAction("A_UnsetSolidSteam", actor)) return; - actor->flags &= ~MF_SOLID; - actor->flags |= MF_NOCLIP; + actor->flags &= ~MF_SPRING; } // Function: A_SignSpin