Merge branch 'master' into sal-cleanup

This commit is contained in:
TehRealSalt 2018-10-04 18:51:45 -04:00
commit 1955ff0dd0
10 changed files with 86 additions and 37 deletions

View file

@ -6704,6 +6704,54 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_KARMAWHEEL", // Karma player wheels "S_KARMAWHEEL", // Karma player wheels
// Thunder shield use stuff;
"S_KSPARK1", // Sparkling Radius
"S_KSPARK2",
"S_KSPARK3",
"S_KSPARK4",
"S_KSPARK5",
"S_KSPARK6",
"S_KSPARK7",
"S_KSPARK8",
"S_KSPARK9",
"S_KSPARK10",
"S_KSPARK11",
"S_KSPARK12",
"S_KSPARK13", // ... that's an awful lot.
"S_LZIO11", // Straight lightning bolt
"S_LZIO12",
"S_LZIO13",
"S_LZIO14",
"S_LZIO15",
"S_LZIO16",
"S_LZIO17",
"S_LZIO18",
"S_LZIO19",
"S_LZIO21", // Straight lightning bolt (flipped)
"S_LZIO22",
"S_LZIO23",
"S_LZIO24",
"S_LZIO25",
"S_LZIO26",
"S_LZIO27",
"S_LZIO28",
"S_LZIO29",
"S_KLIT1", // Diagonal lightning. No, it not being straight doesn't make it gay.
"S_KLIT2",
"S_KLIT3",
"S_KLIT4",
"S_KLIT5",
"S_KLIT6",
"S_KLIT7",
"S_KLIT8",
"S_KLIT9",
"S_KLIT10",
"S_KLIT11",
"S_KLIT12",
#ifdef SEENAMES #ifdef SEENAMES
"S_NAMECHECK", "S_NAMECHECK",
#endif #endif

View file

@ -4089,7 +4089,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
4, // mass 4, // mass
0, // damage 0, // damage
sfx_None, // activesound sfx_None, // activesound
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY, // flags MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY|MF_SCENERY, // flags
S_NULL // raisestate S_NULL // raisestate
}, },

View file

@ -3557,8 +3557,8 @@ typedef enum state
S_KARMAWHEEL, S_KARMAWHEEL,
// Lightning shield use stuff; // Thunder shield use stuff;
S_KSPARK1, // Sparkling Radius S_KSPARK1, // Sparkling Radius
S_KSPARK2, S_KSPARK2,
S_KSPARK3, S_KSPARK3,
S_KSPARK4, S_KSPARK4,
@ -3571,7 +3571,7 @@ typedef enum state
S_KSPARK11, S_KSPARK11,
S_KSPARK12, S_KSPARK12,
S_KSPARK13, // ... that's an awful lot. S_KSPARK13, // ... that's an awful lot.
S_LZIO11, // Straight lightning bolt S_LZIO11, // Straight lightning bolt
S_LZIO12, S_LZIO12,
S_LZIO13, S_LZIO13,
@ -3581,7 +3581,7 @@ typedef enum state
S_LZIO17, S_LZIO17,
S_LZIO18, S_LZIO18,
S_LZIO19, S_LZIO19,
S_LZIO21, // Straight lightning bolt (flipped) S_LZIO21, // Straight lightning bolt (flipped)
S_LZIO22, S_LZIO22,
S_LZIO23, S_LZIO23,
@ -3591,7 +3591,7 @@ typedef enum state
S_LZIO27, S_LZIO27,
S_LZIO28, S_LZIO28,
S_LZIO29, S_LZIO29,
S_KLIT1, // Diagonal lightning. No, it not being straight doesn't make it gay. S_KLIT1, // Diagonal lightning. No, it not being straight doesn't make it gay.
S_KLIT2, S_KLIT2,
S_KLIT3, S_KLIT3,

View file

@ -4200,7 +4200,6 @@ static void K_KartUpdatePosition(player_t *player)
fixed_t oldposition = player->kartstuff[k_position]; fixed_t oldposition = player->kartstuff[k_position];
fixed_t i, ppcd, pncd, ipcd, incd; fixed_t i, ppcd, pncd, ipcd, incd;
fixed_t pmo, imo; fixed_t pmo, imo;
thinker_t *th;
mobj_t *mo; mobj_t *mo;
if (player->spectator || !player->mo) if (player->spectator || !player->mo)
@ -4225,16 +4224,8 @@ static void K_KartUpdatePosition(player_t *player)
player->kartstuff[k_nextcheck] = players[i].kartstuff[k_nextcheck] = 0; 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) // 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, pmo = P_AproxDistance(P_AproxDistance( mo->x - player->mo->x,
mo->y - player->mo->y), mo->y - player->mo->y),
mo->z - player->mo->z) / FRACUNIT; mo->z - player->mo->z) / FRACUNIT;

View file

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

View file

@ -48,6 +48,7 @@ actioncache_t actioncachehead;
static mobj_t *overlaycap = NULL; static mobj_t *overlaycap = NULL;
static mobj_t *shadowcap = NULL; static mobj_t *shadowcap = NULL;
mobj_t *waypointcap = NULL;
void P_InitCachedActions(void) void P_InitCachedActions(void)
{ {
@ -11077,6 +11078,8 @@ ML_NOCLIMB : Direction not controllable
else if (i == MT_BOSS3WAYPOINT) // SRB2kart 120217 - Used to store checkpoint num else if (i == MT_BOSS3WAYPOINT) // SRB2kart 120217 - Used to store checkpoint num
{ {
mobj->health = mthing->angle; mobj->health = mthing->angle;
P_SetTarget(&mobj->tracer, waypointcap);
P_SetTarget(&waypointcap, mobj);
} }
else if (i == MT_SPIKE) else if (i == MT_SPIKE)
{ {

View file

@ -429,6 +429,8 @@ typedef struct actioncache_s
extern actioncache_t actioncachehead; extern actioncache_t actioncachehead;
extern mobj_t *waypointcap;
void P_InitCachedActions(void); void P_InitCachedActions(void);
void P_RunCachedActions(void); void P_RunCachedActions(void);
void P_AddCachedAction(mobj_t *mobj, INT32 statenum); void P_AddCachedAction(mobj_t *mobj, INT32 statenum);

View file

@ -945,11 +945,10 @@ typedef enum
MD2_EXTVAL2 = 1<<6, MD2_EXTVAL2 = 1<<6,
MD2_HNEXT = 1<<7, MD2_HNEXT = 1<<7,
MD2_HPREV = 1<<8, MD2_HPREV = 1<<8,
MD2_COLORIZED = 1<<9,
MD2_WAYPOINTCAP = 1<<10
#ifdef ESLOPE #ifdef ESLOPE
MD2_SLOPE = 1<<9, , MD2_SLOPE = 1<<11
MD2_COLORIZED = 1<<10
#else
MD2_COLORIZED = 1<<9
#endif #endif
} mobj_diff2_t; } mobj_diff2_t;
@ -1146,6 +1145,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
#endif #endif
if (mobj->colorized) if (mobj->colorized)
diff2 |= MD2_COLORIZED; diff2 |= MD2_COLORIZED;
if (mobj == waypointcap)
diff2 |= MD2_WAYPOINTCAP;
if (diff2 != 0) if (diff2 != 0)
diff |= MD_MORE; diff |= MD_MORE;
@ -2165,6 +2166,9 @@ static void LoadMobjThinker(actionf_p1 thinker)
P_AddThinker(&mobj->thinker); P_AddThinker(&mobj->thinker);
if (diff2 & MD2_WAYPOINTCAP)
P_SetTarget(&waypointcap, mobj);
mobj->info = (mobjinfo_t *)next; // temporarily, set when leave this function mobj->info = (mobjinfo_t *)next; // temporarily, set when leave this function
} }

View file

@ -251,7 +251,7 @@ void P_SpawnSlope_Line(int linenum)
UINT8 flags = 0; // Slope flags UINT8 flags = 0; // Slope flags
if (line->flags & ML_NOSONIC) if (line->flags & ML_NOSONIC)
flags |= SL_NOPHYSICS; flags |= SL_NOPHYSICS;
if (line->flags & ML_NOTAILS) if (!(line->flags & ML_NOTAILS))
flags |= SL_NODYNAMIC; flags |= SL_NODYNAMIC;
if (line->flags & ML_NOKNUX) if (line->flags & ML_NOKNUX)
flags |= SL_ANCHORVERTEX; flags |= SL_ANCHORVERTEX;

View file

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