diff --git a/src/dehacked.c b/src/dehacked.c index 8b60ab61..99d95259 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -6704,6 +6704,54 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "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 "S_NAMECHECK", #endif diff --git a/src/info.c b/src/info.c index b3e4e7c7..c0fb24fb 100644 --- a/src/info.c +++ b/src/info.c @@ -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 }, diff --git a/src/info.h b/src/info.h index cfda742c..d0f4be59 100644 --- a/src/info.h +++ b/src/info.h @@ -3557,8 +3557,8 @@ typedef enum state S_KARMAWHEEL, - // Lightning shield use stuff; - S_KSPARK1, // Sparkling Radius + // Thunder shield use stuff; + S_KSPARK1, // Sparkling Radius S_KSPARK2, S_KSPARK3, S_KSPARK4, @@ -3571,7 +3571,7 @@ typedef enum state S_KSPARK11, S_KSPARK12, S_KSPARK13, // ... that's an awful lot. - + S_LZIO11, // Straight lightning bolt S_LZIO12, S_LZIO13, @@ -3581,7 +3581,7 @@ typedef enum state S_LZIO17, S_LZIO18, S_LZIO19, - + S_LZIO21, // Straight lightning bolt (flipped) S_LZIO22, S_LZIO23, @@ -3591,7 +3591,7 @@ typedef enum state S_LZIO27, S_LZIO28, S_LZIO29, - + S_KLIT1, // Diagonal lightning. No, it not being straight doesn't make it gay. S_KLIT2, S_KLIT3, diff --git a/src/k_kart.c b/src/k_kart.c index aadfd2d2..16d1cbce 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -4200,7 +4200,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) @@ -4225,16 +4224,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; diff --git a/src/m_menu.c b/src/m_menu.c index 1e952d1a..7dad1fca 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2737,6 +2737,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; } @@ -8708,23 +8709,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); } diff --git a/src/p_mobj.c b/src/p_mobj.c index baa21d45..9107547d 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -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) { @@ -11077,6 +11078,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) { diff --git a/src/p_mobj.h b/src/p_mobj.h index 34d1f644..df6e7642 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -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); diff --git a/src/p_saveg.c b/src/p_saveg.c index d9f43000..ffcc8789 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -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 } diff --git a/src/p_slopes.c b/src/p_slopes.c index c516fa97..35d4c423 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -251,7 +251,7 @@ void P_SpawnSlope_Line(int linenum) UINT8 flags = 0; // Slope flags if (line->flags & ML_NOSONIC) flags |= SL_NOPHYSICS; - if (line->flags & ML_NOTAILS) + if (!(line->flags & ML_NOTAILS)) flags |= SL_NODYNAMIC; if (line->flags & ML_NOKNUX) flags |= SL_ANCHORVERTEX; diff --git a/src/p_tick.c b/src/p_tick.c index 3a55353d..3c5ed0b9 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -180,6 +180,7 @@ void Command_CountMobjs_f(void) void P_InitThinkers(void) { thinkercap.prev = thinkercap.next = &thinkercap; + waypointcap = NULL; } //