mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-15 17:21:34 +00:00
Experimental: Making the ghetto waypoints we have right now their own mobj list in order to make them slightly less bullshit
This commit is contained in:
parent
eb4a967d8e
commit
ab59504be0
6 changed files with 16 additions and 15 deletions
|
@ -4089,7 +4089,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
4, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY, // flags
|
||||
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
|
11
src/k_kart.c
11
src/k_kart.c
|
@ -4235,7 +4235,6 @@ static void K_KartUpdatePosition(player_t *player)
|
|||
fixed_t oldposition = player->kartstuff[k_position];
|
||||
fixed_t i, ppcd, pncd, ipcd, incd;
|
||||
fixed_t pmo, imo;
|
||||
thinker_t *th;
|
||||
mobj_t *mo;
|
||||
|
||||
if (player->spectator || !player->mo)
|
||||
|
@ -4260,16 +4259,8 @@ static void K_KartUpdatePosition(player_t *player)
|
|||
player->kartstuff[k_nextcheck] = players[i].kartstuff[k_nextcheck] = 0;
|
||||
|
||||
// This checks every thing on the map, and looks for MT_BOSS3WAYPOINT (the thing we're using for checkpoint wp's, for now)
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
for (mo = waypointcap; mo != NULL; mo = mo->tracer)
|
||||
{
|
||||
if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj at all, shoo
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
||||
if (mo->type != MT_BOSS3WAYPOINT) // TODO: Change to 'MT_WAYPOINT'?
|
||||
continue;
|
||||
|
||||
pmo = P_AproxDistance(P_AproxDistance( mo->x - player->mo->x,
|
||||
mo->y - player->mo->y),
|
||||
mo->z - player->mo->z) / FRACUNIT;
|
||||
|
|
|
@ -48,6 +48,7 @@ actioncache_t actioncachehead;
|
|||
|
||||
static mobj_t *overlaycap = NULL;
|
||||
static mobj_t *shadowcap = NULL;
|
||||
mobj_t *waypointcap = NULL;
|
||||
|
||||
void P_InitCachedActions(void)
|
||||
{
|
||||
|
@ -11076,6 +11077,8 @@ ML_NOCLIMB : Direction not controllable
|
|||
else if (i == MT_BOSS3WAYPOINT) // SRB2kart 120217 - Used to store checkpoint num
|
||||
{
|
||||
mobj->health = mthing->angle;
|
||||
P_SetTarget(&mobj->tracer, waypointcap);
|
||||
P_SetTarget(&waypointcap, mobj);
|
||||
}
|
||||
else if (i == MT_SPIKE)
|
||||
{
|
||||
|
|
|
@ -429,6 +429,8 @@ typedef struct actioncache_s
|
|||
|
||||
extern actioncache_t actioncachehead;
|
||||
|
||||
extern mobj_t *waypointcap;
|
||||
|
||||
void P_InitCachedActions(void);
|
||||
void P_RunCachedActions(void);
|
||||
void P_AddCachedAction(mobj_t *mobj, INT32 statenum);
|
||||
|
|
|
@ -945,11 +945,10 @@ typedef enum
|
|||
MD2_EXTVAL2 = 1<<6,
|
||||
MD2_HNEXT = 1<<7,
|
||||
MD2_HPREV = 1<<8,
|
||||
MD2_COLORIZED = 1<<9,
|
||||
MD2_WAYPOINTCAP = 1<<10
|
||||
#ifdef ESLOPE
|
||||
MD2_SLOPE = 1<<9,
|
||||
MD2_COLORIZED = 1<<10
|
||||
#else
|
||||
MD2_COLORIZED = 1<<9
|
||||
, MD2_SLOPE = 1<<11
|
||||
#endif
|
||||
} mobj_diff2_t;
|
||||
|
||||
|
@ -1146,6 +1145,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
#endif
|
||||
if (mobj->colorized)
|
||||
diff2 |= MD2_COLORIZED;
|
||||
if (mobj == waypointcap)
|
||||
diff2 |= MD2_WAYPOINTCAP;
|
||||
if (diff2 != 0)
|
||||
diff |= MD_MORE;
|
||||
|
||||
|
@ -2165,6 +2166,9 @@ static void LoadMobjThinker(actionf_p1 thinker)
|
|||
|
||||
P_AddThinker(&mobj->thinker);
|
||||
|
||||
if (diff2 & MD2_WAYPOINTCAP)
|
||||
P_SetTarget(&waypointcap, mobj);
|
||||
|
||||
mobj->info = (mobjinfo_t *)next; // temporarily, set when leave this function
|
||||
}
|
||||
|
||||
|
|
|
@ -180,6 +180,7 @@ void Command_CountMobjs_f(void)
|
|||
void P_InitThinkers(void)
|
||||
{
|
||||
thinkercap.prev = thinkercap.next = &thinkercap;
|
||||
waypointcap = NULL;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue