Merge branch 'master' of https://git.magicalgirl.moe/KartKrew/Kart.git into toast_misc

This commit is contained in:
toaster 2018-10-03 21:04:34 +01:00
commit fdf398d003
7 changed files with 32 additions and 31 deletions

View File

@ -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
},

View File

@ -4255,7 +4255,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)
@ -4280,16 +4279,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;

View File

@ -2798,6 +2798,7 @@ boolean M_Responder(event_t *ev)
{
// detach any keys associated with the game control
G_ClearControlKeys(setupcontrols, currentMenu->menuitems[itemOn].alphaKey);
S_StartSound(NULL, sfx_shldls);
return true;
}
@ -8676,23 +8677,22 @@ static void M_ChangecontrolResponse(event_t *ev)
setupcontrols[control][found] = ch-KEY_4JOY1+KEY_DBL4JOY1;
}
else
{
// check if change key1 or key2, or replace the two by the new
found = 0;
if (setupcontrols[control][0] == KEY_NULL)
found++;
if (setupcontrols[control][1] == KEY_NULL)
found++;
if (found == 2)
{
found = 0;
setupcontrols[control][1] = KEY_NULL; //replace key 1,clear key2
}
G_CheckDoubleUsage(ch);
setupcontrols[control][found] = ch;
}
{
// check if change key1 or key2, or shuffle them along in a queue
found = 0;
if (setupcontrols[control][0] != KEY_NULL)
{
found++;
if (setupcontrols[control][1] != KEY_NULL)
setupcontrols[control][0] = setupcontrols[control][1];
}
G_CheckDoubleUsage(ch);
setupcontrols[control][found] = ch;
}
S_StartSound(NULL, sfx_strpst);
}
else
S_StartSound(NULL, sfx_skid);
M_StopMessage(0);
}

View File

@ -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)
{

View File

@ -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);

View File

@ -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
}

View File

@ -180,6 +180,7 @@ void Command_CountMobjs_f(void)
void P_InitThinkers(void)
{
thinkercap.prev = thinkercap.next = &thinkercap;
waypointcap = NULL;
}
//