Revert "EVEN MORE"

This reverts commit 5ef78cbc16.
This commit is contained in:
Sally Coolatta 2022-05-22 22:02:21 -04:00
parent 098304bd99
commit 61d61dcf25
2 changed files with 39 additions and 32 deletions

View file

@ -37,15 +37,47 @@ K_ChangePlayerItem
#define hyudoro_itemtype(o) ((o)->movefactor) #define hyudoro_itemtype(o) ((o)->movefactor)
#define hyudoro_itemcount(o) ((o)->movecount) #define hyudoro_itemcount(o) ((o)->movecount)
#define hyudoro_hover_stack(o) ((o)->threshold) #define hyudoro_hover_stack(o) ((o)->threshold)
#define hyudoro_next(o) ((o)->tracer)
static mobj_t *
hyudoro_next (mobj_t *o)
{
I_Assert(o != NULL && P_MobjWasRemoved(o) == false);
I_Assert(o->tracer != NULL && P_MobjWasRemoved(o->tracer) == false);
return o->tracer;
}
#define hyudoro_stackpos(o) ((o)->reactiontime) #define hyudoro_stackpos(o) ((o)->reactiontime)
// cannot be combined // these next two functions cannot be combined
#define hyudoro_center(o) ((o)->target) static mobj_t *
#define hyudoro_target(o) ((o)->target) hyudoro_center (mobj_t *o)
{
I_Assert(o != NULL && P_MobjWasRemoved(o) == false);
I_Assert(o->target != NULL && P_MobjWasRemoved(o->target) == false);
return o->target;
}
static mobj_t *
hyudoro_target (mobj_t *o)
{
I_Assert(o != NULL && P_MobjWasRemoved(o) == false);
I_Assert(o->target != NULL && P_MobjWasRemoved(o->target) == false);
return o->target;
}
#define hyudoro_center_max_radius(o) ((o)->threshold) #define hyudoro_center_max_radius(o) ((o)->threshold)
#define hyudoro_center_master(o) ((o)->target)
static mobj_t *
hyudoro_center_master (mobj_t *o)
{
I_Assert(o != NULL && P_MobjWasRemoved(o) == false);
I_Assert(o->target != NULL && P_MobjWasRemoved(o->target) == false);
return o->target;
}
static angle_t static angle_t
trace_angle (mobj_t *hyu) trace_angle (mobj_t *hyu)
@ -94,8 +126,6 @@ get_hyudoro_target_player (mobj_t *hyu)
{ {
mobj_t *target = hyudoro_target(hyu); mobj_t *target = hyudoro_target(hyu);
I_Assert(target != NULL && P_MobjWasRemoved(target) == false);
return target ? target->player : NULL; return target ? target->player : NULL;
} }
@ -190,8 +220,6 @@ move_to_player (mobj_t *hyu)
angle_t angle; angle_t angle;
I_Assert(hyu != NULL && P_MobjWasRemoved(hyu) == false);
if (target == NULL || P_MobjWasRemoved(target) == true) if (target == NULL || P_MobjWasRemoved(target) == true)
return; return;
@ -211,10 +239,6 @@ deliver_item (mobj_t *hyu)
mobj_t *target = hyudoro_target(hyu); mobj_t *target = hyudoro_target(hyu);
player_t *player = target->player; player_t *player = target->player;
I_Assert(hyu != NULL && P_MobjWasRemoved(hyu) == false);
I_Assert(target != NULL && P_MobjWasRemoved(target) == false);
I_Assert(player != NULL);
P_SetTarget(&hyudoro_target(hyu), NULL); P_SetTarget(&hyudoro_target(hyu), NULL);
if (player) if (player)
@ -244,8 +268,6 @@ append_hyudoro
{ {
INT32 lastpos = 0; INT32 lastpos = 0;
I_Assert(hyu != NULL && P_MobjWasRemoved(hyu) == false);
while (is_hyudoro(*head)) while (is_hyudoro(*head))
{ {
lastpos = hyudoro_stackpos(*head); lastpos = hyudoro_stackpos(*head);
@ -292,11 +314,7 @@ hyudoro_patrol_hit_player
mobj_t *center = hyudoro_center(hyu); mobj_t *center = hyudoro_center(hyu);
I_Assert(hyu != NULL && P_MobjWasRemoved(hyu) == false); if (!player)
I_Assert(toucher != NULL && P_MobjWasRemoved(toucher) == false);
I_Assert(center != NULL && P_MobjWasRemoved(center) == false);
if (player == NULL)
return false; return false;
// Cannot hit its master // Cannot hit its master
@ -338,8 +356,6 @@ award_immediately (mobj_t *hyu)
{ {
player_t *player = get_hyudoro_target_player(hyu); player_t *player = get_hyudoro_target_player(hyu);
I_Assert(hyu != NULL && P_MobjWasRemoved(hyu) == false);
if (player) if (player)
{ {
if (player->itemamount && if (player->itemamount &&
@ -364,9 +380,6 @@ hyudoro_return_hit_player
( mobj_t * hyu, ( mobj_t * hyu,
mobj_t * toucher) mobj_t * toucher)
{ {
I_Assert(hyu != NULL && P_MobjWasRemoved(hyu) == false);
I_Assert(toucher != NULL && P_MobjWasRemoved(toucher) == false);
if (toucher != hyudoro_target(hyu)) if (toucher != hyudoro_target(hyu))
return false; return false;
@ -386,9 +399,7 @@ hyudoro_hover_await_stack (mobj_t *hyu)
{ {
player_t *player = get_hyudoro_target_player(hyu); player_t *player = get_hyudoro_target_player(hyu);
I_Assert(hyu != NULL && P_MobjWasRemoved(hyu) == false); if (!player)
if (player == NULL)
return false; return false;
// First in stack goes first // First in stack goes first
@ -442,8 +453,6 @@ Obj_HyudoroDeploy (mobj_t *master)
void void
Obj_HyudoroThink (mobj_t *hyu) Obj_HyudoroThink (mobj_t *hyu)
{ {
I_Assert(hyu != NULL && P_MobjWasRemoved(hyu) == false);
// Might get set from clipping slopes // Might get set from clipping slopes
hyu->momz = 0; hyu->momz = 0;

View file

@ -13464,8 +13464,6 @@ mobj_t *P_SpawnMobjFromMobj(mobj_t *mobj, fixed_t xofs, fixed_t yofs, fixed_t zo
{ {
mobj_t *newmobj; mobj_t *newmobj;
I_Assert(mobj != NULL && P_MobjWasRemoved(mobj) == false);
xofs = FixedMul(xofs, mobj->scale); xofs = FixedMul(xofs, mobj->scale);
yofs = FixedMul(yofs, mobj->scale); yofs = FixedMul(yofs, mobj->scale);
zofs = FixedMul(zofs, mobj->scale); zofs = FixedMul(zofs, mobj->scale);