diff --git a/src/acs/ACSVM/ACSVM/Thread.cpp b/src/acs/ACSVM/ACSVM/Thread.cpp index e63cf3c13..d732dbd34 100644 --- a/src/acs/ACSVM/ACSVM/Thread.cpp +++ b/src/acs/ACSVM/ACSVM/Thread.cpp @@ -10,8 +10,10 @@ // //----------------------------------------------------------------------------- #ifdef __GNUC__ +#ifndef __clang__ #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #endif +#endif #include "Thread.hpp" #include "Array.hpp" diff --git a/src/acs/ACSVM/ACSVM/ThreadExec.cpp b/src/acs/ACSVM/ACSVM/ThreadExec.cpp index 374c143ec..b5c418409 100644 --- a/src/acs/ACSVM/ACSVM/ThreadExec.cpp +++ b/src/acs/ACSVM/ACSVM/ThreadExec.cpp @@ -10,8 +10,10 @@ // //----------------------------------------------------------------------------- #ifdef __GNUC__ +#ifndef __clang__ #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #endif +#endif #include "Thread.hpp" #include "Array.hpp" diff --git a/src/d_main.cpp b/src/d_main.cpp index e6f7a5231..75dcc7d30 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -90,8 +90,8 @@ #define ASSET_HASH_TEXTURES_KART 0xb4211b2f32b6a291 #define ASSET_HASH_CHARS_KART 0x1e68a3e01aa5c68b #define ASSET_HASH_MAPS_KART 0x38558ed00da41ce9 -#define ASSET_HASH_MAIN_PK3 0xb0693454f15fa8e3 -#define ASSET_HASH_MAPPATCH_PK3 0x01ca675676c950a1 +#define ASSET_HASH_MAIN_PK3 0x8846aa9e124c1530 +#define ASSET_HASH_MAPPATCH_PK3 0x86007ab217bbd375 #define ASSET_HASH_BONUSCHARS_KART 0x60e6f13d822a7461 #ifdef USE_PATCH_FILE #define ASSET_HASH_PATCH_PK3 0x0000000000000000 diff --git a/src/d_net.c b/src/d_net.c index 7cfffbce9..79c34fa72 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -1006,7 +1006,7 @@ static boolean ShouldDropPacket(void) { doomdata_t *netbuffer = DOOMCOM_DATA(doomcom); return (packetdropquantity[netbuffer->packettype]) - || (packetdroprate != 0 && rand() < (RAND_MAX * (packetdroprate / 100.f))) || packetdroprate == 100; + || (packetdroprate != 0 && rand() < (RAND_MAX * (packetdroprate / 100))) || packetdroprate == 100; } #endif diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 0454ce4f9..514b61738 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -131,11 +131,6 @@ static void Skin2_OnChange(void); static void Skin3_OnChange(void); static void Skin4_OnChange(void); -static void Jitter_OnChange(void); -static void Jitter2_OnChange(void); -static void Jitter3_OnChange(void); -static void Jitter4_OnChange(void); - static void Follower_OnChange(void); static void Follower2_OnChange(void); static void Follower3_OnChange(void); @@ -6846,39 +6841,6 @@ static void Followercolor4_OnChange(void) } } -// Changes a player's jitter settings. -static void Jitter_OnChange(void) -{ - if (!Playing()) - return; // don't send anything there. - - SendNameAndColor(0); -} - -static void Jitter2_OnChange(void) -{ - if (!Playing()) - return; // don't send anything there. - - SendNameAndColor(1); -} - -static void Jitter3_OnChange(void) -{ - if (!Playing()) - return; // don't send anything there. - - SendNameAndColor(2); -} - -static void Jitter4_OnChange(void) -{ - if (!Playing()) - return; // don't send anything there. - - SendNameAndColor(3); -} - /** Sends a skin change for the console player, unless that player is moving. * \sa cv_skin, Skin2_OnChange, Color_OnChange * \author Graue diff --git a/src/doomdef.h b/src/doomdef.h index f1e9a57fd..8355f8528 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -103,7 +103,7 @@ extern "C" { // Special Hashing. //#define NOFILEHASH -//#define NOVERIFYIWADS +#define NOVERIFYIWADS // Uncheck this to compile debugging code //#define RANGECHECK diff --git a/src/f_dscredits.cpp b/src/f_dscredits.cpp index ce5ba5d32..bca73e4be 100644 --- a/src/f_dscredits.cpp +++ b/src/f_dscredits.cpp @@ -972,7 +972,7 @@ void F_SecretCreditsTicker(void) finalescene = elapsed; } - if ((((elapsed - finalescene) / FINALESECDELAY) != finalesecs)) + if ((((elapsed - finalescene) / FINALESECDELAY) != (longtic_t)finalesecs)) { finalesecs = ((elapsed - finalescene) / FINALESECDELAY); diff --git a/src/g_demo.c b/src/g_demo.c index b09928882..4ece52183 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -399,9 +399,9 @@ static UINT8 *G_ReadZipTic(ticcmd_t *cmd, UINT8 *dp, UINT16 version) if (version < 0x000a && ziptic & 0x8000) // ZT_BOT { UINT16 botziptic = READUINT16(dp); - if (botziptic & 1) READSINT8(dp); - if (botziptic & 2) READSINT8(dp); - if (botziptic & 4) READSINT8(dp); + if (botziptic & 1) (void)READSINT8(dp); + if (botziptic & 2) (void)READSINT8(dp); + if (botziptic & 4) (void)READSINT8(dp); } return dp; } @@ -1818,7 +1818,7 @@ void G_ConsGhostTic(INT32 playernum) gy = oldghost[playernum].y; gz = oldghost[playernum].z; - if (abs(px-gx) > syncleeway || abs(py-gy) > syncleeway || abs(pz-gz) > syncleeway) + if ((UINT32)abs(px-gx) > syncleeway || (UINT32)abs(py-gy) > syncleeway || (UINT32)abs(pz-gz) > syncleeway) { ghostext[playernum].desyncframes++; diff --git a/src/h_timers.cpp b/src/h_timers.cpp index 9a3a1276f..44b7b9dbc 100644 --- a/src/h_timers.cpp +++ b/src/h_timers.cpp @@ -252,7 +252,13 @@ void K_DisplayItemTimers(void) std::max(stplyr->spinouttimer, stplyr->wipeoutslow), {qche("K_DIZZ1"), qche("K_DIZZ2"), qche("K_DIZZ3"), qche("K_DIZZ4")}, {qche("MSO_HRT1"), qche("MSO_HRT2"), qche("MSO_HRT3"), qche("MSO_HRT4")}, - 3, .badtimer = true, + 3, + 0, + 0, + 0, + 0, + false, + true, } ); timers.push_back( @@ -261,7 +267,13 @@ void K_DisplayItemTimers(void) std::max(0, -stplyr->growshrinktimer), {qche("K_ISSHRK")}, {qche("HL_SHRNK")}, - 3, -15, -15, -4, -3, .badtimer = true, + 3, + -15, + -15, + -4, + -3, + false, + true, } ); timers.push_back( @@ -270,7 +282,13 @@ void K_DisplayItemTimers(void) (INT32)spbTimers[stplyr-players], {qche("IT_SPB1"), qche("IT_SPB2")}, {qche("IT_SPBS1"), qche("IT_SPBS2")}, - 1, .badtimer = (stplyr->position == K_GetBestRank()), + 1, + 0, + 0, + 0, + 0, + false, + (stplyr->position == K_GetBestRank()) } ); // Same with boost stacks @@ -280,7 +298,12 @@ void K_DisplayItemTimers(void) K_StackingActive() ? stplyr->numboosts : 0, {qche("IT_BOOST0"), qche("IT_BOOST1"), qche("IT_BOOST2"), qche("IT_BOOST3"), qche("IT_BOOST4"), qche("IT_BOOST3"), qche("IT_BOOST2"), qche("IT_BOOST1")}, {qche("MSO_SPD1"), qche("MSO_SPD2"), qche("MSO_SPD3"), qche("MSO_SPD4"), qche("MSO_SPD3"), qche("MSO_SPD2")}, - 3, .counter = true, + 3, + 0, + 0, + 0, + 0, + true, } ); @@ -290,7 +313,13 @@ void K_DisplayItemTimers(void) stplyr->deadtimer ? std::max(0, TICRATE - stplyr->deadtimer) : 0, {qche("IT_DED1"), qche("IT_DED2"), qche("IT_DED3"), qche("IT_DED4"), qche("IT_DED5"), qche("IT_DED6"), qche("IT_DED7"), qche("IT_DED8")}, {qche("IT_DEAD1"), qche("IT_DEAD2"), qche("IT_DEAD3"), qche("IT_DEAD4"), qche("IT_DEAD5"), qche("IT_DEAD6"), qche("IT_DEAD7"), qche("IT_DEAD8")}, - 1, .yoffs = -4, .badtimer = true, + 1, + 0, + -4, + 0, + 0, + false, + true, } ); diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 0d0b7431f..8558a7f93 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5574,7 +5574,7 @@ static void HWR_DrawSkyBackground(player_t *player) dimensionmultiply = ((float)textures[texturetranslation[skytexture]]->width/256.0f); - v[0].s = v[3].s = (-1.0f * angle) / ((ANGLE_90-1)*dimensionmultiply); // left + v[0].s = v[3].s = (-1.0f * angle) / (((float)ANGLE_90-1.0f)*dimensionmultiply); // left v[2].s = v[1].s = v[0].s + (1.0f/dimensionmultiply); // right (or left + 1.0f) // use +angle and -1.0f above instead if you wanted old backwards behavior diff --git a/src/k_hud.c b/src/k_hud.c index f645518d0..7782bbcbe 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -80,7 +80,7 @@ IMPL_HUD_OFFSET(want); // Wanted static CV_PossibleValue_t speedo_cons_t[]= { {0, "Default"}, {1, "Small"}, - //{2, "P-Meter"}, Readded later need to draw smaller sprites. + {2, "P-Meter"}, {0, NULL}}; consvar_t cv_newspeedometer = CVAR_INIT ("newspeedometer", "Small", CV_SAVE, speedo_cons_t, NULL); @@ -143,6 +143,7 @@ static patch_t *kp_ringdebtminussmall; static patch_t *kp_speedometersticker[2]; static patch_t *kp_speedometerlabel[4]; static patch_t *kp_kartzspeedo[25]; +static patch_t *kp_kartzspeedo_smol[25]; static patch_t *kp_driftgauge[12]; static patch_t *kp_driftgaugeparts[5]; @@ -433,6 +434,21 @@ void K_LoadKartHUDGraphics(void) } } + { + const char* patchNames[] = { + "K_KZSS1", "K_KZSS2", "K_KZSS3", "K_KZSS4", "K_KZSS5", + "K_KZSS6", "K_KZSS7", "K_KZSS8", "K_KZSS9", "K_KZSS10", + "K_KZSS11", "K_KZSS12", "K_KZSS13", "K_KZSS14", "K_KZSS15", + "K_KZSS16", "K_KZSS17", "K_KZSS18", "K_KZSS19", "K_KZSS20", + "K_KZSS21", "K_KZSS22", "K_KZSS23", "K_KZSS24", "K_KZSS25" + }; + + for (size_t m = 0; m < sizeof(patchNames) / sizeof(patchNames[0]); ++m) + { + kp_kartzspeedo_smol[m] = W_CachePatchName(patchNames[m], PU_HUDGFX); + } + } + // Extra ranking icons HU_UpdatePatch(&kp_rankbumper, "K_BLNICO"); @@ -2122,7 +2138,10 @@ INT32 K_DrawNeoTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines const UINT8 *colormap = NULL; UINT16 hightlightcolor = 0; INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2; - INT32 basey = y, basex = x, y2, x2; + INT32 y2, x2; + // INT32 basey = y, basex = x; + + (void)hilicol; scorelines--; @@ -2260,7 +2279,7 @@ void K_SetScoreboardModStatus(const char *name, SINT8 active) } #define BASEMODS 11 -void K_DrawServerMods(INT32 x, INT32 y) +static void K_DrawServerMods(INT32 x, INT32 y) { UINT8 i, j; INT32 xoff = 0, yoff = 10; @@ -2354,6 +2373,7 @@ void K_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, IN UINT16 hightlightcolor = 0; INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2; int basey = y, basex = x, y2; + (void)hilicol; V_DrawFill(1-duptweak, 26, dupadjust-2, 1, 0); // Draw a horizontal line because it looks nice! @@ -2533,7 +2553,7 @@ static void K_drawKartLaps(void) INT32 offsetx = 0; INT32 offsety = 0; - if (cv_newspeedometer.value == 0 && !K_RingsActive()) + if ((cv_newspeedometer.value == 0 || cv_newspeedometer.value == 2) && !K_RingsActive()) { offsetx = 25; offsety = 15; @@ -2564,13 +2584,13 @@ static void K_drawKartAccessibilityIcons(INT32 fx) if (cv_acce_xoffset.value == 0 && cv_acce_yoffset.value == 0) { - if (cv_newspeedometer.value == 0) + if (cv_newspeedometer.value == 0 || (cv_newspeedometer.value == 2 && !K_RingsActive())) { fy += 44; } else { - if (cv_kartspeedometer.value == 0 && !K_RingsActive()) + if ((cv_newspeedometer.value == 0 || cv_newspeedometer.value == 2) && !K_RingsActive()) fy += 18; if (gametype == GT_BATTLE) @@ -2715,11 +2735,11 @@ static void K_drawKartSpeedometer(void) V_DrawScaledPatch(SPDM_X+19, SPDM_Y-9 + battleoffset + ringoffset, V_HUDTRANS|splitflags, kp_facenum[numbers[2]]); V_DrawScaledPatch(SPDM_X+29, SPDM_Y-9 + battleoffset + ringoffset, V_HUDTRANS|splitflags, kp_speedometerlabel[labeln]); } - // Readded later need to draw smaller graphics. - /*else if (cv_newspeedometer.value == 2) + else if (cv_newspeedometer.value == 2) { fixed_t fuspeed = FixedDiv(stplyr->speed, mapobjectscale)/FRACUNIT; INT32 spdpatch = 0; + SINT8 yoffset = K_RingsActive() ? 12 : 18; #define NUM_INTERVALS 22 const int speedIntervals[NUM_INTERVALS] = {2, 5, 7, 10, 12, 15, 17, 20, 22, 25, 27, 30, 32, 35, 37, 40, 42, 45, 47, 50, 52, 55}; @@ -2739,10 +2759,10 @@ static void K_drawKartSpeedometer(void) else if (((fuspeed < 57 && fuspeed > 54) || (fuspeed < 60 && fuspeed > 56) || (fuspeed > 59)) && !(leveltime & 4)) spdpatch = 23; - V_DrawScaledPatch(SPDM_X, SPDM_Y-18 + battleoffset + ringoffset, V_HUDTRANS|splitflags, kp_kartzspeedo[spdpatch]); - }*/ + V_DrawScaledPatch(SPDM_X, SPDM_Y-yoffset + battleoffset + ringoffset, V_HUDTRANS|splitflags, (!K_RingsActive() ? kp_kartzspeedo : kp_kartzspeedo_smol)[spdpatch]); + } - K_drawKartAccessibilityIcons((cv_newspeedometer.value == 0) ? 50 : 56); + K_drawKartAccessibilityIcons((cv_newspeedometer.value == 0 || cv_newspeedometer.value == 2) ? 50 : 56); } static void K_drawRingMeter(void) @@ -2751,7 +2771,7 @@ static void K_drawRingMeter(void) UINT8 *ringmap = NULL; boolean colorring = false; SINT8 ringcount = stplyr->rings; - SINT8 overring = stplyr->rings % 20; + // SINT8 overring = stplyr->rings % 20; SINT8 ringmax = stplyr->ringmax; INT32 fx = 0, fy = 0, splitflags = 0; // stuff for 3p / 4p splitscreen. @@ -5398,7 +5418,7 @@ void K_drawKartHUD(void) } else { - K_drawKartAccessibilityIcons((cv_newspeedometer.value == 0) ? 50 : 0); + K_drawKartAccessibilityIcons((cv_newspeedometer.value == 0 || cv_newspeedometer.value == 2) ? 50 : 0); } if (LUA_HudEnabled(hud_rings) && K_RingsActive() == true) diff --git a/src/k_hud.h b/src/k_hud.h index 5e4d4e6ab..9266f8032 100644 --- a/src/k_hud.h +++ b/src/k_hud.h @@ -103,7 +103,7 @@ INT32 K_DrawNeoTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines void K_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer, INT32 hilicol); #define MAXSERVERMODS 255 -#define MAXSERVERMODNAME 13 +#define MAXSERVERMODNAME 14 struct servermods_t { diff --git a/src/k_kart.h b/src/k_kart.h index 772f3d3cb..282a08a0c 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -193,7 +193,6 @@ void K_FlipFromObject(mobj_t *mo, mobj_t *master); void K_MatchGenericExtraFlags(mobj_t *mo, mobj_t *master); void K_GenericExtraFlagsNoZAdjust(mobj_t *mo, mobj_t *master); void K_SpawnDashDustRelease(player_t *player); -void K_SpawnDriftBoostClip(player_t *player); void K_SpawnNormalSpeedLines(player_t *player); void K_SpawnDraftSpeedLines(player_t *player, fixed_t scale, skincolornum_t color, boolean translucent); void K_SpawnInvincibilitySpeedLines(mobj_t *mo); @@ -254,8 +253,6 @@ void K_SetRespawnAtNextWaypoint(player_t * player); INT16 K_GetKartTurnValue(const player_t *player, INT16 turnvalue); INT32 K_GetKartDriftSparkValue(const player_t *player); INT32 K_GetKartDriftSparkValueForStage(const player_t *player, UINT8 stage); -void K_SpawnDriftBoostExplosion(player_t *player, int stage); -void K_SpawnDriftElectricSparks(player_t *player); INT32 K_GetDriftAngleOffset(player_t *player); void K_KartUpdatePosition(player_t *player); void K_KartLegacyUpdatePosition(player_t *player); diff --git a/src/k_odds.c b/src/k_odds.c index e7f0d89c9..984211800 100644 --- a/src/k_odds.c +++ b/src/k_odds.c @@ -535,7 +535,7 @@ INT32 K_KartGetItemOdds( } else { - const INT32 distFromStart = max(0, secondToFirst - SPBSTARTDIST); + const INT32 distFromStart = max(secondToFirst - SPBSTARTDIST, 0); const INT32 distRange = SPBFORCEDIST - SPBSTARTDIST; const INT32 mulMax = 3; @@ -744,7 +744,7 @@ INT32 K_KartGetLegacyItemOdds(UINT8 pos, SINT8 item, fixed_t clusterDist, fixed_ } else if (pos != 9) // Force SPB { - const INT32 distFromStart = max(0, secondToFirst - SPBSTARTDIST); + const INT32 distFromStart = max(secondToFirst - SPBSTARTDIST , 0); const INT32 distRange = SPBFORCEDIST - SPBSTARTDIST; const fixed_t mulMax = 3*FRACUNIT; @@ -830,8 +830,7 @@ UINT8 K_FindUseodds(const player_t *player, fixed_t mashed, UINT32 pdis, UINT8 b fixed_t oddsfac = max(FRACUNIT, (MAXODDS * FRACUNIT) / 8); INT32 oddsdiv = ((MAXODDS - 1) * 2); - UINT8 i; - INT32 j; + UINT8 i, j; UINT8 useodds = 0; UINT8 disttable[oddsdiv]; UINT8 distlen = 0; @@ -842,7 +841,6 @@ UINT8 K_FindUseodds(const player_t *player, fixed_t mashed, UINT32 pdis, UINT8 b for (i = 0; i < MAXODDS; i++) { - UINT8 j; boolean available = false; if ((gametyperules & GTR_BATTLEODDS) && i > 1) @@ -938,7 +936,7 @@ UINT8 K_FindUseodds(const player_t *player, fixed_t mashed, UINT32 pdis, UINT8 b if (pdis == 0) useodds = disttable[0]; - else if (pdis > DISTVAR * ((12 * distlen) / oddsdiv)) + else if (pdis > (UINT32)DISTVAR * ((12 * distlen) / oddsdiv)) useodds = disttable[distlen-1]; else { @@ -946,7 +944,7 @@ UINT8 K_FindUseodds(const player_t *player, fixed_t mashed, UINT32 pdis, UINT8 b { INT32 distcalc = min(distlen-1, (i * distlen) / oddsdiv); - if (pdis <= usedistvar * distcalc) + if (pdis <= (UINT32)usedistvar * distcalc) { useodds = disttable[distcalc]; break; @@ -983,7 +981,6 @@ INT32 K_FindLegacyUseodds(player_t *player, fixed_t mashed, INT32 pingame, INT32 for (i = 0; i < MAXODDS; i++) { - INT32 j; boolean available = false; if ((gametyperules & GTR_BATTLEODDS) && i > 1) @@ -1207,7 +1204,7 @@ INT32 K_FindLegacyUseodds(player_t *player, fixed_t mashed, INT32 pingame, INT32 useodds = 69; } - else if (pdis > DISTVAR * ((12 * distlen) / oddsdiv)) + else if (pdis > (UINT32)DISTVAR * ((12 * distlen) / oddsdiv)) { // Back of the pack useodds = disttable[distlen-1]; diff --git a/src/lua_botvarslib.c b/src/lua_botvarslib.c index cca32b86b..42542bf27 100644 --- a/src/lua_botvarslib.c +++ b/src/lua_botvarslib.c @@ -169,68 +169,70 @@ static int botdata_get(lua_State *L) { case botdata_valid: lua_pushboolean(L, botdata != NULL); - return 1; + break; case botdata_itemdelay: lua_pushinteger(L, botdata->itemdelay); - return 1; + break; case botdata_itemconfirm: lua_pushinteger(L, botdata->itemconfirm); - return 1; + break; case botdata_turnconfirm: lua_pushinteger(L, botdata->turnconfirm); - return 1; + break; case botdata_respawnconfirm: lua_pushinteger(L, botdata->respawnconfirm); - return 1; + break; case botdata_driftstate: lua_pushinteger(L, botdata->driftstate); - return 1; + break; case botdata_driftturn: lua_pushinteger(L, botdata->driftturn); - return 1; + break; case botdata_drifttime: lua_pushinteger(L, botdata->drifttime); - return 1; + break; case botdata_driftlockout: lua_pushinteger(L, botdata->driftlockout); - return 1; + break; case botdata_driftmaxdist: lua_pushinteger(L, botdata->driftmaxdist); - return 1; + break; case botdata_driftpowerdiv: lua_pushinteger(L, botdata->driftpowerdiv); - return 1; + break; case botdata_driftstatedelay: lua_pushinteger(L, botdata->driftstatedelay); - return 1; + break; case botdata_driftskill: lua_pushfixed(L, botdata->driftskill); - return 1; + break; case botdata_acceldown: lua_pushboolean(L, botdata->acceldown); - return 1; + break; case botdata_brakedown: lua_pushboolean(L, botdata->brakedown); - return 1; + break; case botdata_driftdown: lua_pushboolean(L, botdata->driftdown); - return 1; + break; case botdata_itemdown: lua_pushboolean(L, botdata->itemdown); - return 1; + break; case botdata_dolookback: lua_pushboolean(L, botdata->dolookback); - return 1; + break; case botdata_itemwasdown: lua_pushboolean(L, botdata->itemwasdown); - return 1; + break; case botdata_itemthrow: lua_pushinteger(L, botdata->itemthrow); - return 1; + break; case botdata_turnamt: lua_pushinteger(L, botdata->turnamt); - return 1; + break; } + + return 1; } #define NOSET luaL_error(L, LUA_QL("botdata_t") " field " LUA_QS " should not be set directly.", botdata_opt[field]) @@ -248,65 +250,67 @@ static int botdata_set(lua_State *L) return NOSET; case botdata_itemdelay: botdata->itemdelay = luaL_checkinteger(L, 3); - return 0; + break; case botdata_itemconfirm: botdata->itemconfirm = luaL_checkinteger(L, 3); - return 0; + break; case botdata_turnconfirm: botdata->turnconfirm = luaL_checkinteger(L, 3); - return 0; + break; case botdata_respawnconfirm: botdata->respawnconfirm = luaL_checkinteger(L, 3); - return 0; + break; case botdata_driftstate: botdata->driftstate = luaL_checkinteger(L, 3); - return 0; + break; case botdata_driftturn: botdata->driftturn = luaL_checkinteger(L, 3); - return 0; + break; case botdata_drifttime: botdata->drifttime = luaL_checkinteger(L, 3); - return 0; + break; case botdata_driftlockout: botdata->driftlockout = luaL_checkinteger(L, 3); - return 0; + break; case botdata_driftmaxdist: botdata->driftmaxdist = luaL_checkinteger(L, 3); - return 0; + break; case botdata_driftpowerdiv: botdata->driftpowerdiv = luaL_checkinteger(L, 3); - return 0; + break; case botdata_driftstatedelay: botdata->driftstatedelay = luaL_checkinteger(L, 3); - return 0; + break; case botdata_driftskill: botdata->driftskill = luaL_checkfixed(L, 3); - return 0; + break; case botdata_acceldown: botdata->acceldown = luaL_checkboolean(L, 3); - return 0; + break; case botdata_brakedown: botdata->brakedown = luaL_checkboolean(L, 3); - return 0; + break; case botdata_driftdown: botdata->driftdown = luaL_checkboolean(L, 3); - return 0; + break; case botdata_itemdown: botdata->itemdown = luaL_checkboolean(L, 3); - return 0; + break; case botdata_dolookback: botdata->dolookback = luaL_checkboolean(L, 3); - return 0; + break; case botdata_itemwasdown: botdata->itemwasdown = luaL_checkboolean(L, 3); - return 0; + break; case botdata_itemthrow: botdata->itemthrow = luaL_checkinteger(L, 3); - return 0; + break; case botdata_turnamt: botdata->turnamt = luaL_checkinteger(L, 3); - return 0; + break; } + + return 0; } #undef NOSET diff --git a/src/p_saveg.c b/src/p_saveg.c index 7deb2a17a..2b5d0ad63 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -1781,13 +1781,11 @@ static void ArchiveLines(savebuffer_t *save) WRITEINT32(save->p, si->midtexture); if (diff2 & LD_ARGS) { - UINT8 j; for (j = 0; j < NUM_SCRIPT_ARGS; j++) WRITEINT32(save->p, li->args[j]); } if (diff2 & LD_STRINGARGS) { - UINT8 j; for (j = 0; j < NUM_SCRIPT_STRINGARGS; j++) { size_t len, k; diff --git a/src/p_user.c b/src/p_user.c index 25a1a7211..70c3ab444 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2665,8 +2665,6 @@ void P_DemoCameraMovement(camera_t *cam, UINT8 num) angle_t thrustangle; player_t *lastp; - boolean moving = false; - // first off we need to get button input cmd = D_LocalTiccmd(num); @@ -2685,12 +2683,10 @@ void P_DemoCameraMovement(camera_t *cam, UINT8 num) if (cmd->buttons & BT_ACCELERATE) { cam->z += 32*mapobjectscale; - moving = true; } else if (cmd->buttons & BT_BRAKE) { cam->z -= 32*mapobjectscale; - moving = true; } } @@ -2709,11 +2705,6 @@ void P_DemoCameraMovement(camera_t *cam, UINT8 num) cam->reset_aiming = false; } - if (cmd->forwardmove != 0) - { - moving = true; - } - // After switching to democam, the vertical angle of // chasecam is inherited. This is intentional because it // creates a smooth transition. However, moving diff --git a/src/w_wad.h b/src/w_wad.h index 592bdfdba..cd8ed1250 100644 --- a/src/w_wad.h +++ b/src/w_wad.h @@ -224,6 +224,8 @@ void *W_CachePatchNameRotated(const char *name, INT32 rotationangle, INT32 tag); #endif void *W_CachePatchNum(lumpnum_t lumpnum, INT32 tag); +void *W_GetCachedRotPatchPwad(UINT16 wadnum, UINT16 lumpnum); + // Returns a Software patch. // Performs any necessary conversions from PNG images. void *W_CacheSoftwarePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag);