Merge branch 'fix-orbinaut-splay' into 'master'

Fixed dropped orbinauts

See merge request KartKrew/Kart!1230
This commit is contained in:
toaster 2023-05-12 12:10:26 +00:00
commit 488cd3bd85
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->flags &= ~(MF_NOCLIP|MF_NOCLIPTHING);
} }
dropwork->flags2 |= MF2_AMBUSH; if (type == MT_ORBINAUT)
{
Obj_OrbinautDrop(dropwork);
}
else
{
dropwork->flags2 |= MF2_AMBUSH;
}
dropwork->z += flip; dropwork->z += flip;
@ -6290,7 +6297,11 @@ void K_DropHnextList(player_t *player)
P_Thrust(dropwork, work->angle - ANGLE_90, 6*mapobjectscale); P_Thrust(dropwork, work->angle - ANGLE_90, 6*mapobjectscale);
dropwork->movecount = 2; 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); 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_GachaBomThrown(mobj_t *th, fixed_t finalSpeed, SINT8 dir);
void Obj_OrbinautJawzMoveHeld(player_t *player); void Obj_OrbinautJawzMoveHeld(player_t *player);
boolean Obj_GachaBomWasTossed(mobj_t *th); boolean Obj_GachaBomWasTossed(mobj_t *th);
void Obj_OrbinautDrop(mobj_t *th);
/* Jawz */ /* Jawz */
void Obj_JawzThink(mobj_t *th); 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; return (orbinaut_flags(th) & ORBI_TOSSED) == ORBI_TOSSED;
} }
void Obj_OrbinautDrop(mobj_t *th)
{
orbinaut_flags(th) |= ORBI_DROPPED;
}