* Bounce Droneman within hitbox instead of floorz
* Correct Droneman hiding so he always stays within hitbox even when invisible
This commit is contained in:
parent
d1a8e0baa0
commit
d0f0f475ce
|
@ -16134,7 +16134,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
1000, // mass
|
1000, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_ideya, // activesound
|
sfx_ideya, // activesound
|
||||||
MF_SPECIAL, // flags
|
MF_NOGRAVITY|MF_SPECIAL, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
25
src/p_mobj.c
25
src/p_mobj.c
|
@ -7871,13 +7871,11 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
|
|
||||||
// Bouncy bouncy!
|
// Bouncy bouncy!
|
||||||
droneman->angle += ANG10;
|
droneman->angle += ANG10;
|
||||||
if (droneman->flags2 & MF2_DONTDRAW)
|
if (!(droneman->flags2 & MF2_OBJECTFLIP)
|
||||||
droneman->momz = 0;
|
&& droneman->z <= mobj->z)
|
||||||
else if (!(droneman->flags2 & MF2_OBJECTFLIP)
|
|
||||||
&& droneman->z <= droneman->floorz)
|
|
||||||
droneman->momz = FixedMul(5*FRACUNIT, droneman->scale);
|
droneman->momz = FixedMul(5*FRACUNIT, droneman->scale);
|
||||||
else if ((droneman->flags2 & MF2_OBJECTFLIP)
|
else if ((droneman->flags2 & MF2_OBJECTFLIP)
|
||||||
&& droneman->z >= droneman->ceilingz - droneman->height)
|
&& droneman->z + droneman->height >= mobj->z + mobj->height)
|
||||||
droneman->momz = FixedMul(-5*FRACUNIT, droneman->scale);
|
droneman->momz = FixedMul(-5*FRACUNIT, droneman->scale);
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
@ -7890,8 +7888,8 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
if (bonustime)
|
if (bonustime)
|
||||||
{
|
{
|
||||||
CONS_Debug(DBG_NIGHTSBASIC, "Adding goal post\n");
|
CONS_Debug(DBG_NIGHTSBASIC, "Adding goal post\n");
|
||||||
if (droneman && droneman->state != &states[S_INVISIBLE])
|
if (droneman && !(droneman->flags2 & MF2_DONTDRAW))
|
||||||
P_SetMobjState(droneman, S_INVISIBLE);
|
droneman->flags2 |= MF2_DONTDRAW;
|
||||||
if (goalpost && goalpost->state == &states[S_INVISIBLE])
|
if (goalpost && goalpost->state == &states[S_INVISIBLE])
|
||||||
P_SetMobjState(goalpost, mobjinfo[goalpost->type].meleestate);
|
P_SetMobjState(goalpost, mobjinfo[goalpost->type].meleestate);
|
||||||
if (sparkle && sparkle->state == &states[S_INVISIBLE])
|
if (sparkle && sparkle->state == &states[S_INVISIBLE])
|
||||||
|
@ -7913,14 +7911,19 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
P_SetMobjState(goalpost, S_INVISIBLE);
|
P_SetMobjState(goalpost, S_INVISIBLE);
|
||||||
if (sparkle && sparkle->state != &states[S_INVISIBLE])
|
if (sparkle && sparkle->state != &states[S_INVISIBLE])
|
||||||
P_SetMobjState(sparkle, S_INVISIBLE);
|
P_SetMobjState(sparkle, S_INVISIBLE);
|
||||||
if (droneman && droneman->state == &states[S_INVISIBLE])
|
if (droneman)
|
||||||
P_SetMobjState(droneman, mobjinfo[droneman->type].meleestate);
|
{
|
||||||
|
if (droneman->state != &states[mobjinfo[droneman->type].meleestate])
|
||||||
|
P_SetMobjState(droneman, mobjinfo[droneman->type].meleestate);
|
||||||
|
if (droneman->flags2 & MF2_DONTDRAW)
|
||||||
|
droneman->flags2 &= ~MF2_DONTDRAW;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// else, hide it
|
// else, hide it
|
||||||
if (droneman && droneman->state != &states[S_INVISIBLE])
|
if (droneman && !(droneman->flags2 & MF2_DONTDRAW))
|
||||||
P_SetMobjState(droneman, S_INVISIBLE);
|
droneman->flags2 |= MF2_DONTDRAW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue