Orbinaut shield: fix dropped state

- Fixes dropped orbinauts driving in circles
- Fixes dropped orbinauts not stopping once land on ground
This commit is contained in:
James R 2023-05-10 21:53:35 -07:00
parent 5c5157bce5
commit 21703c1504
3 changed files with 19 additions and 2 deletions

View file

@ -6276,7 +6276,14 @@ void K_DropHnextList(player_t *player)
dropwork->flags &= ~(MF_NOCLIP|MF_NOCLIPTHING);
}
dropwork->flags2 |= MF2_AMBUSH;
if (type == MT_ORBINAUT)
{
Obj_OrbinautDrop(dropwork);
}
else
{
dropwork->flags2 |= MF2_AMBUSH;
}
dropwork->z += flip;
@ -6290,7 +6297,11 @@ void K_DropHnextList(player_t *player)
P_Thrust(dropwork, work->angle - ANGLE_90, 6*mapobjectscale);
dropwork->movecount = 2;
dropwork->movedir = work->angle - ANGLE_90;
// TODO: movedir doesn't seem to be used by
// anything. It conflicts with orbinaut_flags so
// is commented out.
//dropwork->movedir = work->angle - ANGLE_90;
P_SetMobjState(dropwork, dropwork->info->deathstate);

View file

@ -52,6 +52,7 @@ void Obj_OrbinautThrown(mobj_t *th, fixed_t finalSpeed, SINT8 dir);
void Obj_GachaBomThrown(mobj_t *th, fixed_t finalSpeed, SINT8 dir);
void Obj_OrbinautJawzMoveHeld(player_t *player);
boolean Obj_GachaBomWasTossed(mobj_t *th);
void Obj_OrbinautDrop(mobj_t *th);
/* Jawz */
void Obj_JawzThink(mobj_t *th);

View file

@ -441,3 +441,8 @@ boolean Obj_GachaBomWasTossed(mobj_t *th)
{
return (orbinaut_flags(th) & ORBI_TOSSED) == ORBI_TOSSED;
}
void Obj_OrbinautDrop(mobj_t *th)
{
orbinaut_flags(th) |= ORBI_DROPPED;
}