mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
project_hyudoro: match Z to slope of center point
This commit is contained in:
parent
4819290ca2
commit
4c551a03ca
2 changed files with 16 additions and 1 deletions
|
|
@ -24673,7 +24673,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
0, // mass
|
0, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_SPECIAL|MF_NOCLIP|MF_NOGRAVITY|MF_DONTENCOREMAP|MF_APPLYTERRAIN, // flags
|
MF_SPECIAL|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_DONTENCOREMAP|MF_APPLYTERRAIN|MF_NOSQUISH, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
#include "../s_sound.h"
|
#include "../s_sound.h"
|
||||||
#include "../g_game.h"
|
#include "../g_game.h"
|
||||||
#include "../k_hitlag.h"
|
#include "../k_hitlag.h"
|
||||||
|
#include "../p_slopes.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
HYU_PATROL,
|
HYU_PATROL,
|
||||||
|
|
@ -150,6 +151,14 @@ project_hyudoro (mobj_t *hyu)
|
||||||
hyu->angle = angle + ANGLE_90;
|
hyu->angle = angle + ANGLE_90;
|
||||||
|
|
||||||
sine_bob(hyu, angle, FRACUNIT);
|
sine_bob(hyu, angle, FRACUNIT);
|
||||||
|
|
||||||
|
hyu->z = P_GetZAt(center->standingslope, hyu->x, hyu->y,
|
||||||
|
P_GetMobjGround(center));
|
||||||
|
|
||||||
|
if (P_IsObjectFlipped(hyu))
|
||||||
|
{
|
||||||
|
hyu->z -= hyu->height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -570,6 +579,12 @@ Obj_HyudoroDeploy (mobj_t *master)
|
||||||
center->angle = master->angle;
|
center->angle = master->angle;
|
||||||
Obj_InitHyudoroCenter(center, master);
|
Obj_InitHyudoroCenter(center, master);
|
||||||
|
|
||||||
|
// Update floorz to the correct position by indicating
|
||||||
|
// that it should be recalculated by P_MobjThinker.
|
||||||
|
center->floorz = master->z;
|
||||||
|
center->ceilingz = master->z + master->height;
|
||||||
|
center->z = P_GetMobjGround(center) - P_MobjFlip(center);
|
||||||
|
|
||||||
S_StartSound(master, sfx_s3k92); // scary ghost noise
|
S_StartSound(master, sfx_s3k92); // scary ghost noise
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue