diff --git a/src/info.c b/src/info.c index 9f8c2b8115169d5da5ce4e98f4ec12bba22966ae..90c8e825a0082f4e3d0d844fed79395e7f5d99b5 100644 --- a/src/info.c +++ b/src/info.c @@ -7493,12 +7493,12 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_steam1, // deathsound 0, // speed 32*FRACUNIT, // radius - 1*FRACUNIT, // height + 16*FRACUNIT, // height 0, // display offset 20*FRACUNIT, // mass 0, // damage sfx_None, // activesound - MF_SOLID, // flags + MF_SPECIAL, // flags S_NULL // raisestate }, diff --git a/src/p_enemy.c b/src/p_enemy.c index a386d8ee93d75a47c24e90bf67ccdc08220bab43..fd34f3f8564a53222eaed3ea039381381eeaac4e 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -5177,7 +5177,7 @@ void A_SetSolidSteam(mobj_t *actor) return; actor->flags &= ~MF_NOCLIP; - actor->flags |= MF_SOLID; + actor->flags |= MF_SPECIAL; if (!(actor->flags2 & MF2_AMBUSH)) { if (P_RandomChance(FRACUNIT/8)) @@ -5207,7 +5207,7 @@ void A_UnsetSolidSteam(mobj_t *actor) if (LUA_CallAction(A_UNSETSOLIDSTEAM, actor)) return; - actor->flags &= ~MF_SOLID; + actor->flags &= ~MF_SPECIAL; actor->flags |= MF_NOCLIP; } diff --git a/src/p_inter.c b/src/p_inter.c index 82169bc54304782f940fdac535456d18dc047150..b5cf45c221cac8a301235aed40a894d2b6d83647 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1878,6 +1878,21 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) toucher->tracer->flags2 = (toucher->tracer->flags2 & ~MF2_AMBUSH) | destambush; } return; + + case MT_STEAM: // Steam + fixed_t speed = special->info->mass; // conveniently, both fans and gas jets use this for the vertical thrust + SINT8 flipval = P_MobjFlip(special); // virtually everything here centers around the thruster's gravity, not the object's! + + if (special->state != &states[S_STEAM1]) // Only when it bursts + break; + + toucher->eflags |= MFE_SPRUNG; + toucher->momz = flipval * FixedMul(speed, FixedSqrt(FixedMul(special->scale, toucher->scale))); // scale the speed with both objects' scales, just like with springs! + + P_ResetPlayer(player); + if (player->panim != PA_FALL) + P_SetMobjState(toucher, S_PLAY_FALL); + return; default: // SOC or script pickup if (player->bot && player->bot != BOT_MPAI) return; diff --git a/src/p_map.c b/src/p_map.c index 7887c117de56907d7a51eccb3715ec0a32e14d61..3e9d14f38d1f42ed44214ce4b419ad748e6d99b1 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -502,7 +502,7 @@ springstate: return final; } -static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object) +static void P_DoFan(mobj_t *spring, mobj_t *object) { player_t *p = object->player; // will be NULL if not a player fixed_t zdist; // distance between bottoms @@ -552,22 +552,6 @@ static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object) p->powers[pw_carry] = CR_FAN; } break; - case MT_STEAM: // Steam - if (zdist > FixedMul(16*FRACUNIT, spring->scale)) - break; - if (spring->state != &states[S_STEAM1]) // Only when it bursts - break; - - object->eflags |= MFE_SPRUNG; - object->momz = flipval*FixedMul(speed, FixedSqrt(FixedMul(spring->scale, object->scale))); // scale the speed with both objects' scales, just like with springs! - - if (p) - { - P_ResetPlayer(p); - if (p->panim != PA_FALL) - P_SetMobjState(object, S_PLAY_FALL); - } - break; default: break; } @@ -1578,15 +1562,15 @@ static unsigned PIT_DoCheckThing(mobj_t *thing) if (thing->flags & MF_PUSHABLE) { - if (tmthing->type == MT_FAN || tmthing->type == MT_STEAM) - P_DoFanAndGasJet(tmthing, thing); + if (tmthing->type == MT_FAN) + P_DoFan(tmthing, thing); } if (tmthing->flags & MF_PUSHABLE) { - if (thing->type == MT_FAN || thing->type == MT_STEAM) + if (thing->type == MT_FAN) { - P_DoFanAndGasJet(thing, tmthing); + P_DoFan(thing, tmthing); return CHECKTHING_COLLIDE; } else if (thing->flags & MF_SPRING) @@ -1679,8 +1663,8 @@ static unsigned PIT_DoCheckThing(mobj_t *thing) } } - if (tmthing->type == MT_FAN || tmthing->type == MT_STEAM) - P_DoFanAndGasJet(tmthing, thing); + if (tmthing->type == MT_FAN) + P_DoFan(tmthing, thing); } if (tmthing->player) // Is the moving/interacting object the player? @@ -1688,8 +1672,8 @@ static unsigned PIT_DoCheckThing(mobj_t *thing) if (!tmthing->health) return CHECKTHING_IGNORE; - if (thing->type == MT_FAN || thing->type == MT_STEAM) - P_DoFanAndGasJet(thing, tmthing); + if (thing->type == MT_FAN) + P_DoFan(thing, tmthing); else if (thing->flags & MF_SPRING && tmthing->player->powers[pw_carry] != CR_MINECART) { if ( thing->z <= tmthing->z + tmthing->height @@ -1755,8 +1739,8 @@ static unsigned PIT_DoCheckThing(mobj_t *thing) // not solid not blocked unsigned collide = CHECKTHING_NOCOLLIDE; - if ((tmthing->flags & MF_SPRING || tmthing->type == MT_STEAM || tmthing->type == MT_SPIKE || tmthing->type == MT_WALLSPIKE) && (thing->player)) - ; // springs, gas jets and springs should never be able to step up onto a player + if ((tmthing->flags & MF_SPRING || tmthing->type == MT_SPIKE || tmthing->type == MT_WALLSPIKE) && (thing->player)) + ; // springs should never be able to step up onto a player // z checking at last // Treat noclip things as non-solid! else if ((thing->flags & (MF_SOLID|MF_NOCLIP)) == MF_SOLID