mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Merge branch 'dragonbomber-height' into 'next'
Fix Dragonbomber z positioning See merge request STJr/SRB2!1004
This commit is contained in:
commit
3679df07aa
2 changed files with 3 additions and 2 deletions
|
@ -5294,7 +5294,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
100, // mass
|
100, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_BOUNCE|MF_RUNSPAWNFUNC, // flags
|
MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_SLIDEME|MF_RUNSPAWNFUNC, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -9206,10 +9206,11 @@ static void P_DragonbomberThink(mobj_t *mobj)
|
||||||
mobj->angle += DRAGONTURNSPEED;
|
mobj->angle += DRAGONTURNSPEED;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
boolean flip = mobj->spawnpoint->options & MTF_OBJECTFLIP;
|
||||||
fixed_t vspeed = FixedMul(mobj->info->speed >> 3, mobj->scale);
|
fixed_t vspeed = FixedMul(mobj->info->speed >> 3, mobj->scale);
|
||||||
fixed_t x = mobj->spawnpoint->x << FRACBITS;
|
fixed_t x = mobj->spawnpoint->x << FRACBITS;
|
||||||
fixed_t y = mobj->spawnpoint->y << FRACBITS;
|
fixed_t y = mobj->spawnpoint->y << FRACBITS;
|
||||||
fixed_t z = mobj->spawnpoint->z << FRACBITS;
|
fixed_t z = (flip ? P_GetSectorCeilingZAt : P_GetSectorFloorZAt)(R_PointInSubsector(x, y)->sector, x, y) + (flip ? -1 : 1)*(mobj->spawnpoint->z << FRACBITS);
|
||||||
angle_t diff = R_PointToAngle2(mobj->x, mobj->y, x, y) - mobj->angle;
|
angle_t diff = R_PointToAngle2(mobj->x, mobj->y, x, y) - mobj->angle;
|
||||||
if (diff > ANGLE_180)
|
if (diff > ANGLE_180)
|
||||||
mobj->angle -= DRAGONTURNSPEED;
|
mobj->angle -= DRAGONTURNSPEED;
|
||||||
|
|
Loading…
Reference in a new issue