mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-10 18:12:46 +00:00
Rename kitemcap to trackercap
This commit is contained in:
parent
c41d0dee32
commit
be4c341316
7 changed files with 22 additions and 18 deletions
|
|
@ -1094,7 +1094,7 @@ static void K_BotItemJawz(player_t *player, ticcmd_t *cmd)
|
|||
target = &players[lastTarg];
|
||||
|
||||
// Make sure no other Jawz are targetting this player.
|
||||
for (mobj = kitemcap; mobj; mobj = next)
|
||||
for (mobj = trackercap; mobj; mobj = next)
|
||||
{
|
||||
next = mobj->itnext;
|
||||
|
||||
|
|
|
|||
|
|
@ -3494,7 +3494,7 @@ static void K_drawKartNameTags(void)
|
|||
mobj_t *mobj = NULL;
|
||||
mobj_t *next = NULL;
|
||||
|
||||
for (mobj = kitemcap; mobj; mobj = next)
|
||||
for (mobj = trackercap; mobj; mobj = next)
|
||||
{
|
||||
capsuletracking_t *caps = NULL;
|
||||
|
||||
|
|
@ -3927,7 +3927,7 @@ static void K_drawKartMinimap(void)
|
|||
}
|
||||
|
||||
// draw minimap-pertinent objects
|
||||
for (mobj = kitemcap; mobj; mobj = next)
|
||||
for (mobj = trackercap; mobj; mobj = next)
|
||||
{
|
||||
next = mobj->itnext;
|
||||
|
||||
|
|
|
|||
|
|
@ -5813,7 +5813,7 @@ static void K_DoShrink(player_t *user)
|
|||
mobj_t *mobj, *next;
|
||||
|
||||
// kill everything in the kitem list while we're at it:
|
||||
for (mobj = kitemcap; mobj; mobj = next)
|
||||
for (mobj = trackercap; mobj; mobj = next)
|
||||
{
|
||||
next = mobj->itnext;
|
||||
|
||||
|
|
|
|||
18
src/p_mobj.c
18
src/p_mobj.c
|
|
@ -53,9 +53,13 @@ consvar_t cv_movebob = CVAR_INIT ("movebob", "1.0", CV_FLOAT|CV_SAVE, CV_BobSpee
|
|||
actioncache_t actioncachehead;
|
||||
|
||||
static mobj_t *overlaycap = NULL;
|
||||
mobj_t *kitemcap = NULL; // Used for Kart offensive items (the ones that can get removed by sizedown)
|
||||
mobj_t *waypointcap = NULL;
|
||||
|
||||
// Used as a fast iterator to certain objects that help bot
|
||||
// AI, need HUD tracking or appear on the minimap. It's pretty
|
||||
// general purpose.
|
||||
mobj_t *trackercap = NULL;
|
||||
|
||||
void P_InitCachedActions(void)
|
||||
{
|
||||
actioncachehead.prev = actioncachehead.next = &actioncachehead;
|
||||
|
|
@ -5261,11 +5265,11 @@ void P_AddKartItem(mobj_t *thing)
|
|||
{
|
||||
I_Assert(thing != NULL);
|
||||
|
||||
if (kitemcap == NULL)
|
||||
P_SetTarget(&kitemcap, thing);
|
||||
if (trackercap == NULL)
|
||||
P_SetTarget(&trackercap, thing);
|
||||
else {
|
||||
mobj_t *mo;
|
||||
for (mo = kitemcap; mo && mo->itnext; mo = mo->itnext)
|
||||
for (mo = trackercap; mo && mo->itnext; mo = mo->itnext)
|
||||
;
|
||||
|
||||
I_Assert(mo != NULL);
|
||||
|
|
@ -5281,7 +5285,7 @@ void P_AddKartItem(mobj_t *thing)
|
|||
static void P_RemoveKartItem(mobj_t *thing)
|
||||
{
|
||||
mobj_t *mo, **p;
|
||||
for (mo = *(p = &kitemcap); mo; mo = *(p = &mo->itnext))
|
||||
for (mo = *(p = &trackercap); mo; mo = *(p = &mo->itnext))
|
||||
{
|
||||
if (mo != thing)
|
||||
continue;
|
||||
|
|
@ -5298,12 +5302,12 @@ void P_RunKartItems(void)
|
|||
{
|
||||
mobj_t *mobj, *next;
|
||||
|
||||
for (mobj = kitemcap; mobj; mobj = next)
|
||||
for (mobj = trackercap; mobj; mobj = next)
|
||||
{
|
||||
next = mobj->itnext;
|
||||
P_SetTarget(&mobj->itnext, NULL);
|
||||
}
|
||||
P_SetTarget(&kitemcap, NULL);
|
||||
P_SetTarget(&trackercap, NULL);
|
||||
}
|
||||
|
||||
void P_RunOverlays(void)
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ struct mobj_t
|
|||
mobj_t *hnext;
|
||||
mobj_t *hprev;
|
||||
|
||||
// One last pointer for kart item lists
|
||||
// One last pointer for trackers lists
|
||||
mobj_t *itnext;
|
||||
|
||||
INT32 health; // for player this is rings + 1 -- no it isn't, not any more!!
|
||||
|
|
@ -504,7 +504,7 @@ struct actioncache_t
|
|||
|
||||
extern actioncache_t actioncachehead;
|
||||
|
||||
extern mobj_t *kitemcap;
|
||||
extern mobj_t *trackercap;
|
||||
extern mobj_t *waypointcap;
|
||||
|
||||
void P_InitCachedActions(void);
|
||||
|
|
@ -517,7 +517,7 @@ boolean P_IsKartItem(INT32 type);
|
|||
boolean K_IsMissileOrKartItem(mobj_t *mo);
|
||||
boolean P_CanDeleteKartItem(INT32 type);
|
||||
void P_AddKartItem(mobj_t *thing); // needs to be called in k_kart.c
|
||||
void P_RunKartItems(void);
|
||||
void P_RunTrackers(void);
|
||||
|
||||
// check mobj against water content, before movement code
|
||||
void P_MobjCheckWater(mobj_t *mobj);
|
||||
|
|
|
|||
|
|
@ -2191,7 +2191,7 @@ static void SaveMobjThinker(savebuffer_t *save, const thinker_t *th, const UINT8
|
|||
diff2 |= MD2_DISPOFFSET;
|
||||
if (mobj == waypointcap)
|
||||
diff2 |= MD2_WAYPOINTCAP;
|
||||
if (mobj == kitemcap)
|
||||
if (mobj == trackercap)
|
||||
diff2 |= MD2_KITEMCAP;
|
||||
if (mobj->itnext)
|
||||
diff2 |= MD2_ITNEXT;
|
||||
|
|
@ -3610,7 +3610,7 @@ static thinker_t* LoadMobjThinker(savebuffer_t *save, actionf_p1 thinker)
|
|||
P_SetTarget(&waypointcap, mobj);
|
||||
|
||||
if (diff2 & MD2_KITEMCAP)
|
||||
P_SetTarget(&kitemcap, mobj);
|
||||
P_SetTarget(&trackercap, mobj);
|
||||
|
||||
R_AddMobjInterpolator(mobj);
|
||||
|
||||
|
|
@ -4251,7 +4251,7 @@ static void P_NetUnArchiveThinkers(savebuffer_t *save)
|
|||
P_InitThinkers();
|
||||
|
||||
// Oh my god don't blast random memory with our reference counts.
|
||||
waypointcap = kitemcap = NULL;
|
||||
waypointcap = trackercap = NULL;
|
||||
for (i = 0; i <= 15; i++)
|
||||
{
|
||||
skyboxcenterpnts[i] = skyboxviewpnts[i] = NULL;
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ void P_InitThinkers(void)
|
|||
{
|
||||
UINT8 i;
|
||||
waypointcap = NULL;
|
||||
kitemcap = NULL;
|
||||
trackercap = NULL;
|
||||
for (i = 0; i < NUM_THINKERLISTS; i++)
|
||||
thlist[i].prev = thlist[i].next = &thlist[i];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue