From 3d0e8f194a94b2d604c138ec3c4c0ec491185514 Mon Sep 17 00:00:00 2001 From: GoldenTails Date: Sun, 23 May 2021 19:21:23 -0500 Subject: [PATCH 01/98] Allow people to update their Master Server listing on command. --- src/mserv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mserv.c b/src/mserv.c index f64c7bea9..ff62f2cdc 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -98,6 +98,7 @@ void AddMServCommands(void) CV_RegisterVar(&cv_servername); #ifdef MASTERSERVER COM_AddCommand("listserv", Command_Listserv_f); + COM_AddCommand("masterserver_update", Update_parameters); // allows people to updates manually in case you were delisted by accident #endif #endif } From 72bf2a9897dece88f523995917c0080129467a7f Mon Sep 17 00:00:00 2001 From: GoldenTails Date: Tue, 24 Aug 2021 03:13:18 -0500 Subject: [PATCH 02/98] Add angle field to linedef_t --- src/lua_maplib.c | 5 +++++ src/p_map.c | 6 +++--- src/p_polyobj.c | 4 +++- src/p_setup.c | 2 ++ src/p_spec.c | 2 +- src/r_defs.h | 1 + 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/lua_maplib.c b/src/lua_maplib.c index 9031c99f1..84caec591 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -88,6 +88,7 @@ enum line_e { line_v2, line_dx, line_dy, + line_angle, line_flags, line_special, line_tag, @@ -113,6 +114,7 @@ static const char *const line_opt[] = { "v2", "dx", "dy", + "angle", "flags", "special", "tag", @@ -821,6 +823,9 @@ static int line_get(lua_State *L) case line_dy: lua_pushfixed(L, line->dy); return 1; + case line_angle: + lua_pushangle(L, line->angle); + return 1; case line_flags: lua_pushinteger(L, line->flags); return 1; diff --git a/src/p_map.c b/src/p_map.c index e55bebb9a..b852cb393 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3060,7 +3060,7 @@ static void P_HitCameraSlideLine(line_t *ld, camera_t *thiscam) } side = P_PointOnLineSide(thiscam->x, thiscam->y, ld); - lineangle = R_PointToAngle2(0, 0, ld->dx, ld->dy); + lineangle = ld->angle; if (side == 1) lineangle += ANGLE_180; @@ -3106,7 +3106,7 @@ static void P_HitSlideLine(line_t *ld) side = P_PointOnLineSide(slidemo->x, slidemo->y, ld); - lineangle = R_PointToAngle2(0, 0, ld->dx, ld->dy); + lineangle = ld->angle; if (side == 1) lineangle += ANGLE_180; @@ -3149,7 +3149,7 @@ static void P_HitBounceLine(line_t *ld) return; } - lineangle = R_PointToAngle2(0, 0, ld->dx, ld->dy); + lineangle = ld->angle; if (lineangle >= ANGLE_180) lineangle -= ANGLE_180; diff --git a/src/p_polyobj.c b/src/p_polyobj.c index 6431e4624..5e3cf9d8e 100644 --- a/src/p_polyobj.c +++ b/src/p_polyobj.c @@ -785,7 +785,7 @@ static void Polyobj_pushThing(polyobj_t *po, line_t *line, mobj_t *mo) vertex_t closest; // calculate angle of line and subtract 90 degrees to get normal - lineangle = R_PointToAngle2(0, 0, line->dx, line->dy) - ANGLE_90; + lineangle = line->angle - ANGLE_90; lineangle >>= ANGLETOFINESHIFT; momx = FixedMul(po->thrust, FINECOSINE(lineangle)); momy = FixedMul(po->thrust, FINESINE(lineangle)); @@ -1060,6 +1060,8 @@ static void Polyobj_rotateLine(line_t *ld) ld->dx = v2->x - v1->x; ld->dy = v2->y - v1->y; + ld->angle = R_PointToAngle2(0, 0, ld->dx, ld->dy); + // determine slopetype ld->slopetype = !ld->dx ? ST_VERTICAL : !ld->dy ? ST_HORIZONTAL : ((ld->dy > 0) == (ld->dx > 0)) ? ST_POSITIVE : ST_NEGATIVE; diff --git a/src/p_setup.c b/src/p_setup.c index 498759b73..53fc281a9 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1058,6 +1058,8 @@ static void P_InitializeLinedef(line_t *ld) ld->dx = v2->x - v1->x; ld->dy = v2->y - v1->y; + ld->angle = R_PointToAngle2(0, 0, ld->dx, ld->dy); + ld->bbox[BOXLEFT] = min(v1->x, v2->x); ld->bbox[BOXRIGHT] = max(v1->x, v2->x); ld->bbox[BOXBOTTOM] = min(v1->y, v2->y); diff --git a/src/p_spec.c b/src/p_spec.c index 4b566acfb..f955ffbf4 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1241,7 +1241,7 @@ static boolean PolyFlag(line_t *line) pfd.polyObjNum = Tag_FGet(&line->tags); pfd.speed = P_AproxDistance(line->dx, line->dy) >> FRACBITS; - pfd.angle = R_PointToAngle2(line->v1->x, line->v1->y, line->v2->x, line->v2->y) >> ANGLETOFINESHIFT; + pfd.angle = line->angle >> ANGLETOFINESHIFT; pfd.momx = sides[line->sidenum[0]].textureoffset >> FRACBITS; return EV_DoPolyObjFlag(&pfd); diff --git a/src/r_defs.h b/src/r_defs.h index 1be3a1b8c..6567921b4 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -386,6 +386,7 @@ typedef struct line_s vertex_t *v2; fixed_t dx, dy; // Precalculated v2 - v1 for side checking. + angle_t angle; // Precalculated angle between dx and dy // Animation related. INT16 flags; From 2794727201c2ec38ef8d9640f1cfb0b3e03fa3f6 Mon Sep 17 00:00:00 2001 From: lachablock Date: Sun, 12 Dec 2021 18:52:27 +1100 Subject: [PATCH 03/98] Improve bot handling: - bot ticcmds are generated and sent by the server only - fix issue where server would not send all ticcmds to clients if bots were in the game - fix bots still responding to P1's inputs while P1's controls are locked - fix bot player's directional controls being rotated when controlled by P2 --- src/b_bot.c | 65 +++++++++++++++++++++++++++++---------------- src/d_clisrv.c | 31 +++++++++++++++++++++ src/d_ticcmd.h | 9 +++++++ src/deh_tables.c | 5 ++++ src/g_demo.c | 12 +++++++++ src/g_game.c | 63 +++++++++++++++---------------------------- src/lua_baselib.c | 3 +++ src/lua_playerlib.c | 4 +++ src/p_saveg.c | 43 +++++++++++++++++++----------- src/p_user.c | 12 ++++++--- 10 files changed, 164 insertions(+), 83 deletions(-) diff --git a/src/b_bot.c b/src/b_bot.c index cdd74fc07..ffdcace6d 100644 --- a/src/b_bot.c +++ b/src/b_bot.c @@ -127,17 +127,17 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) // Update catchup_tics if (mem->thinkstate == AI_SPINFOLLOW) { - mem-> catchup_tics = 0; + mem->catchup_tics = 0; } else if (dist > followmax || zdist > comfortheight || stalled) { - mem-> catchup_tics = min(mem-> catchup_tics + 2, 70); - if (mem-> catchup_tics >= 70) + mem->catchup_tics = min(mem->catchup_tics + 2, 70); + if (mem->catchup_tics >= 70) mem->thinkstate = AI_CATCHUP; } else { - mem-> catchup_tics = max(mem-> catchup_tics - 1, 0); + mem->catchup_tics = max(mem->catchup_tics - 1, 0); if (mem->thinkstate == AI_CATCHUP) mem->thinkstate = AI_FOLLOW; } @@ -171,7 +171,6 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) { jump = true; mem->thinkstate = AI_FLYSTANDBY; - bot->pflags |= PF_CANCARRY; } } @@ -183,7 +182,10 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) && P_IsObjectOnGround(sonic) && P_IsObjectOnGround(tails) && !(player->pflags & PF_STASIS) && bot->charability == CA_FLY) - mem->thinkstate = AI_THINKFLY; + { + mem->thinkstate = AI_THINKFLY; + cmd->flags |= TCF_FLIGHTINDICATOR; + } else if (mem->thinkstate == AI_THINKFLY) mem->thinkstate = AI_FOLLOW; @@ -204,6 +206,8 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) // Abort if the player moves away or spins if (dist > followthres || player->dashspeed) mem->thinkstate = AI_FOLLOW; + else + cmd->flags |= TCF_SETCARRY; } // Read player inputs while carrying else if (mem->thinkstate == AI_FLYCARRY) @@ -312,7 +316,6 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) { // Copy inputs cmd->angleturn = (sonic->angle) >> 16; // NOT FRACBITS DAMNIT - bot->drawangle = ang; cmd->forwardmove = 8 * pcmd->forwardmove / 10; cmd->sidemove = 8 * pcmd->sidemove / 10; } @@ -339,7 +342,7 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) else if (!jump_last && !(bot->pflags & PF_JUMPED) //&& !(player->pflags & PF_SPINNING) && ((zdist > 32*scale && player->pflags & PF_JUMPED) // Following || (zdist > 64*scale && mem->thinkstate == AI_CATCHUP) // Vertical catch-up - || (stalled && mem-> catchup_tics > 20 && bot->powers[pw_carry] == CR_NONE) + || (stalled && mem->catchup_tics > 20 && bot->powers[pw_carry] == CR_NONE) //|| (bmom < scale>>3 && dist > followthres && !(bot->powers[pw_carry])) // Stopped & not in carry state || (bot->pflags & PF_SPINNING && !(bot->pflags & PF_JUMPED)))) // Spinning jump = true; @@ -385,7 +388,6 @@ void B_BuildTiccmd(player_t *player, ticcmd_t *cmd) return; // Make sure we have a valid main character to follow - B_UpdateBotleader(player); if (!player->botleader) return; @@ -398,7 +400,7 @@ void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward { player_t *player = mo->player; // don't try to do stuff if your sonic is in a minecart or something - if (&player->botleader && player->botleader->powers[pw_carry] && player->botleader->powers[pw_carry] != CR_PLAYER) + if (player->botleader && player->botleader->powers[pw_carry] && player->botleader->powers[pw_carry] != CR_PLAYER) return; // Turn the virtual keypresses into ticcmd_t. if (twodlevel || mo->flags2 & MF2_TWOD) { @@ -587,26 +589,43 @@ void B_RespawnBot(INT32 playernum) void B_HandleFlightIndicator(player_t *player) { mobj_t *tails = player->mo; - botmem_t *mem = &player->botmem; + boolean shouldExist; + if (!tails) return; - if (mem->thinkstate == AI_THINKFLY && player->bot == BOT_2PAI && tails->health) + shouldExist = (player->cmd.flags & TCF_FLIGHTINDICATOR) && player->botleader + && player->bot == BOT_2PAI && player->playerstate == PST_LIVE; + + // check whether the indicator doesn't exist + if (P_MobjWasRemoved(tails->hnext)) { - if (!tails->hnext) - { - P_SetTarget(&tails->hnext, P_SpawnMobjFromMobj(tails, 0, 0, 0, MT_OVERLAY)); - if (tails->hnext) - { - P_SetTarget(&tails->hnext->target, tails); - P_SetTarget(&tails->hnext->hprev, tails); - P_SetMobjState(tails->hnext, S_FLIGHTINDICATOR); - } - } + // if it shouldn't exist, everything is fine + if (!shouldExist) + return; + + // otherwise, spawn it + P_SetTarget(&tails->hnext, P_SpawnMobjFromMobj(tails, 0, 0, 0, MT_OVERLAY)); + P_SetTarget(&tails->hnext->target, tails); + P_SetTarget(&tails->hnext->hprev, tails); + P_SetMobjState(tails->hnext, S_FLIGHTINDICATOR); } - else if (tails->hnext && tails->hnext->type == MT_OVERLAY && tails->hnext->state == states+S_FLIGHTINDICATOR) + + // if the mobj isn't a flight indicator, let's not mess with it + if (tails->hnext->type != MT_OVERLAY || (tails->hnext->state != states+S_FLIGHTINDICATOR)) + return; + + // if it shouldn't exist, remove it + if (!shouldExist) { P_RemoveMobj(tails->hnext); P_SetTarget(&tails->hnext, NULL); + return; } + + // otherwise, update its visibility + if (P_IsLocalPlayer(player->botleader)) + tails->hnext->flags2 &= ~MF2_DONTDRAW; + else + tails->hnext->flags2 |= MF2_DONTDRAW; } diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 78a3ebe6c..c70532494 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -46,6 +46,7 @@ #include "lua_libs.h" #include "md5.h" #include "m_perfstats.h" +#include "b_bot.h" // B_BuildTiccmd #ifndef NONET // cl loading screen @@ -5166,6 +5167,25 @@ static void Local_Maketic(INT32 realtics) localcmds2.angleturn |= TICCMD_RECEIVED; } +static void SV_MakeBotTics(void) +{ + UINT8 i; + for (i = 0; i < MAXPLAYERS; i++) + { + if (!playeringame[i]) + continue; + + if (players[i].bot == BOT_2PAI || players[i].bot == BOT_MPAI) + { + ticcmd_t *cmd = &netcmds[maketic % BACKUPTICS][i]; + + G_CopyTiccmd(cmd, I_BaseTiccmd(), 1); // empty, or external driver + B_BuildTiccmd(&players[i], cmd); + cmd->angleturn |= TICCMD_RECEIVED; + } + } +} + // create missed tic static void SV_Maketic(void) { @@ -5409,6 +5429,15 @@ void NetUpdate(void) if (client) maketic = neededtic; + // update players' lastbuttons so they can be used in ticcmd generation + for (i = 0; i < MAXPLAYERS; i++) + { + if (!playeringame[i]) + continue; + + players[i].lastbuttons = players[i].cmd.buttons; + } + Local_Maketic(realtics); // make local tic, and call menu? if (server) @@ -5452,6 +5481,8 @@ void NetUpdate(void) Net_ConnectionTimeout(i); } + SV_MakeBotTics(); + // Don't erase tics not acknowledged counts = realtics; diff --git a/src/d_ticcmd.h b/src/d_ticcmd.h index 182b30e6a..480fbe2d4 100644 --- a/src/d_ticcmd.h +++ b/src/d_ticcmd.h @@ -45,6 +45,14 @@ typedef enum BT_CUSTOM3 = 1<<15, } buttoncode_t; +// ticcmd flags +typedef enum +{ + TCF_FLIGHTINDICATOR = 1 << 0, // show flight indicator + TCF_SETCARRY = 1 << 1, // set PF_CARRY upon activating flight + // free up to and including 1 << 7 +} ticcmdflag_t; + // The data sampled per tick (single player) // and transmitted to other peers (multiplayer). // Mainly movements/button commands per game tick, @@ -66,6 +74,7 @@ typedef struct INT16 aiming; // vertical aiming, see G_BuildTicCmd UINT16 buttons; UINT8 latency; // Netgames: how many tics ago was this ticcmd generated from this player's end? + UINT8 flags; // miscellaneous info } ATTRPACK ticcmd_t; #if defined(_MSC_VER) diff --git a/src/deh_tables.c b/src/deh_tables.c index f30f7c14d..3aece916c 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -5333,6 +5333,11 @@ struct int_const_s const INT_CONST[] = { {"BT_CUSTOM2",BT_CUSTOM2}, // Lua customizable {"BT_CUSTOM3",BT_CUSTOM3}, // Lua customizable + // Ticcmd flags (ticcmdflag_t) + // (maybe move these into their own table in the future but I cba when there's only 2 LOL) + {"TCF_FLIGHTINDICATOR", TCF_FLIGHTINDICATOR}, + {"TCF_SETCARRY", TCF_SETCARRY}, + // Lua command registration flags {"COM_ADMIN",COM_ADMIN}, {"COM_SPLITSCREEN",COM_SPLITSCREEN}, diff --git a/src/g_demo.c b/src/g_demo.c index c97dbcf9e..2e2f6d56a 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -110,6 +110,7 @@ demoghost *ghosts = NULL; #define ZT_BUTTONS 0x08 #define ZT_AIMING 0x10 #define ZT_LATENCY 0x20 +#define ZT_FLAGS 0x40 #define DEMOMARKER 0x80 // demoend #define METALDEATH 0x44 #define METALSNICE 0x69 @@ -184,6 +185,8 @@ void G_ReadDemoTiccmd(ticcmd_t *cmd, INT32 playernum) oldcmd.aiming = READINT16(demo_p); if (ziptic & ZT_LATENCY) oldcmd.latency = READUINT8(demo_p); + if (ziptic & ZT_FLAGS) + oldcmd.flags = READUINT8(demo_p); G_CopyTiccmd(cmd, &oldcmd, 1); players[playernum].angleturn = cmd->angleturn; @@ -248,6 +251,13 @@ void G_WriteDemoTiccmd(ticcmd_t *cmd, INT32 playernum) ziptic |= ZT_LATENCY; } + if (cmd->flags != oldcmd.flags) + { + WRITEUINT8(demo_p, cmd->flags); + oldcmd.flags = cmd->flags; + ziptic |= ZT_FLAGS; + } + *ziptic_p = ziptic; // attention here for the ticcmd size! @@ -691,6 +701,8 @@ void G_GhostTicker(void) g->p += 2; if (ziptic & ZT_LATENCY) g->p++; + if (ziptic & ZT_FLAGS) + g->p++; // Grab ghost data. ziptic = READUINT8(g->p); diff --git a/src/g_game.c b/src/g_game.c index 3955834b2..050f2d714 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1546,12 +1546,17 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) cmd->forwardmove = (SINT8)(cmd->forwardmove + forward); cmd->sidemove = (SINT8)(cmd->sidemove + side); - // Note: Majority of botstuffs are handled in G_Ticker now. - if (player->bot == BOT_2PHUMAN) //Player-controlled bot + // Note: Majority of botstuffs are handled in G_Ticker and NetUpdate now. + if (player->bot == BOT_2PAI + && !player->powers[pw_tailsfly] + && (cmd->forwardmove || cmd->sidemove || cmd->buttons)) { - // Fix offset angle for P2-controlled Tailsbot when P2's controls are set to non-Strafe - cmd->angleturn = (INT16)((localangle - *myangle) >> 16); - } + player->bot = BOT_2PHUMAN; // A player-controlled bot. Returns to AI when it respawns. + CV_SetValue(&cv_analog[1], true); + } + + if (player->bot == BOT_2PHUMAN) + cmd->angleturn = (localangle - *myangle) >> 16; *myangle += (cmd->angleturn<<16); @@ -1705,6 +1710,7 @@ ticcmd_t *G_MoveTiccmd(ticcmd_t* dest, const ticcmd_t* src, const size_t n) dest[i].aiming = (INT16)SHORT(src[i].aiming); dest[i].buttons = (UINT16)SHORT(src[i].buttons); dest[i].latency = src[i].latency; + dest[i].flags = src[i].flags; } return dest; } @@ -2312,57 +2318,32 @@ void G_Ticker(boolean run) if (playeringame[i]) { INT16 received; - // Save last frame's button readings - players[i].lastbuttons = players[i].cmd.buttons; G_CopyTiccmd(&players[i].cmd, &netcmds[buf][i], 1); - // Bot ticcmd handling - // Yes, ordinarily this would be handled in G_BuildTiccmd... - // ...however, bot players won't have a corresponding consoleplayer or splitscreen player 2 to send that information. - // Therefore, this has to be done after ticcmd sends are received. - if (players[i].bot == BOT_2PAI) { // Tailsbot for P2 - if (!players[i].powers[pw_tailsfly] && (players[i].cmd.forwardmove || players[i].cmd.sidemove || players[i].cmd.buttons)) - { - players[i].bot = BOT_2PHUMAN; // A player-controlled bot. Returns to AI when it respawns. - CV_SetValue(&cv_analog[1], true); - } - else - { - B_BuildTiccmd(&players[i], &players[i].cmd); - } - B_HandleFlightIndicator(&players[i]); - } - else if (players[i].bot == BOT_MPAI) { - B_BuildTiccmd(&players[i], &players[i].cmd); - } - - // Do angle adjustments. + if (players[i].bot == BOT_NONE || players[i].bot == BOT_2PHUMAN) { + // Use the leveltime sent in the player's ticcmd to determine control lag + players[i].cmd.latency = min(((leveltime & 0xFF) - players[i].cmd.latency) & 0xFF, MAXPREDICTTICS-1); + + // Do angle adjustments. received = (players[i].cmd.angleturn & TICCMD_RECEIVED); + players[i].angleturn += players[i].cmd.angleturn - players[i].oldrelangleturn; players[i].oldrelangleturn = players[i].cmd.angleturn; if (P_ControlStyle(&players[i]) == CS_LMAOGALOG) P_ForceLocalAngle(&players[i], players[i].angleturn << 16); else players[i].cmd.angleturn = players[i].angleturn; - if (P_ControlStyle(&players[i]) == CS_LMAOGALOG) - P_ForceLocalAngle(&players[i], players[i].angleturn << 16); - else - players[i].cmd.angleturn = players[i].angleturn; - - players[i].cmd.angleturn &= ~TICCMD_RECEIVED; - // Use the leveltime sent in the player's ticcmd to determine control lag - players[i].cmd.latency = min(((leveltime & 0xFF) - players[i].cmd.latency) & 0xFF, MAXPREDICTTICS-1); } else // Less work is required if we're building a bot ticcmd. { - // Since bot TicCmd is pre-determined for both the client and server, the latency and packet checks are simplified. - received = 1; - players[i].cmd.latency = 0; - players[i].angleturn = players[i].cmd.angleturn; - players[i].oldrelangleturn = players[i].cmd.angleturn; + // Since bot TicCmd is pre-determined for both the client and server, the latency and packet checks are simplified. + players[i].cmd.latency = 0; + P_SetPlayerAngle(&players[i], players[i].cmd.angleturn << 16); } + + players[i].cmd.angleturn &= ~TICCMD_RECEIVED; players[i].cmd.angleturn |= received; } } diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 12ad4fee0..e0d09dee9 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -32,6 +32,7 @@ #include "b_bot.h" // B_UpdateBotleader #include "d_clisrv.h" // CL_RemovePlayer #include "i_system.h" // I_GetPreciseTime, I_PreciseToMicros +#include "i_net.h" // doomcom #include "lua_script.h" #include "lua_libs.h" @@ -3463,6 +3464,8 @@ static int lib_gAddPlayer(lua_State *L) playeringame[newplayernum] = true; G_AddPlayer(newplayernum); + if (newplayernum+1 > doomcom->numslots) + doomcom->numslots = (INT16)(newplayernum+1); newplayer = &players[newplayernum]; newplayer->jointime = 0; diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index 1c634da45..097fd94e4 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -833,6 +833,8 @@ static int ticcmd_get(lua_State *L) lua_pushinteger(L, cmd->buttons); else if (fastcmp(field,"latency")) lua_pushinteger(L, cmd->latency); + else if (fastcmp(field,"flags")) + lua_pushinteger(L, cmd->flags); else return NOFIELD; @@ -861,6 +863,8 @@ static int ticcmd_set(lua_State *L) cmd->buttons = (UINT16)luaL_checkinteger(L, 3); else if (fastcmp(field,"latency")) return NOSET; + else if (fastcmp(field,"flags")) + cmd->buttons = (UINT8)luaL_checkinteger(L, 3); else return NOFIELD; diff --git a/src/p_saveg.c b/src/p_saveg.c index 1270064c0..8a75013a3 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -51,14 +51,15 @@ UINT8 *save_p; // than an UINT16 typedef enum { -// RFLAGPOINT = 0x01, -// BFLAGPOINT = 0x02, - CAPSULE = 0x04, - AWAYVIEW = 0x08, - FIRSTAXIS = 0x10, - SECONDAXIS = 0x20, - FOLLOW = 0x40, - DRONE = 0x80, +// RFLAGPOINT = 0x001, +// BFLAGPOINT = 0x002, + CAPSULE = 0x004, + AWAYVIEW = 0x008, + FIRSTAXIS = 0x010, + SECONDAXIS = 0x020, + FOLLOW = 0x040, + DRONE = 0x080, + BOTLEADER = 0x100, } player_saveflags; static inline void P_ArchivePlayer(void) @@ -197,10 +198,11 @@ static void P_NetArchivePlayers(void) // Bots // ////////// WRITEUINT8(save_p, players[i].bot); - WRITEUINT8(save_p, players[i].botmem.lastForward); - WRITEUINT8(save_p, players[i].botmem.lastBlocked); - WRITEUINT8(save_p, players[i].botmem.catchup_tics); - WRITEUINT8(save_p, players[i].botmem.thinkstate); + // We no longer need to sync these since ticcmds are generated only by the server + //WRITEUINT8(save_p, players[i].botmem.lastForward); + //WRITEUINT8(save_p, players[i].botmem.lastBlocked); + //WRITEUINT8(save_p, players[i].botmem.catchup_tics); + //WRITEUINT8(save_p, players[i].botmem.thinkstate); WRITEUINT8(save_p, players[i].removing); WRITEUINT8(save_p, players[i].blocked); @@ -293,6 +295,9 @@ static void P_NetArchivePlayers(void) if (players[i].drone) flags |= DRONE; + if (players[i].botleader) + flags |= BOTLEADER; + WRITEINT16(save_p, players[i].lastsidehit); WRITEINT16(save_p, players[i].lastlinehit); @@ -325,6 +330,9 @@ static void P_NetArchivePlayers(void) if (flags & DRONE) WRITEUINT32(save_p, players[i].drone->mobjnum); + if (flags & BOTLEADER) + WRITEUINT8(save_p, (UINT8)(players[i].botleader - players)); + WRITEFIXED(save_p, players[i].camerascale); WRITEFIXED(save_p, players[i].shieldscale); @@ -425,10 +433,10 @@ static void P_NetUnArchivePlayers(void) ////////// players[i].bot = READUINT8(save_p); - players[i].botmem.lastForward = READUINT8(save_p); - players[i].botmem.lastBlocked = READUINT8(save_p); - players[i].botmem.catchup_tics = READUINT8(save_p); - players[i].botmem.thinkstate = READUINT8(save_p); + //players[i].botmem.lastForward = READUINT8(save_p); + //players[i].botmem.lastBlocked = READUINT8(save_p); + //players[i].botmem.catchup_tics = READUINT8(save_p); + //players[i].botmem.thinkstate = READUINT8(save_p); players[i].removing = READUINT8(save_p); players[i].blocked = READUINT8(save_p); @@ -535,6 +543,9 @@ static void P_NetUnArchivePlayers(void) if (flags & DRONE) players[i].drone = (mobj_t *)(size_t)READUINT32(save_p); + if (flags & BOTLEADER) + players[i].botleader = &players[READUINT8(save_p)]; + players[i].camerascale = READFIXED(save_p); players[i].shieldscale = READFIXED(save_p); diff --git a/src/p_user.c b/src/p_user.c index f21118a81..cc232d08d 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -5349,10 +5349,10 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd) player->powers[pw_tailsfly] = tailsflytics + 1; // Set the fly timer player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING|PF_STARTDASH); - if (player->bot == BOT_2PAI) - player->pflags |= PF_THOKKED; - else + if ((player->bot != BOT_2PAI) || (cmd->flags & TCF_SETCARRY)) player->pflags |= (PF_THOKKED|PF_CANCARRY); + else + player->pflags |= PF_THOKKED; } break; case CA_GLIDEANDCLIMB: @@ -11450,6 +11450,12 @@ void P_PlayerThink(player_t *player) { if (B_CheckRespawn(player)) player->playerstate = PST_REBORN; + else + { + if (player->bot == BOT_2PAI) + B_UpdateBotleader(player); + B_HandleFlightIndicator(player); + } } if (player->playerstate == PST_REBORN) { From 7ed817837214101a18bd9eb5f4f1edbdd7286044 Mon Sep 17 00:00:00 2001 From: lachablock Date: Sun, 12 Dec 2021 19:18:13 +1100 Subject: [PATCH 04/98] Oops typo --- src/lua_playerlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index 097fd94e4..edd1351e8 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -864,7 +864,7 @@ static int ticcmd_set(lua_State *L) else if (fastcmp(field,"latency")) return NOSET; else if (fastcmp(field,"flags")) - cmd->buttons = (UINT8)luaL_checkinteger(L, 3); + cmd->flags = (UINT8)luaL_checkinteger(L, 3); else return NOFIELD; From 1eb1ad2677b1a3425a5d2879f002a213ae9fdf22 Mon Sep 17 00:00:00 2001 From: lachablock Date: Wed, 22 Dec 2021 19:46:16 +1100 Subject: [PATCH 05/98] Fix compile warning --- src/g_game.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 050f2d714..3ab3dae18 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2317,8 +2317,6 @@ void G_Ticker(boolean run) { if (playeringame[i]) { - INT16 received; - G_CopyTiccmd(&players[i].cmd, &netcmds[buf][i], 1); if (players[i].bot == BOT_NONE || players[i].bot == BOT_2PHUMAN) @@ -2327,14 +2325,13 @@ void G_Ticker(boolean run) players[i].cmd.latency = min(((leveltime & 0xFF) - players[i].cmd.latency) & 0xFF, MAXPREDICTTICS-1); // Do angle adjustments. - received = (players[i].cmd.angleturn & TICCMD_RECEIVED); players[i].angleturn += players[i].cmd.angleturn - players[i].oldrelangleturn; players[i].oldrelangleturn = players[i].cmd.angleturn; if (P_ControlStyle(&players[i]) == CS_LMAOGALOG) P_ForceLocalAngle(&players[i], players[i].angleturn << 16); else - players[i].cmd.angleturn = players[i].angleturn; + players[i].cmd.angleturn = (players[i].angleturn & ~TICCMD_RECEIVED) | (players[i].cmd.angleturn & TICCMD_RECEIVED); } else // Less work is required if we're building a bot ticcmd. { @@ -2342,9 +2339,6 @@ void G_Ticker(boolean run) players[i].cmd.latency = 0; P_SetPlayerAngle(&players[i], players[i].cmd.angleturn << 16); } - - players[i].cmd.angleturn &= ~TICCMD_RECEIVED; - players[i].cmd.angleturn |= received; } } From 392e7828938c6b4f54e84a759e55b339f346aeee Mon Sep 17 00:00:00 2001 From: lachablock Date: Mon, 27 Dec 2021 23:35:01 +1100 Subject: [PATCH 06/98] Don't modify drawangle when taking damage in strafe mode --- src/p_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index da06510d3..d9d92f3b2 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1048,7 +1048,8 @@ void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor) fallbackspeed = FixedMul(4*FRACUNIT, player->mo->scale); } - player->drawangle = ang + ANGLE_180; + if (player->pflags & PF_DIRECTIONCHAR) + player->drawangle = ang + ANGLE_180; P_InstaThrust(player->mo, ang, fallbackspeed); } From d9bc478822f4ea9df901ea6485f6f62f3d4426ec Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 2 Jan 2022 15:39:16 +0100 Subject: [PATCH 07/98] Cleanup blank chatbox checking code --- src/hu_stuff.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 3107057a1..086d9f799 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -946,25 +946,15 @@ void HU_Ticker(void) static boolean teamtalk = false; -// Clear spaces so we don't end up with messages only made out of emptiness -static boolean HU_clearChatSpaces(void) +static boolean HU_chatboxContainsOnlySpaces(void) { - size_t i = 0; // Used to just check our message - char c; // current character we're iterating. - boolean nothingbutspaces = true; + size_t i; - for (; i < strlen(w_chat); i++) // iterate through message and eradicate all spaces that don't belong. - { - c = w_chat[i]; - if (!c) - break; // if there's nothing, it's safe to assume our message has ended, so let's not waste any more time here. + for (i = 0; w_chat[i]; i++) + if (w_chat[i] != ' ') + return false; - if (c != ' ') // Isn't a space - { - nothingbutspaces = false; - } - } - return nothingbutspaces; + return true; } // @@ -980,8 +970,9 @@ static void HU_queueChatChar(char c) size_t ci = 2; INT32 target = 0; - if (HU_clearChatSpaces()) // Avoids being able to send empty messages, or something. - return; // If this returns true, that means our message was NOTHING but spaces, so don't send it period. + // if our message was nothing but spaces, don't send it. + if (HU_chatboxContainsOnlySpaces()) + return; do { c = w_chat[-2+ci++]; From 34ad64ba591aa969d080a56edfaf5f4bc53b3ddd Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 2 Jan 2022 15:41:54 +0100 Subject: [PATCH 08/98] Cleanup chatbox reset code --- src/hu_stuff.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 086d9f799..50be5e233 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -966,7 +966,6 @@ static void HU_queueChatChar(char c) { char buf[2+256]; char *msg = &buf[2]; - size_t i = 0; size_t ci = 2; INT32 target = 0; @@ -980,9 +979,7 @@ static void HU_queueChatChar(char c) buf[ci-1]=c; } while (c); - for (;(i Date: Sun, 2 Jan 2022 15:48:31 +0100 Subject: [PATCH 09/98] Cleanup chatbox sanitizing code --- src/hu_stuff.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 50be5e233..fdbef2980 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -966,18 +966,21 @@ static void HU_queueChatChar(char c) { char buf[2+256]; char *msg = &buf[2]; - size_t ci = 2; + size_t ci; INT32 target = 0; // if our message was nothing but spaces, don't send it. if (HU_chatboxContainsOnlySpaces()) return; - do { - c = w_chat[-2+ci++]; - if (!c || (c >= ' ' && !(c & 0x80))) // copy printable characters and terminating '\0' only. - buf[ci-1]=c; - } while (c); + // copy printable characters and terminating '\0' only. + for (ci = 2; w_chat[ci-2]; ci++) + { + c = w_chat[ci-2]; + if (c >= ' ' && !(c & 0x80)) + buf[ci] = c; + }; + buf[ci] = '\0'; memset(w_chat, '\0', HU_MAXMSGLEN); c_input = 0; From 3638d5d55692090da133b66ad93d9ddbf5570555 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 2 Jan 2022 17:08:10 +0100 Subject: [PATCH 10/98] Cleanup chat code a little --- src/hu_stuff.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index fdbef2980..29686cd26 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -957,11 +957,8 @@ static boolean HU_chatboxContainsOnlySpaces(void) return true; } -// -// static void HU_queueChatChar(char c) { - // send automaticly the message (no more chat char) if (c == KEY_ENTER) { char buf[2+256]; @@ -1010,7 +1007,7 @@ static void HU_queueChatChar(char c) strncpy(playernum, msg+3, 3); // check for undesirable characters in our "number" - if (((playernum[0] < '0') || (playernum[0] > '9')) || ((playernum[1] < '0') || (playernum[1] > '9'))) + if (!(isdigit(playernum[0]) && isdigit(playernum[1]))) { // check if playernum[1] is a space if (playernum[1] == ' ') @@ -1023,17 +1020,13 @@ static void HU_queueChatChar(char c) } } // I'm very bad at C, I swear I am, additional checks eww! - if (spc != 0) + if (spc != 0 && msg[5] != ' ') { - if (msg[5] != ' ') - { - HU_AddChatText("\x82NOTICE: \x80Invalid command format. Correct format is \'/pm \'.", false); - return; - } + HU_AddChatText("\x82NOTICE: \x80Invalid command format. Correct format is \'/pm \'.", false); + return; } target = atoi(playernum); // turn that into a number - //CONS_Printf("%d\n", target); // check for target player, if it doesn't exist then we can't send the message! if (target < MAXPLAYERS && playeringame[target]) // player exists @@ -1050,11 +1043,7 @@ static void HU_queueChatChar(char c) } if (ci > 3) // don't send target+flags+empty message. { - if (teamtalk) - buf[0] = -1; // target - else - buf[0] = target; - + buf[0] = teamtalk ? -1 : target; // target buf[1] = 0; // flags SendNetXCmd(XD_SAY, buf, 2 + strlen(&buf[2]) + 1); } From b8975b6a71c9814aa9f0f0630de1d77754a0b56c Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 2 Jan 2022 17:38:49 +0100 Subject: [PATCH 11/98] Group related chat stuff together --- src/hu_stuff.c | 144 ++++++++++++++++++++++++------------------------- 1 file changed, 71 insertions(+), 73 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 29686cd26..60f3d9969 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -858,72 +858,6 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) #endif } -// Handles key input and string input -// -static inline boolean HU_keyInChatString(char *s, char ch) -{ - size_t l; - - if ((ch >= HU_FONTSTART && ch <= HU_FONTEND && hu_font[ch-HU_FONTSTART]) - || ch == ' ') // Allow spaces, of course - { - l = strlen(s); - if (l < HU_MAXMSGLEN - 1) - { - if (c_input >= strlen(s)) // don't do anything complicated - { - s[l++] = ch; - s[l]=0; - } - else - { - - // move everything past c_input for new characters: - size_t m = HU_MAXMSGLEN-1; - while (m>=c_input) - { - if (s[m]) - s[m+1] = (s[m]); - if (m == 0) // prevent overflow - break; - m--; - } - s[c_input] = ch; // and replace this. - } - c_input++; - return true; - } - return false; - } - else if (ch == KEY_BACKSPACE) - { - size_t i = c_input; - - if (c_input <= 0) - return false; - - if (!s[i-1]) - return false; - - if (i >= strlen(s)-1) - { - s[strlen(s)-1] = 0; - c_input--; - return false; - } - - for (; (i < HU_MAXMSGLEN); i++) - { - s[i-1] = s[i]; - } - c_input--; - } - else if (ch != KEY_ENTER) - return false; // did not eat key - - return true; // ate the key -} - #endif // @@ -945,6 +879,10 @@ void HU_Ticker(void) #ifndef NONET static boolean teamtalk = false; +static boolean justscrolleddown; +static boolean justscrolledup; +static INT16 typelines = 1; // number of drawfill lines we need when drawing the chat. it's some weird hack and might be one frame off but I'm lazy to make another loop. +// It's up here since it has to be reset when we open the chat. static boolean HU_chatboxContainsOnlySpaces(void) { @@ -1050,6 +988,73 @@ static void HU_queueChatChar(char c) return; } } + +// Handles key input and string input +// +static inline boolean HU_keyInChatString(char *s, char ch) +{ + size_t l; + + if ((ch >= HU_FONTSTART && ch <= HU_FONTEND && hu_font[ch-HU_FONTSTART]) + || ch == ' ') // Allow spaces, of course + { + l = strlen(s); + if (l < HU_MAXMSGLEN - 1) + { + if (c_input >= strlen(s)) // don't do anything complicated + { + s[l++] = ch; + s[l]=0; + } + else + { + + // move everything past c_input for new characters: + size_t m = HU_MAXMSGLEN-1; + while (m>=c_input) + { + if (s[m]) + s[m+1] = (s[m]); + if (m == 0) // prevent overflow + break; + m--; + } + s[c_input] = ch; // and replace this. + } + c_input++; + return true; + } + return false; + } + else if (ch == KEY_BACKSPACE) + { + size_t i = c_input; + + if (c_input <= 0) + return false; + + if (!s[i-1]) + return false; + + if (i >= strlen(s)-1) + { + s[strlen(s)-1] = 0; + c_input--; + return false; + } + + for (; (i < HU_MAXMSGLEN); i++) + { + s[i-1] = s[i]; + } + c_input--; + } + else if (ch != KEY_ENTER) + return false; // did not eat key + + return true; // ate the key +} + #endif void HU_clearChatChars(void) @@ -1061,13 +1066,6 @@ void HU_clearChatChars(void) I_UpdateMouseGrab(); } -#ifndef NONET -static boolean justscrolleddown; -static boolean justscrolledup; -static INT16 typelines = 1; // number of drawfill lines we need when drawing the chat. it's some weird hack and might be one frame off but I'm lazy to make another loop. -// It's up here since it has to be reset when we open the chat. -#endif - // // Returns true if key eaten // From 2bbbd57c6e3ce058b9bb4510260a1fb0496585ef Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 2 Jan 2022 17:55:14 +0100 Subject: [PATCH 12/98] Turn HU_queueChatChar into HU_sendChatMessage --- src/hu_stuff.c | 179 +++++++++++++++++++++++-------------------------- 1 file changed, 84 insertions(+), 95 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 60f3d9969..1def5c153 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -895,103 +895,99 @@ static boolean HU_chatboxContainsOnlySpaces(void) return true; } -static void HU_queueChatChar(char c) +static void HU_sendChatMessage(void) { - if (c == KEY_ENTER) + char buf[2+256]; + char *msg = &buf[2]; + size_t ci; + INT32 target = 0; + + // if our message was nothing but spaces, don't send it. + if (HU_chatboxContainsOnlySpaces()) + return; + + // copy printable characters and terminating '\0' only. + for (ci = 2; w_chat[ci-2]; ci++) { - char buf[2+256]; - char *msg = &buf[2]; - size_t ci; - INT32 target = 0; + char c = w_chat[ci-2]; + if (c >= ' ' && !(c & 0x80)) + buf[ci] = c; + }; + buf[ci] = '\0'; - // if our message was nothing but spaces, don't send it. - if (HU_chatboxContainsOnlySpaces()) - return; + memset(w_chat, '\0', HU_MAXMSGLEN); + c_input = 0; - // copy printable characters and terminating '\0' only. - for (ci = 2; w_chat[ci-2]; ci++) + // last minute mute check + if (CHAT_MUTE) + { + HU_AddChatText(va("%s>ERROR: The chat is muted. You can't say anything.", "\x85"), false); + return; + } + + if (strlen(msg) > 4 && strnicmp(msg, "/pm", 3) == 0) // used /pm + { + INT32 spc = 1; // used if playernum[1] is a space. + char playernum[3]; + const char *newmsg; + + // what we're gonna do now is check if the player exists + // with that logic, characters 4 and 5 are our numbers: + + // teamtalk can't send PMs, just don't send it, else everyone would be able to see it, and no one wants to see your sex RP sicko. + if (teamtalk) { - c = w_chat[ci-2]; - if (c >= ' ' && !(c & 0x80)) - buf[ci] = c; - }; - buf[ci] = '\0'; - - memset(w_chat, '\0', HU_MAXMSGLEN); - c_input = 0; - - // last minute mute check - if (CHAT_MUTE) - { - HU_AddChatText(va("%s>ERROR: The chat is muted. You can't say anything.", "\x85"), false); + HU_AddChatText(va("%sCannot send sayto in Say-Team.", "\x85"), false); return; } - if (strlen(msg) > 4 && strnicmp(msg, "/pm", 3) == 0) // used /pm + strncpy(playernum, msg+3, 3); + // check for undesirable characters in our "number" + if (!(isdigit(playernum[0]) && isdigit(playernum[1]))) { - INT32 spc = 1; // used if playernum[1] is a space. - char playernum[3]; - const char *newmsg; - - // what we're gonna do now is check if the player exists - // with that logic, characters 4 and 5 are our numbers: - - // teamtalk can't send PMs, just don't send it, else everyone would be able to see it, and no one wants to see your sex RP sicko. - if (teamtalk) - { - HU_AddChatText(va("%sCannot send sayto in Say-Team.", "\x85"), false); - return; - } - - strncpy(playernum, msg+3, 3); - // check for undesirable characters in our "number" - if (!(isdigit(playernum[0]) && isdigit(playernum[1]))) - { - // check if playernum[1] is a space - if (playernum[1] == ' ') - spc = 0; - // let it slide - else - { - HU_AddChatText("\x82NOTICE: \x80Invalid command format. Correct format is \'/pm \'.", false); - return; - } - } - // I'm very bad at C, I swear I am, additional checks eww! - if (spc != 0 && msg[5] != ' ') + // check if playernum[1] is a space + if (playernum[1] == ' ') + spc = 0; + // let it slide + else { HU_AddChatText("\x82NOTICE: \x80Invalid command format. Correct format is \'/pm \'.", false); return; } - - target = atoi(playernum); // turn that into a number - - // check for target player, if it doesn't exist then we can't send the message! - if (target < MAXPLAYERS && playeringame[target]) // player exists - target++; // even though playernums are from 0 to 31, target is 1 to 32, so up that by 1 to have it work! - else - { - HU_AddChatText(va("\x82NOTICE: \x80Player %d does not exist.", target), false); // same - return; - } - - // we need to get rid of the /pm - newmsg = msg+5+spc; - strlcpy(msg, newmsg, 255); } - if (ci > 3) // don't send target+flags+empty message. + // I'm very bad at C, I swear I am, additional checks eww! + if (spc != 0 && msg[5] != ' ') { - buf[0] = teamtalk ? -1 : target; // target - buf[1] = 0; // flags - SendNetXCmd(XD_SAY, buf, 2 + strlen(&buf[2]) + 1); + HU_AddChatText("\x82NOTICE: \x80Invalid command format. Correct format is \'/pm \'.", false); + return; } - return; + + target = atoi(playernum); // turn that into a number + + // check for target player, if it doesn't exist then we can't send the message! + if (target < MAXPLAYERS && playeringame[target]) // player exists + target++; // even though playernums are from 0 to 31, target is 1 to 32, so up that by 1 to have it work! + else + { + HU_AddChatText(va("\x82NOTICE: \x80Player %d does not exist.", target), false); // same + return; + } + + // we need to get rid of the /pm + newmsg = msg+5+spc; + strlcpy(msg, newmsg, 255); + } + if (ci > 3) // don't send target+flags+empty message. + { + buf[0] = teamtalk ? -1 : target; // target + buf[1] = 0; // flags + SendNetXCmd(XD_SAY, buf, 2 + strlen(&buf[2]) + 1); } } // Handles key input and string input // -static inline boolean HU_keyInChatString(char *s, char ch) +static inline void HU_keyInChatString(char *s, char ch) { size_t l; @@ -1022,25 +1018,25 @@ static inline boolean HU_keyInChatString(char *s, char ch) s[c_input] = ch; // and replace this. } c_input++; - return true; + return; } - return false; + return; } else if (ch == KEY_BACKSPACE) { size_t i = c_input; if (c_input <= 0) - return false; + return; if (!s[i-1]) - return false; + return; if (i >= strlen(s)-1) { s[strlen(s)-1] = 0; c_input--; - return false; + return; } for (; (i < HU_MAXMSGLEN); i++) @@ -1049,10 +1045,6 @@ static inline boolean HU_keyInChatString(char *s, char ch) } c_input--; } - else if (ch != KEY_ENTER) - return false; // did not eat key - - return true; // ate the key } #endif @@ -1174,14 +1166,9 @@ boolean HU_Responder(event_t *ev) { memcpy(&w_chat[chatlen], paste, pastelen); // copy all of that. c_input += pastelen; - /*size_t i = 0; - for (;i= c_input) @@ -1198,12 +1185,11 @@ boolean HU_Responder(event_t *ev) } } - if (!CHAT_MUTE && HU_keyInChatString(w_chat,c)) - { - HU_queueChatChar(c); - } if (c == KEY_ENTER) { + if (!CHAT_MUTE) + HU_sendChatMessage(); + chat_on = false; c_input = 0; // reset input cursor chat_scrollmedown = true; // you hit enter, so you might wanna autoscroll to see what you just sent. :) @@ -1244,6 +1230,9 @@ boolean HU_Responder(event_t *ev) else c_input++; } + else if (!CHAT_MUTE) + HU_keyInChatString(w_chat, c); + return true; } #endif From e761e36c55e3ecf412ee552b6a2dadd25e77d635 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 2 Jan 2022 23:06:34 +0100 Subject: [PATCH 13/98] Cleanup and fix chat deleting and pasting --- src/hu_stuff.c | 87 ++++++++++---------------------------------------- src/hu_stuff.h | 2 +- 2 files changed, 17 insertions(+), 72 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 1def5c153..c43d6b62a 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -76,7 +76,7 @@ patch_t *nto_font[NT_FONTSIZE]; static player_t *plr; boolean chat_on; // entering a chat message? -static char w_chat[HU_MAXMSGLEN]; +static char w_chat[HU_MAXMSGLEN + 1]; static size_t c_input = 0; // let's try to make the chat input less shitty. static boolean headsupactive = false; boolean hu_showscores; // draw rankings @@ -915,7 +915,7 @@ static void HU_sendChatMessage(void) }; buf[ci] = '\0'; - memset(w_chat, '\0', HU_MAXMSGLEN); + memset(w_chat, '\0', sizeof(w_chat)); c_input = 0; // last minute mute check @@ -985,64 +985,27 @@ static void HU_sendChatMessage(void) } } +// // Handles key input and string input // static inline void HU_keyInChatString(char *s, char ch) { - size_t l; - if ((ch >= HU_FONTSTART && ch <= HU_FONTEND && hu_font[ch-HU_FONTSTART]) || ch == ' ') // Allow spaces, of course { - l = strlen(s); - if (l < HU_MAXMSGLEN - 1) - { - if (c_input >= strlen(s)) // don't do anything complicated - { - s[l++] = ch; - s[l]=0; - } - else - { - - // move everything past c_input for new characters: - size_t m = HU_MAXMSGLEN-1; - while (m>=c_input) - { - if (s[m]) - s[m+1] = (s[m]); - if (m == 0) // prevent overflow - break; - m--; - } - s[c_input] = ch; // and replace this. - } - c_input++; + if (strlen(s) >= HU_MAXMSGLEN) return; - } - return; + + memmove(&s[c_input + 1], &s[c_input], strlen(s) - c_input + 1); + s[c_input] = ch; + c_input++; } else if (ch == KEY_BACKSPACE) { - size_t i = c_input; - if (c_input <= 0) return; - if (!s[i-1]) - return; - - if (i >= strlen(s)-1) - { - s[strlen(s)-1] = 0; - c_input--; - return; - } - - for (; (i < HU_MAXMSGLEN); i++) - { - s[i-1] = s[i]; - } + memmove(&s[c_input - 1], &s[c_input], strlen(s) - c_input + 1); c_input--; } } @@ -1051,7 +1014,7 @@ static inline void HU_keyInChatString(char *s, char ch) void HU_clearChatChars(void) { - memset(w_chat, '\0', HU_MAXMSGLEN); + memset(w_chat, '\0', sizeof(w_chat)); chat_on = false; c_input = 0; @@ -1148,12 +1111,11 @@ boolean HU_Responder(event_t *ev) // pasting. pasting is cool. chat is a bit limited, though :( if (((c == 'v' || c == 'V') && ctrldown) && !CHAT_MUTE) { - const char *paste = I_ClipboardPaste(); + const char *paste; size_t chatlen; size_t pastelen; - // create a dummy string real quickly - + paste = I_ClipboardPaste(); if (paste == NULL) return true; @@ -1162,27 +1124,10 @@ boolean HU_Responder(event_t *ev) if (chatlen+pastelen > HU_MAXMSGLEN) return true; // we can't paste this!! - if (c_input >= strlen(w_chat)) // add it at the end of the string. - { - memcpy(&w_chat[chatlen], paste, pastelen); // copy all of that. - c_input += pastelen; - return true; - } - else // otherwise, we need to shift everything and make space, etc etc - { - size_t i = HU_MAXMSGLEN-1; - while (i >= c_input) - { - if (w_chat[i]) - w_chat[i+pastelen] = w_chat[i]; - if (i == 0) // prevent overflow - break; - i--; - } - memcpy(&w_chat[c_input], paste, pastelen); // copy all of that. - c_input += pastelen; - return true; - } + memmove(&w_chat[c_input + pastelen], &w_chat[c_input], pastelen); + memcpy(&w_chat[c_input], paste, pastelen); // copy all of that. + c_input += pastelen; + return true; } if (c == KEY_ENTER) diff --git a/src/hu_stuff.h b/src/hu_stuff.h index 9b7cee2d3..bb1a59e69 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -62,7 +62,7 @@ typedef struct //------------------------------------ // chat stuff //------------------------------------ -#define HU_MAXMSGLEN 224 +#define HU_MAXMSGLEN 223 #define CHAT_BUFSIZE 64 // that's enough messages, right? We'll delete the older ones when that gets out of hand. #ifdef NETSPLITSCREEN #define OLDCHAT (cv_consolechat.value == 1 || dedicated || vid.width < 640) From b933316f23e809a8ebb5d4d4a41e7051a88cdab1 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 2 Jan 2022 23:19:34 +0100 Subject: [PATCH 14/98] Cleanup chat event handling --- src/hu_stuff.c | 55 ++++++++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index c43d6b62a..755e7a237 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -985,31 +985,6 @@ static void HU_sendChatMessage(void) } } -// -// Handles key input and string input -// -static inline void HU_keyInChatString(char *s, char ch) -{ - if ((ch >= HU_FONTSTART && ch <= HU_FONTEND && hu_font[ch-HU_FONTSTART]) - || ch == ' ') // Allow spaces, of course - { - if (strlen(s) >= HU_MAXMSGLEN) - return; - - memmove(&s[c_input + 1], &s[c_input], strlen(s) - c_input + 1); - s[c_input] = ch; - c_input++; - } - else if (ch == KEY_BACKSPACE) - { - if (c_input <= 0) - return; - - memmove(&s[c_input - 1], &s[c_input], strlen(s) - c_input + 1); - c_input--; - } -} - #endif void HU_clearChatChars(void) @@ -1102,19 +1077,22 @@ boolean HU_Responder(event_t *ev) if (shiftdown ^ capslock) c = shiftxform[c]; } - else // if we're holding shift we should still shift non letter symbols + else // if we're holding shift we should still shift non letter symbols { if (shiftdown) c = shiftxform[c]; } // pasting. pasting is cool. chat is a bit limited, though :( - if (((c == 'v' || c == 'V') && ctrldown) && !CHAT_MUTE) + if ((c == 'v' || c == 'V') && ctrldown) { const char *paste; size_t chatlen; size_t pastelen; + if (CHAT_MUTE) + return true; + paste = I_ClipboardPaste(); if (paste == NULL) return true; @@ -1129,8 +1107,7 @@ boolean HU_Responder(event_t *ev) c_input += pastelen; return true; } - - if (c == KEY_ENTER) + else if (c == KEY_ENTER) { if (!CHAT_MUTE) HU_sendChatMessage(); @@ -1175,8 +1152,24 @@ boolean HU_Responder(event_t *ev) else c_input++; } - else if (!CHAT_MUTE) - HU_keyInChatString(w_chat, c); + else if ((c >= HU_FONTSTART && c <= HU_FONTEND && hu_font[c-HU_FONTSTART]) + || c == ' ') // Allow spaces, of course + { + if (CHAT_MUTE || strlen(w_chat) >= HU_MAXMSGLEN) + return true; + + memmove(&w_chat[c_input + 1], &w_chat[c_input], strlen(w_chat) - c_input + 1); + w_chat[c_input] = c; + c_input++; + } + else if (c == KEY_BACKSPACE) + { + if (CHAT_MUTE || c_input <= 0) + return true; + + memmove(&w_chat[c_input - 1], &w_chat[c_input], strlen(w_chat) - c_input + 1); + c_input--; + } return true; } From 055d57c56c9233e7dbf6f588b110373bf54cffb2 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 3 Jan 2022 00:06:20 +0100 Subject: [PATCH 15/98] Fix single-letter messages not being sent --- src/hu_stuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 755e7a237..484f3ee43 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -977,7 +977,7 @@ static void HU_sendChatMessage(void) newmsg = msg+5+spc; strlcpy(msg, newmsg, 255); } - if (ci > 3) // don't send target+flags+empty message. + if (ci > 2) // don't send target+flags+empty message. { buf[0] = teamtalk ? -1 : target; // target buf[1] = 0; // flags From 3c8a29f1ff5b62a0ca4ff636b9668df0ff894068 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 3 Jan 2022 00:06:43 +0100 Subject: [PATCH 16/98] Add SKIPSTRINGN macro --- src/byteptr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/byteptr.h b/src/byteptr.h index 4c8414fae..4de415505 100644 --- a/src/byteptr.h +++ b/src/byteptr.h @@ -154,7 +154,8 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr) #define WRITESTRING(p,s) do { size_t tmp_i = 0; for (; s[tmp_i] != '\0'; tmp_i++) WRITECHAR(p, s[tmp_i]); WRITECHAR(p, '\0');} while (0) #define WRITEMEM(p,s,n) do { memcpy(p, s, n); p += n; } while (0) -#define SKIPSTRING(p) while (READCHAR(p) != '\0') +#define SKIPSTRING(p) while (READCHAR(p) != '\0') +#define SKIPSTRINGN(p,n) ({ size_t tmp_i = 0; for (; tmp_i < n && READCHAR(p) != '\0'; tmp_i++); }) #define READSTRINGN(p,s,n) ({ size_t tmp_i = 0; for (; tmp_i < n && (s[tmp_i] = READCHAR(p)) != '\0'; tmp_i++); s[tmp_i] = '\0';}) #define READSTRING(p,s) ({ size_t tmp_i = 0; for (; (s[tmp_i] = READCHAR(p)) != '\0'; tmp_i++); s[tmp_i] = '\0';}) From af629fefe996f58a0a77bb0d759a40e31b7e23a6 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 3 Jan 2022 00:08:23 +0100 Subject: [PATCH 17/98] Fix long chat messages crashing the game --- src/hu_stuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 484f3ee43..8a8a6498d 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -644,7 +644,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) target = READSINT8(*p); flags = READUINT8(*p); msg = (char *)*p; - SKIPSTRING(*p); + SKIPSTRINGN(*p, HU_MAXMSGLEN); if ((cv_mute.value || flags & (HU_CSAY|HU_SERVER_SAY)) && playernum != serverplayer && !(IsPlayerAdmin(playernum))) { From 159be00109ebe379dd737f811b9f03fc85454681 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 3 Jan 2022 00:30:16 +0100 Subject: [PATCH 18/98] Support delete key in chatbox --- src/hu_stuff.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 8a8a6498d..fbd485b0a 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1170,6 +1170,13 @@ boolean HU_Responder(event_t *ev) memmove(&w_chat[c_input - 1], &w_chat[c_input], strlen(w_chat) - c_input + 1); c_input--; } + else if (c == KEY_DEL) + { + if (CHAT_MUTE || c_input >= strlen(w_chat)) + return true; + + memmove(&w_chat[c_input], &w_chat[c_input + 1], strlen(w_chat) - c_input); + } return true; } From 0241016f6a258f1ef14d5dd2520f76f45bac95fd Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 3 Jan 2022 12:13:55 +0100 Subject: [PATCH 19/98] Do not attempt to disconnect when a packet checksum is invalid --- src/d_net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/d_net.c b/src/d_net.c index 3a4746002..fc029f967 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -1144,8 +1144,9 @@ boolean HGetPacket(void) if (netbuffer->checksum != NetbufferChecksum()) { DEBFILE("Bad packet checksum\n"); - //Net_CloseConnection(nodejustjoined ? (doomcom->remotenode | FORCECLOSE) : doomcom->remotenode); - Net_CloseConnection(doomcom->remotenode); + // Do not disconnect or anything, just ignore the packet. + // Bad checksums with UDP tend to happen very scarcely + // so they are not normally an issue. continue; } From 13778247990d60c2ad8aa5729bc0397ab764eaaa Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 3 Jan 2022 22:37:19 +0100 Subject: [PATCH 20/98] Fix long chat messages causing net command failures --- src/hu_stuff.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index fbd485b0a..5f838b894 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -634,7 +634,8 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) SINT8 target; UINT8 flags; const char *dispname; - char *msg; + char msgbuf[HU_MAXMSGLEN + 1]; + char *msg = msgbuf; boolean action = false; char *ptr; INT32 spam_eatmsg = 0; @@ -643,8 +644,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) target = READSINT8(*p); flags = READUINT8(*p); - msg = (char *)*p; - SKIPSTRINGN(*p, HU_MAXMSGLEN); + READSTRINGN(*p, msgbuf, HU_MAXMSGLEN); if ((cv_mute.value || flags & (HU_CSAY|HU_SERVER_SAY)) && playernum != serverplayer && !(IsPlayerAdmin(playernum))) { @@ -913,7 +913,11 @@ static void HU_sendChatMessage(void) if (c >= ' ' && !(c & 0x80)) buf[ci] = c; }; - buf[ci] = '\0'; + if (ci-2 < HU_MAXMSGLEN) + { + buf[ci] = '\0'; + ci++; + } memset(w_chat, '\0', sizeof(w_chat)); c_input = 0; @@ -981,7 +985,7 @@ static void HU_sendChatMessage(void) { buf[0] = teamtalk ? -1 : target; // target buf[1] = 0; // flags - SendNetXCmd(XD_SAY, buf, 2 + strlen(&buf[2]) + 1); + SendNetXCmd(XD_SAY, buf, ci); } } From a8fe12ae9836e6e4dff788bd9d8d2a0da77c6937 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Tue, 4 Jan 2022 22:30:50 +0200 Subject: [PATCH 21/98] Hack that fixes software drop shadow crashes by bypassing incorrectly set variables --- src/r_draw.h | 1 + src/r_draw8.c | 33 +++++++++++++++++++++++++++++++++ src/r_things.c | 6 ++++++ 3 files changed, 40 insertions(+) diff --git a/src/r_draw.h b/src/r_draw.h index 2173c7a5a..2576e1577 100644 --- a/src/r_draw.h +++ b/src/r_draw.h @@ -170,6 +170,7 @@ void R_DrawViewBorder(void); void R_DrawColumn_8(void); void R_DrawShadeColumn_8(void); void R_DrawTranslucentColumn_8(void); +void R_DrawDropShadowColumn_8(void); void R_DrawTranslatedColumn_8(void); void R_DrawTranslatedTranslucentColumn_8(void); void R_Draw2sMultiPatchColumn_8(void); diff --git a/src/r_draw8.c b/src/r_draw8.c index b8a63d5c0..182182574 100644 --- a/src/r_draw8.c +++ b/src/r_draw8.c @@ -416,6 +416,39 @@ void R_DrawTranslucentColumn_8(void) } } +// Hack: A cut-down copy of R_DrawTranslucentColumn_8 that does not read texture +// data since something about calculating the texture reading address for drop shadows is broken. +// dc_texturemid and dc_iscale get wrong values for drop shadows, however those are not strictly +// needed for the current design of the shadows, so this function bypasses the issue +// by not using those variables at all. +void R_DrawDropShadowColumn_8(void) +{ + register INT32 count; + register UINT8 *dest; + + count = dc_yh - dc_yl + 1; + + if (count <= 0) // Zero length, column does not exceed a pixel. + return; + + dest = &topleft[dc_yl*vid.width + dc_x]; + + { +#define DSCOLOR 31 // palette index for the color of the shadow + register const UINT8 *transmap_offset = dc_transmap + (dc_colormap[DSCOLOR] << 8); +#undef DSCOLOR + while ((count -= 2) >= 0) + { + *dest = *(transmap_offset + (*dest)); + dest += vid.width; + *dest = *(transmap_offset + (*dest)); + dest += vid.width; + } + if (count & 1) + *dest = *(transmap_offset + (*dest)); + } +} + /** \brief The R_DrawTranslatedTranslucentColumn_8 function Spiffy function. Not only does it colormap a sprite, but does translucency as well. Uber-kudos to Cyan Helkaraxe diff --git a/src/r_things.c b/src/r_things.c index bed71a6d7..85c085043 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -837,6 +837,12 @@ static void R_DrawVisSprite(vissprite_t *vis) else if (vis->mobj->sprite == SPR_PLAY) // Looks like a player, but doesn't have a color? Get rid of green sonic syndrome. colfunc = colfuncs[COLDRAWFUNC_TRANS]; + // Hack: Use a special column function for drop shadows that bypasses + // invalid memory access crashes caused by R_ProjectDropShadow putting wrong values + // in dc_texturemid and dc_iscale when the shadow is sloped. + if (vis->cut & SC_SHADOW) + colfunc = R_DrawDropShadowColumn_8; + if (vis->extra_colormap && !(vis->renderflags & RF_NOCOLORMAPS)) { if (!dc_colormap) From a08c7eac1fedd1f4cc5439e37775b547866fd60d Mon Sep 17 00:00:00 2001 From: spherallic Date: Wed, 5 Jan 2022 09:55:46 +0100 Subject: [PATCH 22/98] wip: staterange actions --- src/deh_tables.c | 2 ++ src/doomdef.h | 4 ++-- src/info.h | 4 ++++ src/p_enemy.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 54 insertions(+), 3 deletions(-) diff --git a/src/deh_tables.c b/src/deh_tables.c index cfc98f631..73da7313a 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -224,6 +224,8 @@ actionpointer_t actionpointers[] = {{A_SetObjectFlags2}, "A_SETOBJECTFLAGS2"}, {{A_RandomState}, "A_RANDOMSTATE"}, {{A_RandomStateRange}, "A_RANDOMSTATERANGE"}, + {{A_StateRangeByAngle}, "A_STATERANGEBYANGLE"}, + {{A_StateRangeByParameter}, "A_STATERANGEBYPARAMETER"}, {{A_DualAction}, "A_DUALACTION"}, {{A_RemoteAction}, "A_REMOTEACTION"}, {{A_ToggleFlameJet}, "A_TOGGLEFLAMEJET"}, diff --git a/src/doomdef.h b/src/doomdef.h index 7e7e35599..a5ee79cd3 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -124,7 +124,7 @@ extern char logfilename[1024]; /* A mod name to further distinguish versions. */ #define SRB2APPLICATION "SRB2" -//#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3 +#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3 #ifdef DEVELOP #define VERSIONSTRING "Development EXE" #define VERSIONSTRING_RC "Development EXE" "\0" @@ -150,7 +150,7 @@ extern char logfilename[1024]; // Does this version require an added patch file? // Comment or uncomment this as necessary. -#define USE_PATCH_DTA +//#define USE_PATCH_DTA // Enforce a limit of loaded WAD files. //#define ENFORCE_WAD_LIMIT diff --git a/src/info.h b/src/info.h index 031a08b43..a0e141606 100644 --- a/src/info.h +++ b/src/info.h @@ -177,6 +177,8 @@ enum actionnum A_SETOBJECTFLAGS2, A_RANDOMSTATE, A_RANDOMSTATERANGE, + A_STATERANGEBYANGLE, + A_STATERANGEBYPARAMETER, A_DUALACTION, A_REMOTEACTION, A_TOGGLEFLAMEJET, @@ -443,6 +445,8 @@ void A_SetObjectFlags(); void A_SetObjectFlags2(); void A_RandomState(); void A_RandomStateRange(); +void A_StateRangeByAngle(); +void A_StateRangeByParameter(); void A_DualAction(); void A_RemoteAction(); void A_ToggleFlameJet(); diff --git a/src/p_enemy.c b/src/p_enemy.c index 9d51aced5..c7b3673d6 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -200,6 +200,8 @@ void A_SetObjectFlags(mobj_t *actor); void A_SetObjectFlags2(mobj_t *actor); void A_RandomState(mobj_t *actor); void A_RandomStateRange(mobj_t *actor); +void A_StateRangeByAngle(mobj_t *actor); +void A_StateRangeByParameter(mobj_t *actor); void A_DualAction(mobj_t *actor); void A_RemoteAction(mobj_t *actor); void A_ToggleFlameJet(mobj_t *actor); @@ -8292,7 +8294,7 @@ void A_Boss3ShockThink(mobj_t *actor) snew->angle = (actor->angle + snext->angle) >> 1; P_SetTarget(&snew->target, actor->target); snew->fuse = actor->fuse; - + P_SetScale(snew, actor->scale); snew->destscale = actor->destscale; snew->scalespeed = actor->scalespeed; @@ -9290,6 +9292,49 @@ void A_RandomStateRange(mobj_t *actor) P_SetMobjState(actor, P_RandomRange(locvar1, locvar2)); } +// Function: A_StateRangeByAngle +// +// Description: Chooses a state within the range supplied, depending on the actor's angle. +// +// var1 = Minimum state number to use. +// var2 = Maximum state number to use. The difference will act as a modulo operator. +// +void A_StateRangeByAngle(mobj_t *actor) +{ + INT32 locvar1 = var1; + INT32 locvar2 = var2; + + if (LUA_CallAction(A_STATERANGEBYANGLE, actor)) + return; + + if (locvar2 - locvar1 < 0) + return; // invalid range + + P_SetMobjState(actor, locvar1 + (AngleFixed(actor->angle)>>FRACBITS % (1 + locvar2 - locvar1))); +} + +// Function: A_StateRangeByParameter +// +// Description: Chooses a state within the range supplied, depending on the actor's parameter/extrainfo value. +// +// var1 = Minimum state number to use. +// var2 = Maximum state number to use. The difference will act as a modulo operator. +// +void A_StateRangeByParameter(mobj_t *actor) +{ + INT32 locvar1 = var1; + INT32 locvar2 = var2; + UINT8 parameter = (actor->spawnpoint ? actor->spawnpoint->extrainfo : 0); + + if (LUA_CallAction(A_STATERANGEBYANGLE, actor)) + return; + + if (locvar2 - locvar1 < 0) + return; // invalid range + + P_SetMobjState(actor, locvar1 + (parameter % (1 + locvar2 - locvar1))); +} + // Function: A_DualAction // // Description: Calls two actions. Be careful, if you reference the same state this action is called from, you can create an infinite loop. From 549569e75b4c072a54d9ab39926521c6cc198895 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Wed, 5 Jan 2022 10:08:49 +0100 Subject: [PATCH 23/98] Fix offset calculation for segs that represent linedef backsides --- src/p_setup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/p_setup.c b/src/p_setup.c index 7f9674e4e..de91f4674 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2494,7 +2494,10 @@ static boolean P_LoadExtendedSubsectorsAndSegs(UINT8 **data, nodetype_t nodetype P_InitializeSeg(seg); seg->angle = R_PointToAngle2(v1->x, v1->y, v2->x, v2->y); if (seg->linedef) - segs[i].offset = FixedHypot(v1->x - seg->linedef->v1->x, v1->y - seg->linedef->v1->y); + { + vertex_t *v = (seg->side == 1) ? seg->linedef->v2 : seg->linedef->v1; + segs[i].offset = FixedHypot(v1->x - v->x, v1->y - v->y); + } seg->length = P_SegLength(seg); #ifdef HWRENDER seg->flength = (rendermode == render_opengl) ? P_SegLengthFloat(seg) : 0; From 8651123463c0f74edbf9fa46e782ae8a5ef7d92f Mon Sep 17 00:00:00 2001 From: spherallic Date: Sat, 8 Jan 2022 19:47:00 +0100 Subject: [PATCH 24/98] Fix errors with the hardcoded Nightopians from Dream Hill. --- src/info.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/info.c b/src/info.c index 331e114b6..57899f4f1 100644 --- a/src/info.c +++ b/src/info.c @@ -3743,7 +3743,7 @@ state_t states[NUMSTATES] = {SPR_NTPN, 3, 4, {NULL}, 0, 0, S_PIAN5}, // S_PIAN4 {SPR_NTPN, 2, 4, {NULL}, 0, 0, S_PIAN6}, // S_PIAN5 {SPR_NTPN, 1, 4, {NULL}, 0, 0, S_PIAN1}, // S_PIAN6 - {SPR_NTPN, 5|FF_ANIMATE, 4, {NULL}, 1, 4, S_PIAN1}, // S_PIANSING + {SPR_NTPN, 4|FF_ANIMATE, 24, {NULL}, 1, 4, S_PIAN1}, // S_PIANSING // Shleep {SPR_SHLP, 0, 15, {NULL}, 0, 0, S_SHLEEP2}, // S_SHLEEP1 @@ -20128,8 +20128,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // painstate 200, // painchance sfx_None, // painsound - S_PIANSING, // meleestate - S_NULL, // missilestate + S_NULL, // meleestate + S_PIANSING, // missilestate S_NULL, // deathstate S_NULL, // xdeathstate sfx_None, // deathsound @@ -20140,7 +20140,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 16, // mass 0, // damage sfx_None, // activesound - MF_SLIDEME|MF_ENEMY|MF_SPECIAL|MF_SHOOTABLE|MF_NOGRAVITY, // flags + MF_SLIDEME|MF_SPECIAL|MF_NOGRAVITY, // flags S_NULL // raisestate }, From e0afc2d2b67d49ddd7d031c60bc610b8325df158 Mon Sep 17 00:00:00 2001 From: GoldenTails Date: Sun, 9 Jan 2022 17:09:57 -0600 Subject: [PATCH 25/98] Add a player->mo check before attempting to account for ztargetting. --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index 3955834b2..c2eda8fa0 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1411,7 +1411,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) newtarget = P_SpawnMobj(ticcmd_ztargetfocus[forplayer]->x, ticcmd_ztargetfocus[forplayer]->y, ticcmd_ztargetfocus[forplayer]->z, MT_LOCKON); // positioning, flip handled in P_SceneryThinker P_SetTarget(&newtarget->target, ticcmd_ztargetfocus[forplayer]); - if (P_AproxDistance( + if (player->mo && P_AproxDistance( player->mo->x - ticcmd_ztargetfocus[forplayer]->x, player->mo->y - ticcmd_ztargetfocus[forplayer]->y ) > 50*player->mo->scale) From a66854608855b2ee9336169cf7393b8a21c1b86e Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 10 Jan 2022 18:56:42 +0100 Subject: [PATCH 26/98] Make byte stream manipulation code easier to read --- src/byteptr.h | 71 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 20 deletions(-) diff --git a/src/byteptr.h b/src/byteptr.h index 4de415505..f66d9fcaf 100644 --- a/src/byteptr.h +++ b/src/byteptr.h @@ -150,27 +150,58 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr) #undef DEALIGNED -#define WRITESTRINGN(p,s,n) do { size_t tmp_i = 0; for (; tmp_i < n && s[tmp_i] != '\0'; tmp_i++) WRITECHAR(p, s[tmp_i]); if (tmp_i < n) WRITECHAR(p, '\0');} while (0) -#define WRITESTRING(p,s) do { size_t tmp_i = 0; for (; s[tmp_i] != '\0'; tmp_i++) WRITECHAR(p, s[tmp_i]); WRITECHAR(p, '\0');} while (0) -#define WRITEMEM(p,s,n) do { memcpy(p, s, n); p += n; } while (0) +#define WRITESTRINGN(p, s, n) ({ \ + size_t tmp_i; \ + \ + for (tmp_i = 0; tmp_i < n && s[tmp_i] != '\0'; tmp_i++) \ + WRITECHAR(p, s[tmp_i]); \ + \ + if (tmp_i < n) \ + WRITECHAR(p, '\0'); \ +}) -#define SKIPSTRING(p) while (READCHAR(p) != '\0') -#define SKIPSTRINGN(p,n) ({ size_t tmp_i = 0; for (; tmp_i < n && READCHAR(p) != '\0'; tmp_i++); }) +#define WRITESTRING(p, s) ({ \ + size_t tmp_i; \ + \ + for (tmp_i = 0; s[tmp_i] != '\0'; tmp_i++) \ + WRITECHAR(p, s[tmp_i]); \ + \ + WRITECHAR(p, '\0'); \ +}) -#define READSTRINGN(p,s,n) ({ size_t tmp_i = 0; for (; tmp_i < n && (s[tmp_i] = READCHAR(p)) != '\0'; tmp_i++); s[tmp_i] = '\0';}) -#define READSTRING(p,s) ({ size_t tmp_i = 0; for (; (s[tmp_i] = READCHAR(p)) != '\0'; tmp_i++); s[tmp_i] = '\0';}) -#define READMEM(p,s,n) ({ memcpy(s, p, n); p += n; }) +#define WRITEMEM(p, s, n) ({ \ + memcpy(p, s, n); \ + p += n; \ +}) -#if 0 // old names -#define WRITEBYTE(p,b) WRITEUINT8(p,b) -#define WRITESHORT(p,b) WRITEINT16(p,b) -#define WRITEUSHORT(p,b) WRITEUINT16(p,b) -#define WRITELONG(p,b) WRITEINT32(p,b) -#define WRITEULONG(p,b) WRITEUINT32(p,b) +#define SKIPSTRING(p) while (READCHAR(p) != '\0') -#define READBYTE(p) READUINT8(p) -#define READSHORT(p) READINT16(p) -#define READUSHORT(p) READUINT16(p) -#define READLONG(p) READINT32(p) -#define READULONG(p) READUINT32(p) -#endif +#define SKIPSTRINGN(p, n) ({ \ + size_t tmp_i = 0; \ + \ + while (tmp_i < n && READCHAR(p) != '\0') \ + tmp_i++; \ +}) + +#define READSTRINGN(p, s, n) ({ \ + size_t tmp_i = 0; \ + \ + while (tmp_i < n && (s[tmp_i] = READCHAR(p)) != '\0') \ + tmp_i++; \ + \ + s[tmp_i] = '\0'; \ +}) + +#define READSTRING(p, s) ({ \ + size_t tmp_i = 0; \ + \ + while ((s[tmp_i] = READCHAR(p)) != '\0') \ + tmp_i++; \ + \ + s[tmp_i] = '\0'; \ +}) + +#define READMEM(p, s, n) ({ \ + memcpy(s, p, n); \ + p += n; \ +}) From 3083290af868a18bdf3f2bd7a251f8567d266ef0 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 10 Jan 2022 18:57:18 +0100 Subject: [PATCH 27/98] Add READSTRINGL and WRITESTRINGL macros --- src/byteptr.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/byteptr.h b/src/byteptr.h index f66d9fcaf..3a1366577 100644 --- a/src/byteptr.h +++ b/src/byteptr.h @@ -160,6 +160,15 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr) WRITECHAR(p, '\0'); \ }) +#define WRITESTRINGL(p, s, n) ({ \ + size_t tmp_i; \ + \ + for (tmp_i = 0; tmp_i < n - 1 && s[tmp_i] != '\0'; tmp_i++) \ + WRITECHAR(p, s[tmp_i]); \ + \ + WRITECHAR(p, '\0'); \ +}) + #define WRITESTRING(p, s) ({ \ size_t tmp_i; \ \ @@ -192,6 +201,15 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr) s[tmp_i] = '\0'; \ }) +#define READSTRINGL(p, s, n) ({ \ + size_t tmp_i = 0; \ + \ + while (tmp_i < n - 1 && (s[tmp_i] = READCHAR(p)) != '\0') \ + tmp_i++; \ + \ + s[tmp_i] = '\0'; \ +}) + #define READSTRING(p, s) ({ \ size_t tmp_i = 0; \ \ From 7ea81eacc5986e0fec4b68e945db3443897e8561 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 10 Jan 2022 19:31:41 +0100 Subject: [PATCH 28/98] Fix say command and its variants using hardcoded buffer size --- src/hu_stuff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 5f838b894..4c07e07d9 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -461,7 +461,7 @@ void HU_AddChatText(const char *text, boolean playsound) static void DoSayCommand(SINT8 target, size_t usedargs, UINT8 flags) { - char buf[254]; + char buf[2 + HU_MAXMSGLEN + 1]; size_t numwords, ix; char *msg = &buf[2]; const size_t msgspace = sizeof buf - 2; @@ -537,7 +537,7 @@ static void DoSayCommand(SINT8 target, size_t usedargs, UINT8 flags) } buf[0] = target; newmsg = msg+5+spc; - strlcpy(msg, newmsg, 252); + strlcpy(msg, newmsg, HU_MAXMSGLEN + 1); } SendNetXCmd(XD_SAY, buf, strlen(msg) + 1 + msg-buf); From 05f1a9edc19ebcc0e383aca72bb52a9f6b83b349 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 10 Jan 2022 19:57:15 +0100 Subject: [PATCH 29/98] Revert "Fix long chat messages causing net command failures" This reverts commit 13778247990d60c2ad8aa5729bc0397ab764eaaa. --- src/hu_stuff.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 4c07e07d9..edbb2d8ec 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -634,8 +634,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) SINT8 target; UINT8 flags; const char *dispname; - char msgbuf[HU_MAXMSGLEN + 1]; - char *msg = msgbuf; + char *msg; boolean action = false; char *ptr; INT32 spam_eatmsg = 0; @@ -644,7 +643,8 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) target = READSINT8(*p); flags = READUINT8(*p); - READSTRINGN(*p, msgbuf, HU_MAXMSGLEN); + msg = (char *)*p; + SKIPSTRINGN(*p, HU_MAXMSGLEN); if ((cv_mute.value || flags & (HU_CSAY|HU_SERVER_SAY)) && playernum != serverplayer && !(IsPlayerAdmin(playernum))) { @@ -913,11 +913,7 @@ static void HU_sendChatMessage(void) if (c >= ' ' && !(c & 0x80)) buf[ci] = c; }; - if (ci-2 < HU_MAXMSGLEN) - { - buf[ci] = '\0'; - ci++; - } + buf[ci] = '\0'; memset(w_chat, '\0', sizeof(w_chat)); c_input = 0; @@ -985,7 +981,7 @@ static void HU_sendChatMessage(void) { buf[0] = teamtalk ? -1 : target; // target buf[1] = 0; // flags - SendNetXCmd(XD_SAY, buf, ci); + SendNetXCmd(XD_SAY, buf, 2 + strlen(&buf[2]) + 1); } } From aee7803621d5b4c77c69a626dac1077f93b19264 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 10 Jan 2022 20:03:29 +0100 Subject: [PATCH 30/98] Add SKIPSTRINGL macro --- src/byteptr.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/byteptr.h b/src/byteptr.h index 3a1366577..ee16bc13f 100644 --- a/src/byteptr.h +++ b/src/byteptr.h @@ -192,6 +192,8 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr) tmp_i++; \ }) +#define SKIPSTRINGL(p, n) SKIPSTRINGN(p, n) + #define READSTRINGN(p, s, n) ({ \ size_t tmp_i = 0; \ \ From de9d6ecbe682d14153a7af0bba02f62de4a42ccc Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 10 Jan 2022 20:05:58 +0100 Subject: [PATCH 31/98] Fix long chat messages causing net command failures --- src/hu_stuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index edbb2d8ec..a6341ff29 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -644,7 +644,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) target = READSINT8(*p); flags = READUINT8(*p); msg = (char *)*p; - SKIPSTRINGN(*p, HU_MAXMSGLEN); + SKIPSTRINGL(*p, HU_MAXMSGLEN + 1); if ((cv_mute.value || flags & (HU_CSAY|HU_SERVER_SAY)) && playernum != serverplayer && !(IsPlayerAdmin(playernum))) { From a6808de96c18d744550bf9ce0b48ef4f3dc12d00 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 10 Jan 2022 20:12:27 +0100 Subject: [PATCH 32/98] Fix message sending code using hardcoded buffer size --- src/hu_stuff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index a6341ff29..32ca59e6a 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -897,7 +897,7 @@ static boolean HU_chatboxContainsOnlySpaces(void) static void HU_sendChatMessage(void) { - char buf[2+256]; + char buf[2 + HU_MAXMSGLEN + 1]; char *msg = &buf[2]; size_t ci; INT32 target = 0; @@ -975,7 +975,7 @@ static void HU_sendChatMessage(void) // we need to get rid of the /pm newmsg = msg+5+spc; - strlcpy(msg, newmsg, 255); + strlcpy(msg, newmsg, HU_MAXMSGLEN + 1); } if (ci > 2) // don't send target+flags+empty message. { From af5173c90f1960245415a88febd3d67505fa5674 Mon Sep 17 00:00:00 2001 From: spherallic Date: Mon, 10 Jan 2022 21:38:30 +0100 Subject: [PATCH 33/98] Increase Eggman's hitboxes to actually match the current sprites. --- src/info.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/info.c b/src/info.c index 331e114b6..544ed1e31 100644 --- a/src/info.c +++ b/src/info.c @@ -5601,8 +5601,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_EGGMOBILE_FLEE1, // xdeathstate sfx_s3kb4, // deathsound 4, // speed - 24*FRACUNIT, // radius - 76*FRACUNIT, // height + 48*FRACUNIT, // radius + 84*FRACUNIT, // height 0, // display offset sfx_None, // mass 3, // damage @@ -5736,8 +5736,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_EGGMOBILE2_FLEE1,// xdeathstate sfx_s3kb4, // deathsound 2*FRACUNIT, // speed - 24*FRACUNIT, // radius - 76*FRACUNIT, // height + 48*FRACUNIT, // radius + 96*FRACUNIT, // height 0, // display offset 0, // mass 3, // damage @@ -5844,7 +5844,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_EGGMOBILE3_FLEE1, // xdeathstate sfx_s3kb4, // deathsound 8*FRACUNIT, // speed - 32*FRACUNIT, // radius + 48*FRACUNIT, // radius 116*FRACUNIT, // height 0, // display offset MT_FAKEMOBILE, // mass @@ -5925,8 +5925,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_EGGMOBILE4_FLEE1,// xdeathstate sfx_s3kb4, // deathsound 0, // speed - 24*FRACUNIT, // radius - 76*FRACUNIT, // height + 48*FRACUNIT, // radius + 84*FRACUNIT, // height 0, // display offset 0, // mass 3, // damage From b7dbb7782e5e1ca96ea3e79521f9ce0d7f5ab7f7 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Wed, 12 Jan 2022 23:06:26 +0100 Subject: [PATCH 34/98] Only load map lumps that are WADs or have no extension --- src/p_setup.c | 2 +- src/w_wad.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index 4f21922a0..f6abc70e6 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -4373,7 +4373,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate) // internal game map maplumpname = G_BuildMapName(gamemap); - lastloadedmaplumpnum = W_CheckNumForName(maplumpname); + lastloadedmaplumpnum = W_CheckNumForMap(maplumpname); if (lastloadedmaplumpnum == LUMPERROR) I_Error("Map %s not found.\n", maplumpname); diff --git a/src/w_wad.c b/src/w_wad.c index e49e0ce82..b594912f1 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -1463,8 +1463,14 @@ lumpnum_t W_CheckNumForMap(const char *name) continue; // Now look for the specified map. for (; lumpNum < end; lumpNum++) - if (!strnicmp(name, (wadfiles[i]->lumpinfo + lumpNum)->name, 8)) - return (i<<16) + lumpNum; + { + if (!strnicmp(name, wadfiles[i]->lumpinfo[lumpNum].name, 8)) + { + const char *extension = strrchr(wadfiles[i]->lumpinfo[lumpNum].fullname, '.'); + if (!(extension && stricmp(extension, ".wad"))) + return (i<<16) + lumpNum; + } + } } } return LUMPERROR; From 4af820e82ce46d112a1895c133cac5f41986b522 Mon Sep 17 00:00:00 2001 From: lachablock Date: Thu, 13 Jan 2022 09:56:47 +1100 Subject: [PATCH 35/98] Restore a cast I didn't realize used to be there --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index ebb5f33ea..eae22a0d4 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1556,7 +1556,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) } if (player->bot == BOT_2PHUMAN) - cmd->angleturn = (localangle - *myangle) >> 16; + cmd->angleturn = (INT16)((localangle - *myangle) >> 16); *myangle += (cmd->angleturn<<16); From fe3a201df58f8e185d61bbd7b2bde83ee9d26496 Mon Sep 17 00:00:00 2001 From: katsy Date: Thu, 13 Jan 2022 02:52:10 -0600 Subject: [PATCH 36/98] fix oldringexplode not scaling or flipping --- src/p_enemy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 9d51aced5..3b1d0a7cd 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -6542,7 +6542,7 @@ void A_OldRingExplode(mobj_t *actor) { { const angle_t fa = (i*FINEANGLES/16) & FINEMASK; - mo = P_SpawnMobj(actor->x, actor->y, actor->z, locvar1); + mo = P_SpawnMobjFromMobj(actor, 0, 0, 0, locvar1); P_SetTarget(&mo->target, actor->target); // Transfer target so player gets the points mo->momx = FixedMul(FINECOSINE(fa),ns); @@ -6568,7 +6568,7 @@ void A_OldRingExplode(mobj_t *actor) { } } - mo = P_SpawnMobj(actor->x, actor->y, actor->z, locvar1); + mo = P_SpawnMobjFromMobj(actor, 0, 0, 0, locvar1); P_SetTarget(&mo->target, actor->target); mo->momz = ns; @@ -6583,7 +6583,7 @@ void A_OldRingExplode(mobj_t *actor) { mo->color = skincolor_bluering; } - mo = P_SpawnMobj(actor->x, actor->y, actor->z, locvar1); + mo = P_SpawnMobjFromMobj(actor, 0, 0, 0, locvar1); P_SetTarget(&mo->target, actor->target); mo->momz = -ns; From f72f45d93ab530af40fb05b10be4a52a5c3db256 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Fri, 14 Jan 2022 19:53:03 +0200 Subject: [PATCH 37/98] Fix software splats breaking and crashing in skyboxes --- src/r_things.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/r_things.c b/src/r_things.c index accd1e2b3..423276a59 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -3001,13 +3001,25 @@ void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, drawseg_t* dsstart, p if (portal) { - for (x = x1; x <= x2; x++) + INT32 start_index = max(portal->start, x1); + INT32 end_index = min(portal->start + portal->end - portal->start, x2); + for (x = x1; x < start_index; x++) + { + spr->clipbot[x] = -1; + spr->cliptop[x] = -1; + } + for (x = start_index; x <= end_index; x++) { if (spr->clipbot[x] > portal->floorclip[x - portal->start]) spr->clipbot[x] = portal->floorclip[x - portal->start]; if (spr->cliptop[x] < portal->ceilingclip[x - portal->start]) spr->cliptop[x] = portal->ceilingclip[x - portal->start]; } + for (x = end_index + 1; x <= x2; x++) + { + spr->clipbot[x] = -1; + spr->cliptop[x] = -1; + } } } From d0966f123fc825befe3a90286c70f92b85d0f9c8 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Fri, 14 Jan 2022 20:11:49 +0200 Subject: [PATCH 38/98] Fix software splats not being clipped by ceiling walls --- src/r_splats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_splats.c b/src/r_splats.c index c554e9b1f..21048c46d 100644 --- a/src/r_splats.c +++ b/src/r_splats.c @@ -482,7 +482,7 @@ static void R_RasterizeFloorSplat(floorsplat_t *pSplat, vector2_t *verts, visspr continue; for (i = x1; i <= x2; i++) - cliptab[i] = (y >= mfloorclip[i]); + cliptab[i] = (y >= mfloorclip[i] || y <= mceilingclip[i]); // clip left while (cliptab[x1]) From 49d03913d72769e3343555c5784ea60a755faf96 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Fri, 14 Jan 2022 20:45:28 +0200 Subject: [PATCH 39/98] Add missing optimization to npo2 sloped floor sprites --- src/r_draw8_npo2.c | 72 +++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/src/r_draw8_npo2.c b/src/r_draw8_npo2.c index 2433cb402..90201c771 100644 --- a/src/r_draw8_npo2.c +++ b/src/r_draw8_npo2.c @@ -992,6 +992,9 @@ void R_DrawTiltedFloorSprite_NPO2_8(void) double endz, endu, endv; UINT32 stepu, stepv; + struct libdivide_u32_t x_divider = libdivide_u32_gen(ds_flatwidth); + struct libdivide_u32_t y_divider = libdivide_u32_gen(ds_flatheight); + iz = ds_szp->z + ds_szp->y*(centery-ds_y) + ds_szp->x*(ds_x1-centerx); uz = ds_sup->z + ds_sup->y*(centery-ds_y) + ds_sup->x*(ds_x1-centerx); vz = ds_svp->z + ds_svp->y*(centery-ds_y) + ds_svp->x*(ds_x1-centerx); @@ -1033,12 +1036,13 @@ void R_DrawTiltedFloorSprite_NPO2_8(void) // Carefully align all of my Friends. if (x < 0) - x = ds_flatwidth - ((UINT32)(ds_flatwidth - x) % ds_flatwidth); + x += (libdivide_u32_do((UINT32)(-x-1), &x_divider) + 1) * ds_flatwidth; + else + x -= libdivide_u32_do((UINT32)x, &x_divider) * ds_flatwidth; if (y < 0) - y = ds_flatheight - ((UINT32)(ds_flatheight - y) % ds_flatheight); - - x %= ds_flatwidth; - y %= ds_flatheight; + y += (libdivide_u32_do((UINT32)(-y-1), &y_divider) + 1) * ds_flatheight; + else + y -= libdivide_u32_do((UINT32)y, &y_divider) * ds_flatheight; val = source[((y * ds_flatwidth) + x)]; if (val & 0xFF00) @@ -1065,12 +1069,13 @@ void R_DrawTiltedFloorSprite_NPO2_8(void) // Carefully align all of my Friends. if (x < 0) - x = ds_flatwidth - ((UINT32)(ds_flatwidth - x) % ds_flatwidth); + x += (libdivide_u32_do((UINT32)(-x-1), &x_divider) + 1) * ds_flatwidth; + else + x -= libdivide_u32_do((UINT32)x, &x_divider) * ds_flatwidth; if (y < 0) - y = ds_flatheight - ((UINT32)(ds_flatheight - y) % ds_flatheight); - - x %= ds_flatwidth; - y %= ds_flatheight; + y += (libdivide_u32_do((UINT32)(-y-1), &y_divider) + 1) * ds_flatheight; + else + y -= libdivide_u32_do((UINT32)y, &y_divider) * ds_flatheight; val = source[((y * ds_flatwidth) + x)]; if (val & 0xFF00) @@ -1101,12 +1106,13 @@ void R_DrawTiltedFloorSprite_NPO2_8(void) // Carefully align all of my Friends. if (x < 0) - x = ds_flatwidth - ((UINT32)(ds_flatwidth - x) % ds_flatwidth); + x += (libdivide_u32_do((UINT32)(-x-1), &x_divider) + 1) * ds_flatwidth; + else + x -= libdivide_u32_do((UINT32)x, &x_divider) * ds_flatwidth; if (y < 0) - y = ds_flatheight - ((UINT32)(ds_flatheight - y) % ds_flatheight); - - x %= ds_flatwidth; - y %= ds_flatheight; + y += (libdivide_u32_do((UINT32)(-y-1), &y_divider) + 1) * ds_flatheight; + else + y -= libdivide_u32_do((UINT32)y, &y_divider) * ds_flatheight; val = source[((y * ds_flatwidth) + x)]; if (val & 0xFF00) @@ -1142,6 +1148,9 @@ void R_DrawTiltedTranslucentFloorSprite_NPO2_8(void) double endz, endu, endv; UINT32 stepu, stepv; + struct libdivide_u32_t x_divider = libdivide_u32_gen(ds_flatwidth); + struct libdivide_u32_t y_divider = libdivide_u32_gen(ds_flatheight); + iz = ds_szp->z + ds_szp->y*(centery-ds_y) + ds_szp->x*(ds_x1-centerx); uz = ds_sup->z + ds_sup->y*(centery-ds_y) + ds_sup->x*(ds_x1-centerx); vz = ds_svp->z + ds_svp->y*(centery-ds_y) + ds_svp->x*(ds_x1-centerx); @@ -1183,12 +1192,13 @@ void R_DrawTiltedTranslucentFloorSprite_NPO2_8(void) // Carefully align all of my Friends. if (x < 0) - x = ds_flatwidth - ((UINT32)(ds_flatwidth - x) % ds_flatwidth); + x += (libdivide_u32_do((UINT32)(-x-1), &x_divider) + 1) * ds_flatwidth; + else + x -= libdivide_u32_do((UINT32)x, &x_divider) * ds_flatwidth; if (y < 0) - y = ds_flatheight - ((UINT32)(ds_flatheight - y) % ds_flatheight); - - x %= ds_flatwidth; - y %= ds_flatheight; + y += (libdivide_u32_do((UINT32)(-y-1), &y_divider) + 1) * ds_flatheight; + else + y -= libdivide_u32_do((UINT32)y, &y_divider) * ds_flatheight; val = source[((y * ds_flatwidth) + x)]; if (val & 0xFF00) @@ -1215,12 +1225,13 @@ void R_DrawTiltedTranslucentFloorSprite_NPO2_8(void) // Carefully align all of my Friends. if (x < 0) - x = ds_flatwidth - ((UINT32)(ds_flatwidth - x) % ds_flatwidth); + x += (libdivide_u32_do((UINT32)(-x-1), &x_divider) + 1) * ds_flatwidth; + else + x -= libdivide_u32_do((UINT32)x, &x_divider) * ds_flatwidth; if (y < 0) - y = ds_flatheight - ((UINT32)(ds_flatheight - y) % ds_flatheight); - - x %= ds_flatwidth; - y %= ds_flatheight; + y += (libdivide_u32_do((UINT32)(-y-1), &y_divider) + 1) * ds_flatheight; + else + y -= libdivide_u32_do((UINT32)y, &y_divider) * ds_flatheight; val = source[((y * ds_flatwidth) + x)]; if (val & 0xFF00) @@ -1251,12 +1262,13 @@ void R_DrawTiltedTranslucentFloorSprite_NPO2_8(void) // Carefully align all of my Friends. if (x < 0) - x = ds_flatwidth - ((UINT32)(ds_flatwidth - x) % ds_flatwidth); + x += (libdivide_u32_do((UINT32)(-x-1), &x_divider) + 1) * ds_flatwidth; + else + x -= libdivide_u32_do((UINT32)x, &x_divider) * ds_flatwidth; if (y < 0) - y = ds_flatheight - ((UINT32)(ds_flatheight - y) % ds_flatheight); - - x %= ds_flatwidth; - y %= ds_flatheight; + y += (libdivide_u32_do((UINT32)(-y-1), &y_divider) + 1) * ds_flatheight; + else + y -= libdivide_u32_do((UINT32)y, &y_divider) * ds_flatheight; val = source[((y * ds_flatwidth) + x)]; if (val & 0xFF00) From bf2809b213fadfffdb5d199f660bcb4a0b3d37d3 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sat, 15 Jan 2022 17:12:33 +0100 Subject: [PATCH 40/98] Fix crosshairs not displaying and refactor their code. --- src/hu_stuff.c | 77 +++++++++----------------------------------------- 1 file changed, 14 insertions(+), 63 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index cf7118fbe..281280c9b 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1863,64 +1863,25 @@ static void HU_DrawChat_Old(void) } #endif -// draw the Crosshair, at the exact center of the view. -// +// Draw crosshairs at the exact center of the view. +// In splitscreen, crosshairs are stretched vertically to compensate for V_PERPLAYER squishing them. // Crosshairs are pre-cached at HU_Init -static inline void HU_DrawCrosshair(void) +static inline void HU_DrawCrosshairs(void) { - INT32 i, y, dupz; + INT32 cross1 = cv_crosshair.value & 3; + INT32 cross2 = cv_crosshair2.value & 3; - i = cv_crosshair.value & 3; - if (!i) + if (automapactive || demoplayback) return; - if ((netgame || multiplayer) && players[displayplayer].spectator) - return; + stplyr = ((stplyr == &players[displayplayer]) ? &players[secondarydisplayplayer] : &players[displayplayer]); + if (!players[displayplayer].spectator && (!camera.chase || ticcmd_ztargetfocus[0]) && cross1) + V_DrawStretchyFixedPatch((BASEVIDWIDTH/2)<>1); - - dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy); - - V_DrawFixedPatch(vid.width<<(FRACBITS-1), y<>1); - - if (!splitscreen) - return; - - #ifdef HWRENDER - if (rendermode != render_soft) - y += (INT32)gl_viewheight; - else - #endif - y += viewheight; - - dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy); - - V_DrawFixedPatch(vid.width<<(FRACBITS-1), y< Date: Wed, 19 Jan 2022 00:01:26 +1100 Subject: [PATCH 41/98] Revert server-sidedness of bots --- src/b_bot.c | 15 ++++++------ src/d_clisrv.c | 31 ------------------------ src/d_ticcmd.h | 9 ------- src/deh_tables.c | 5 ---- src/g_demo.c | 12 ---------- src/g_game.c | 57 ++++++++++++++++++++++++++------------------- src/lua_baselib.c | 3 --- src/lua_playerlib.c | 4 ---- src/p_saveg.c | 43 +++++++++++++--------------------- src/p_user.c | 10 +++----- 10 files changed, 60 insertions(+), 129 deletions(-) diff --git a/src/b_bot.c b/src/b_bot.c index 4fdfc8714..82075eb8e 100644 --- a/src/b_bot.c +++ b/src/b_bot.c @@ -17,6 +17,7 @@ #include "p_local.h" #include "b_bot.h" #include "lua_hook.h" +#include "i_system.h" // I_BaseTiccmd void B_UpdateBotleader(player_t *player) { @@ -176,6 +177,7 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) { jump = true; mem->thinkstate = AI_FLYSTANDBY; + bot->pflags |= PF_CANCARRY; } } @@ -187,10 +189,7 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) && P_IsObjectOnGround(sonic) && P_IsObjectOnGround(tails) && !(player->pflags & PF_STASIS) && bot->charability == CA_FLY) - { - mem->thinkstate = AI_THINKFLY; - cmd->flags |= TCF_FLIGHTINDICATOR; - } + mem->thinkstate = AI_THINKFLY; else if (mem->thinkstate == AI_THINKFLY) mem->thinkstate = AI_FOLLOW; @@ -211,8 +210,6 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) // Abort if the player moves away or spins if (dist > followthres || player->dashspeed) mem->thinkstate = AI_FOLLOW; - else - cmd->flags |= TCF_SETCARRY; } // Read player inputs while carrying else if (mem->thinkstate == AI_FLYCARRY) @@ -374,6 +371,8 @@ static void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd) void B_BuildTiccmd(player_t *player, ticcmd_t *cmd) { + G_CopyTiccmd(cmd, I_BaseTiccmd(), 1); // empty, or external driver + // Can't build a ticcmd if we aren't spawned... if (!player->mo) return; @@ -393,6 +392,7 @@ void B_BuildTiccmd(player_t *player, ticcmd_t *cmd) return; // Make sure we have a valid main character to follow + B_UpdateBotleader(player); if (!player->botleader) return; @@ -594,12 +594,13 @@ void B_RespawnBot(INT32 playernum) void B_HandleFlightIndicator(player_t *player) { mobj_t *tails = player->mo; + botmem_t *mem = &player->botmem; boolean shouldExist; if (!tails) return; - shouldExist = (player->cmd.flags & TCF_FLIGHTINDICATOR) && player->botleader + shouldExist = (mem->thinkstate == AI_THINKFLY) && player->botleader && player->bot == BOT_2PAI && player->playerstate == PST_LIVE; // check whether the indicator doesn't exist diff --git a/src/d_clisrv.c b/src/d_clisrv.c index c70532494..78a3ebe6c 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -46,7 +46,6 @@ #include "lua_libs.h" #include "md5.h" #include "m_perfstats.h" -#include "b_bot.h" // B_BuildTiccmd #ifndef NONET // cl loading screen @@ -5167,25 +5166,6 @@ static void Local_Maketic(INT32 realtics) localcmds2.angleturn |= TICCMD_RECEIVED; } -static void SV_MakeBotTics(void) -{ - UINT8 i; - for (i = 0; i < MAXPLAYERS; i++) - { - if (!playeringame[i]) - continue; - - if (players[i].bot == BOT_2PAI || players[i].bot == BOT_MPAI) - { - ticcmd_t *cmd = &netcmds[maketic % BACKUPTICS][i]; - - G_CopyTiccmd(cmd, I_BaseTiccmd(), 1); // empty, or external driver - B_BuildTiccmd(&players[i], cmd); - cmd->angleturn |= TICCMD_RECEIVED; - } - } -} - // create missed tic static void SV_Maketic(void) { @@ -5429,15 +5409,6 @@ void NetUpdate(void) if (client) maketic = neededtic; - // update players' lastbuttons so they can be used in ticcmd generation - for (i = 0; i < MAXPLAYERS; i++) - { - if (!playeringame[i]) - continue; - - players[i].lastbuttons = players[i].cmd.buttons; - } - Local_Maketic(realtics); // make local tic, and call menu? if (server) @@ -5481,8 +5452,6 @@ void NetUpdate(void) Net_ConnectionTimeout(i); } - SV_MakeBotTics(); - // Don't erase tics not acknowledged counts = realtics; diff --git a/src/d_ticcmd.h b/src/d_ticcmd.h index 480fbe2d4..182b30e6a 100644 --- a/src/d_ticcmd.h +++ b/src/d_ticcmd.h @@ -45,14 +45,6 @@ typedef enum BT_CUSTOM3 = 1<<15, } buttoncode_t; -// ticcmd flags -typedef enum -{ - TCF_FLIGHTINDICATOR = 1 << 0, // show flight indicator - TCF_SETCARRY = 1 << 1, // set PF_CARRY upon activating flight - // free up to and including 1 << 7 -} ticcmdflag_t; - // The data sampled per tick (single player) // and transmitted to other peers (multiplayer). // Mainly movements/button commands per game tick, @@ -74,7 +66,6 @@ typedef struct INT16 aiming; // vertical aiming, see G_BuildTicCmd UINT16 buttons; UINT8 latency; // Netgames: how many tics ago was this ticcmd generated from this player's end? - UINT8 flags; // miscellaneous info } ATTRPACK ticcmd_t; #if defined(_MSC_VER) diff --git a/src/deh_tables.c b/src/deh_tables.c index b150aa51d..cfc98f631 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -5345,11 +5345,6 @@ struct int_const_s const INT_CONST[] = { {"BT_CUSTOM2",BT_CUSTOM2}, // Lua customizable {"BT_CUSTOM3",BT_CUSTOM3}, // Lua customizable - // Ticcmd flags (ticcmdflag_t) - // (maybe move these into their own table in the future but I cba when there's only 2 LOL) - {"TCF_FLIGHTINDICATOR", TCF_FLIGHTINDICATOR}, - {"TCF_SETCARRY", TCF_SETCARRY}, - // Lua command registration flags {"COM_ADMIN",COM_ADMIN}, {"COM_SPLITSCREEN",COM_SPLITSCREEN}, diff --git a/src/g_demo.c b/src/g_demo.c index 2e2f6d56a..c97dbcf9e 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -110,7 +110,6 @@ demoghost *ghosts = NULL; #define ZT_BUTTONS 0x08 #define ZT_AIMING 0x10 #define ZT_LATENCY 0x20 -#define ZT_FLAGS 0x40 #define DEMOMARKER 0x80 // demoend #define METALDEATH 0x44 #define METALSNICE 0x69 @@ -185,8 +184,6 @@ void G_ReadDemoTiccmd(ticcmd_t *cmd, INT32 playernum) oldcmd.aiming = READINT16(demo_p); if (ziptic & ZT_LATENCY) oldcmd.latency = READUINT8(demo_p); - if (ziptic & ZT_FLAGS) - oldcmd.flags = READUINT8(demo_p); G_CopyTiccmd(cmd, &oldcmd, 1); players[playernum].angleturn = cmd->angleturn; @@ -251,13 +248,6 @@ void G_WriteDemoTiccmd(ticcmd_t *cmd, INT32 playernum) ziptic |= ZT_LATENCY; } - if (cmd->flags != oldcmd.flags) - { - WRITEUINT8(demo_p, cmd->flags); - oldcmd.flags = cmd->flags; - ziptic |= ZT_FLAGS; - } - *ziptic_p = ziptic; // attention here for the ticcmd size! @@ -701,8 +691,6 @@ void G_GhostTicker(void) g->p += 2; if (ziptic & ZT_LATENCY) g->p++; - if (ziptic & ZT_FLAGS) - g->p++; // Grab ghost data. ziptic = READUINT8(g->p); diff --git a/src/g_game.c b/src/g_game.c index eae22a0d4..c12b7e522 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1546,7 +1546,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) cmd->forwardmove = (SINT8)(cmd->forwardmove + forward); cmd->sidemove = (SINT8)(cmd->sidemove + side); - // Note: Majority of botstuffs are handled in G_Ticker and NetUpdate now. + // Note: Majority of botstuffs are handled in G_Ticker now. if (player->bot == BOT_2PAI && !player->powers[pw_tailsfly] && (cmd->forwardmove || cmd->sidemove || cmd->buttons)) @@ -1710,7 +1710,6 @@ ticcmd_t *G_MoveTiccmd(ticcmd_t* dest, const ticcmd_t* src, const size_t n) dest[i].aiming = (INT16)SHORT(src[i].aiming); dest[i].buttons = (UINT16)SHORT(src[i].buttons); dest[i].latency = src[i].latency; - dest[i].flags = src[i].flags; } return dest; } @@ -2313,35 +2312,45 @@ void G_Ticker(boolean run) buf = gametic % BACKUPTICS; + // Generate ticcmds for bots FIRST, then copy received ticcmds for players. + // This emulates pre-2.2.10 behaviour where the bot referenced their leader's last copied ticcmd, + // which is desirable because P_PlayerThink can override inputs (e.g. while PF_STASIS is applied or in a waterslide), + // and the bot AI needs to respect that. +#define ISHUMAN (players[i].bot == BOT_NONE || players[i].bot == BOT_2PHUMAN) for (i = 0; i < MAXPLAYERS; i++) { - if (playeringame[i]) + if (playeringame[i] && !ISHUMAN) // Less work is required if we're building a bot ticcmd. { - G_CopyTiccmd(&players[i].cmd, &netcmds[buf][i], 1); + players[i].lastbuttons = players[i].cmd.buttons; // Save last frame's button readings + B_BuildTiccmd(&players[i], &players[i].cmd); - if (players[i].bot == BOT_NONE || players[i].bot == BOT_2PHUMAN) - { - // Use the leveltime sent in the player's ticcmd to determine control lag - players[i].cmd.latency = min(((leveltime & 0xFF) - players[i].cmd.latency) & 0xFF, MAXPREDICTTICS-1); - - // Do angle adjustments. - - players[i].angleturn += players[i].cmd.angleturn - players[i].oldrelangleturn; - players[i].oldrelangleturn = players[i].cmd.angleturn; - if (P_ControlStyle(&players[i]) == CS_LMAOGALOG) - P_ForceLocalAngle(&players[i], players[i].angleturn << 16); - else - players[i].cmd.angleturn = (players[i].angleturn & ~TICCMD_RECEIVED) | (players[i].cmd.angleturn & TICCMD_RECEIVED); - } - else // Less work is required if we're building a bot ticcmd. - { - // Since bot TicCmd is pre-determined for both the client and server, the latency and packet checks are simplified. - players[i].cmd.latency = 0; - P_SetPlayerAngle(&players[i], players[i].cmd.angleturn << 16); - } + // Since bot TicCmd is pre-determined for both the client and server, the latency and packet checks are simplified. + players[i].cmd.latency = 0; + P_SetPlayerAngle(&players[i], players[i].cmd.angleturn << 16); } } + for (i = 0; i < MAXPLAYERS; i++) + { + if (playeringame[i] && ISHUMAN) + { + players[i].lastbuttons = players[i].cmd.buttons; // Save last frame's button readings + G_CopyTiccmd(&players[i].cmd, &netcmds[buf][i], 1); + + // Use the leveltime sent in the player's ticcmd to determine control lag + players[i].cmd.latency = min(((leveltime & 0xFF) - players[i].cmd.latency) & 0xFF, MAXPREDICTTICS-1); + + // Do angle adjustments. + players[i].angleturn += players[i].cmd.angleturn - players[i].oldrelangleturn; + players[i].oldrelangleturn = players[i].cmd.angleturn; + if (P_ControlStyle(&players[i]) == CS_LMAOGALOG) + P_ForceLocalAngle(&players[i], players[i].angleturn << 16); + else + players[i].cmd.angleturn = (players[i].angleturn & ~TICCMD_RECEIVED) | (players[i].cmd.angleturn & TICCMD_RECEIVED); + } + } +#undef ISHUMAN + // do main actions switch (gamestate) { diff --git a/src/lua_baselib.c b/src/lua_baselib.c index e0d09dee9..12ad4fee0 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -32,7 +32,6 @@ #include "b_bot.h" // B_UpdateBotleader #include "d_clisrv.h" // CL_RemovePlayer #include "i_system.h" // I_GetPreciseTime, I_PreciseToMicros -#include "i_net.h" // doomcom #include "lua_script.h" #include "lua_libs.h" @@ -3464,8 +3463,6 @@ static int lib_gAddPlayer(lua_State *L) playeringame[newplayernum] = true; G_AddPlayer(newplayernum); - if (newplayernum+1 > doomcom->numslots) - doomcom->numslots = (INT16)(newplayernum+1); newplayer = &players[newplayernum]; newplayer->jointime = 0; diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index edd1351e8..1c634da45 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -833,8 +833,6 @@ static int ticcmd_get(lua_State *L) lua_pushinteger(L, cmd->buttons); else if (fastcmp(field,"latency")) lua_pushinteger(L, cmd->latency); - else if (fastcmp(field,"flags")) - lua_pushinteger(L, cmd->flags); else return NOFIELD; @@ -863,8 +861,6 @@ static int ticcmd_set(lua_State *L) cmd->buttons = (UINT16)luaL_checkinteger(L, 3); else if (fastcmp(field,"latency")) return NOSET; - else if (fastcmp(field,"flags")) - cmd->flags = (UINT8)luaL_checkinteger(L, 3); else return NOFIELD; diff --git a/src/p_saveg.c b/src/p_saveg.c index f9938763a..722340f41 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -51,15 +51,14 @@ UINT8 *save_p; // than an UINT16 typedef enum { -// RFLAGPOINT = 0x001, -// BFLAGPOINT = 0x002, - CAPSULE = 0x004, - AWAYVIEW = 0x008, - FIRSTAXIS = 0x010, - SECONDAXIS = 0x020, - FOLLOW = 0x040, - DRONE = 0x080, - BOTLEADER = 0x100, +// RFLAGPOINT = 0x01, +// BFLAGPOINT = 0x02, + CAPSULE = 0x04, + AWAYVIEW = 0x08, + FIRSTAXIS = 0x10, + SECONDAXIS = 0x20, + FOLLOW = 0x40, + DRONE = 0x80, } player_saveflags; static inline void P_ArchivePlayer(void) @@ -198,11 +197,10 @@ static void P_NetArchivePlayers(void) // Bots // ////////// WRITEUINT8(save_p, players[i].bot); - // We no longer need to sync these since ticcmds are generated only by the server - //WRITEUINT8(save_p, players[i].botmem.lastForward); - //WRITEUINT8(save_p, players[i].botmem.lastBlocked); - //WRITEUINT8(save_p, players[i].botmem.catchup_tics); - //WRITEUINT8(save_p, players[i].botmem.thinkstate); + WRITEUINT8(save_p, players[i].botmem.lastForward); + WRITEUINT8(save_p, players[i].botmem.lastBlocked); + WRITEUINT8(save_p, players[i].botmem.catchup_tics); + WRITEUINT8(save_p, players[i].botmem.thinkstate); WRITEUINT8(save_p, players[i].removing); WRITEUINT8(save_p, players[i].blocked); @@ -295,9 +293,6 @@ static void P_NetArchivePlayers(void) if (players[i].drone) flags |= DRONE; - if (players[i].botleader) - flags |= BOTLEADER; - WRITEINT16(save_p, players[i].lastsidehit); WRITEINT16(save_p, players[i].lastlinehit); @@ -330,9 +325,6 @@ static void P_NetArchivePlayers(void) if (flags & DRONE) WRITEUINT32(save_p, players[i].drone->mobjnum); - if (flags & BOTLEADER) - WRITEUINT8(save_p, (UINT8)(players[i].botleader - players)); - WRITEFIXED(save_p, players[i].camerascale); WRITEFIXED(save_p, players[i].shieldscale); @@ -433,10 +425,10 @@ static void P_NetUnArchivePlayers(void) ////////// players[i].bot = READUINT8(save_p); - //players[i].botmem.lastForward = READUINT8(save_p); - //players[i].botmem.lastBlocked = READUINT8(save_p); - //players[i].botmem.catchup_tics = READUINT8(save_p); - //players[i].botmem.thinkstate = READUINT8(save_p); + players[i].botmem.lastForward = READUINT8(save_p); + players[i].botmem.lastBlocked = READUINT8(save_p); + players[i].botmem.catchup_tics = READUINT8(save_p); + players[i].botmem.thinkstate = READUINT8(save_p); players[i].removing = READUINT8(save_p); players[i].blocked = READUINT8(save_p); @@ -543,9 +535,6 @@ static void P_NetUnArchivePlayers(void) if (flags & DRONE) players[i].drone = (mobj_t *)(size_t)READUINT32(save_p); - if (flags & BOTLEADER) - players[i].botleader = &players[READUINT8(save_p)]; - players[i].camerascale = READFIXED(save_p); players[i].shieldscale = READFIXED(save_p); diff --git a/src/p_user.c b/src/p_user.c index ca7252584..b3e555e2d 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -5349,10 +5349,10 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd) player->powers[pw_tailsfly] = tailsflytics + 1; // Set the fly timer player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING|PF_STARTDASH); - if ((player->bot != BOT_2PAI) || (cmd->flags & TCF_SETCARRY)) - player->pflags |= (PF_THOKKED|PF_CANCARRY); - else + if (player->bot == BOT_2PAI) player->pflags |= PF_THOKKED; + else + player->pflags |= (PF_THOKKED|PF_CANCARRY); } break; case CA_GLIDEANDCLIMB: @@ -11441,11 +11441,7 @@ void P_PlayerThink(player_t *player) if (B_CheckRespawn(player)) player->playerstate = PST_REBORN; else - { - if (player->bot == BOT_2PAI) - B_UpdateBotleader(player); B_HandleFlightIndicator(player); - } } if (player->playerstate == PST_REBORN) { From 9a07c1ca8c25996e091d9f442578be4cea60db4c Mon Sep 17 00:00:00 2001 From: spherallic Date: Wed, 19 Jan 2022 10:09:57 +0100 Subject: [PATCH 42/98] Fix HUD/graphic blendmodes not working at full opacity in Software. --- src/v_video.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/v_video.c b/src/v_video.c index 12588f9c2..49601ad78 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -539,7 +539,7 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca patchdrawfunc = standardpdraw; v_translevel = NULL; - if (alphalevel) + if (alphalevel || blendmode) { if (alphalevel == 10) alphalevel = hudminusalpha[st_translucency]; @@ -551,15 +551,13 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca if (alphalevel >= 10) return; // invis - if (alphalevel) - { - if (blendmode) - v_translevel = R_GetBlendTable(blendmode+1, alphalevel); - else - v_translevel = R_GetTranslucencyTable(alphalevel); + if (blendmode) + v_translevel = R_GetBlendTable(blendmode+1, alphalevel); + else if (alphalevel) + v_translevel = R_GetTranslucencyTable(alphalevel); + if (v_translevel) patchdrawfunc = translucentpdraw; - } } v_colormap = NULL; @@ -833,7 +831,7 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vscale, IN patchdrawfunc = standardpdraw; v_translevel = NULL; - if (alphalevel) + if (alphalevel || blendmode) { if (alphalevel == 10) alphalevel = hudminusalpha[st_translucency]; @@ -845,15 +843,13 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vscale, IN if (alphalevel >= 10) return; // invis - if (alphalevel) - { - if (blendmode) - v_translevel = R_GetBlendTable(blendmode+1, alphalevel); - else - v_translevel = R_GetTranslucencyTable(alphalevel); + if (blendmode) + v_translevel = R_GetBlendTable(blendmode+1, alphalevel); + else if (alphalevel) + v_translevel = R_GetTranslucencyTable(alphalevel); + if (v_translevel) patchdrawfunc = translucentpdraw; - } } v_colormap = NULL; From 15755ef992de4b44fc5a18d3b0e5ebf6e151c7e5 Mon Sep 17 00:00:00 2001 From: spherallic Date: Wed, 19 Jan 2022 13:17:57 +0100 Subject: [PATCH 43/98] Remove unneeded R_GetTranslucencyTable calls, add V_HUDTRANS* comments --- src/hardware/hw_draw.c | 22 ++++++++-------------- src/v_video.c | 34 +++++++++++++++------------------- 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index e02dbea5b..02697789e 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -347,19 +347,16 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p v[2].t = v[3].t = hwrPatch->max_t; // clip it since it is used for bunny scroll in doom I - if (blendmode) - flags = HWR_GetBlendModeFlag(blendmode+1)|PF_NoDepthTest; - else - flags = PF_Translucent|PF_NoDepthTest; + flags = HWR_GetBlendModeFlag(blendmode+1)|PF_NoDepthTest; if (alphalevel) { FSurfaceInfo Surf; Surf.PolyColor.s.red = Surf.PolyColor.s.green = Surf.PolyColor.s.blue = 0xff; - if (alphalevel == 10) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency]; - else if (alphalevel == 11) Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency]; - else if (alphalevel == 12) Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency]; + if (alphalevel == 10) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency]; // V_HUDTRANSHALF + else if (alphalevel == 11) Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency]; // V_HUDTRANS + else if (alphalevel == 12) Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency]; // V_HUDTRANSDOUBLE else Surf.PolyColor.s.alpha = softwaretranstogl[10-alphalevel]; flags |= PF_Modulated; HWD.pfnDrawPolygon(&Surf, v, 4, flags); @@ -644,19 +641,16 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, } // clip it since it is used for bunny scroll in doom I - if (blendmode) - flags = HWR_GetBlendModeFlag(blendmode+1)|PF_NoDepthTest; - else - flags = PF_Translucent|PF_NoDepthTest; + flags = HWR_GetBlendModeFlag(blendmode+1)|PF_NoDepthTest; if (alphalevel) { FSurfaceInfo Surf; Surf.PolyColor.s.red = Surf.PolyColor.s.green = Surf.PolyColor.s.blue = 0xff; - if (alphalevel == 10) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency]; - else if (alphalevel == 11) Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency]; - else if (alphalevel == 12) Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency]; + if (alphalevel == 10) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency]; // V_HUDTRANSHALF + else if (alphalevel == 11) Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency]; // V_HUDTRANS + else if (alphalevel == 12) Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency]; // V_HUDTRANSDOUBLE else Surf.PolyColor.s.alpha = softwaretranstogl[10-alphalevel]; flags |= PF_Modulated; diff --git a/src/v_video.c b/src/v_video.c index 49601ad78..4e17a4497 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -541,23 +541,21 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca v_translevel = NULL; if (alphalevel || blendmode) { - if (alphalevel == 10) + if (alphalevel == 10) // V_HUDTRANSHALF alphalevel = hudminusalpha[st_translucency]; - else if (alphalevel == 11) + else if (alphalevel == 11) // V_HUDTRANS alphalevel = 10 - st_translucency; - else if (alphalevel == 12) + else if (alphalevel == 12) // V_HUDTRANSDOUBLE alphalevel = hudplusalpha[st_translucency]; if (alphalevel >= 10) return; // invis - if (blendmode) + if (alphalevel || blendmode) + { v_translevel = R_GetBlendTable(blendmode+1, alphalevel); - else if (alphalevel) - v_translevel = R_GetTranslucencyTable(alphalevel); - - if (v_translevel) patchdrawfunc = translucentpdraw; + } } v_colormap = NULL; @@ -833,23 +831,21 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vscale, IN v_translevel = NULL; if (alphalevel || blendmode) { - if (alphalevel == 10) + if (alphalevel == 10) // V_HUDTRANSHALF alphalevel = hudminusalpha[st_translucency]; - else if (alphalevel == 11) + else if (alphalevel == 11) // V_HUDTRANS alphalevel = 10 - st_translucency; - else if (alphalevel == 12) + else if (alphalevel == 12) // V_HUDTRANSDOUBLE alphalevel = hudplusalpha[st_translucency]; if (alphalevel >= 10) return; // invis - if (blendmode) + if (alphalevel || blendmode) + { v_translevel = R_GetBlendTable(blendmode+1, alphalevel); - else if (alphalevel) - v_translevel = R_GetTranslucencyTable(alphalevel); - - if (v_translevel) patchdrawfunc = translucentpdraw; + } } v_colormap = NULL; @@ -1406,11 +1402,11 @@ void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c) if ((alphalevel = ((c & V_ALPHAMASK) >> V_ALPHASHIFT))) { - if (alphalevel == 10) + if (alphalevel == 10) // V_HUDTRANSHALF alphalevel = hudminusalpha[st_translucency]; - else if (alphalevel == 11) + else if (alphalevel == 11) // V_HUDTRANS alphalevel = 10 - st_translucency; - else if (alphalevel == 12) + else if (alphalevel == 12) // V_HUDTRANSDOUBLE alphalevel = hudplusalpha[st_translucency]; if (alphalevel >= 10) From 6d19a55de937a6a57a74e0b4e12ed6f98df3e919 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 23 Jan 2022 19:19:26 +0100 Subject: [PATCH 44/98] oops --- src/p_enemy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index c7b3673d6..33692ba98 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -9326,7 +9326,7 @@ void A_StateRangeByParameter(mobj_t *actor) INT32 locvar2 = var2; UINT8 parameter = (actor->spawnpoint ? actor->spawnpoint->extrainfo : 0); - if (LUA_CallAction(A_STATERANGEBYANGLE, actor)) + if (LUA_CallAction(A_STATERANGEBYPARAMETER, actor)) return; if (locvar2 - locvar1 < 0) From be7f628e2cd750e4653296a3bd828a3fadc9f008 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 23 Jan 2022 20:13:26 +0100 Subject: [PATCH 45/98] Add new plant object for the revamped tutorial. --- extras/conf/SRB2-22.cfg | 13 ++++ src/deh_tables.c | 56 ++++++++++++++ src/info.c | 162 ++++++++++++++++++++++++++++++++++++++++ src/info.h | 60 +++++++++++++++ src/p_mobj.c | 22 ++++++ 5 files changed, 313 insertions(+) diff --git a/extras/conf/SRB2-22.cfg b/extras/conf/SRB2-22.cfg index b780ff75f..f9595e868 100644 --- a/extras/conf/SRB2-22.cfg +++ b/extras/conf/SRB2-22.cfg @@ -6880,6 +6880,19 @@ thingtypes } } + tutorial + { + color = 10; // Green + title = "Tutorial"; + + 799 + { + title = "Tutorial Plant"; + sprite = "TUPFH0"; + width = 32; + height = 144; + } + flickies { color = 10; // Green diff --git a/src/deh_tables.c b/src/deh_tables.c index 73da7313a..85fdd41d4 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -1753,6 +1753,56 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi // The letter "S_LETTER", + // Tutorial Scenery + "S_TUTORIALLEAF1", + "S_TUTORIALLEAF2", + "S_TUTORIALLEAF3", + "S_TUTORIALLEAF4", + "S_TUTORIALLEAF5", + "S_TUTORIALLEAF6", + "S_TUTORIALLEAF7", + "S_TUTORIALLEAF8", + "S_TUTORIALLEAF9", + "S_TUTORIALLEAF10", + "S_TUTORIALLEAF11", + "S_TUTORIALLEAF12", + "S_TUTORIALLEAF13", + "S_TUTORIALLEAF14", + "S_TUTORIALLEAF15", + "S_TUTORIALLEAF16", + "S_TUTORIALFLOWER1", + "S_TUTORIALFLOWER2", + "S_TUTORIALFLOWER3", + "S_TUTORIALFLOWER4", + "S_TUTORIALFLOWER5", + "S_TUTORIALFLOWER6", + "S_TUTORIALFLOWER7", + "S_TUTORIALFLOWER8", + "S_TUTORIALFLOWER9", + "S_TUTORIALFLOWER10", + "S_TUTORIALFLOWER11", + "S_TUTORIALFLOWER12", + "S_TUTORIALFLOWER13", + "S_TUTORIALFLOWER14", + "S_TUTORIALFLOWER15", + "S_TUTORIALFLOWER16", + "S_TUTORIALFLOWERF1", + "S_TUTORIALFLOWERF2", + "S_TUTORIALFLOWERF3", + "S_TUTORIALFLOWERF4", + "S_TUTORIALFLOWERF5", + "S_TUTORIALFLOWERF6", + "S_TUTORIALFLOWERF7", + "S_TUTORIALFLOWERF8", + "S_TUTORIALFLOWERF9", + "S_TUTORIALFLOWERF10", + "S_TUTORIALFLOWERF11", + "S_TUTORIALFLOWERF12", + "S_TUTORIALFLOWERF13", + "S_TUTORIALFLOWERF14", + "S_TUTORIALFLOWERF15", + "S_TUTORIALFLOWERF16", + // GFZ flowers "S_GFZFLOWERA", "S_GFZFLOWERB", @@ -3765,6 +3815,12 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t // The letter "MT_LETTER", + // Tutorial Scenery + "MT_TUTORIALPLANT", + "MT_TUTORIALLEAF", + "MT_TUTORIALFLOWER", + "MT_TUTORIALFLOWERF", + // Greenflower Scenery "MT_GFZFLOWER1", "MT_GFZFLOWER2", diff --git a/src/info.c b/src/info.c index 331e114b6..98fc5b7d4 100644 --- a/src/info.c +++ b/src/info.c @@ -203,6 +203,10 @@ char sprnames[NUMSPRITES + 1][5] = // The letter "LETR", + // Tutorial Scenery + "TUPL", + "TUPF", + // Greenflower Scenery "FWR1", "FWR2", // GFZ Sunflower @@ -2117,6 +2121,56 @@ state_t states[NUMSTATES] = {SPR_LETR, FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_LETTER + // Tutorial scenery + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|0, 3, {NULL}, 0, 0, S_TUTORIALLEAF2}, // S_TUTORIALLEAF1 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|1, 3, {NULL}, 0, 0, S_TUTORIALLEAF3}, // S_TUTORIALLEAF2 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|2, 3, {NULL}, 0, 0, S_TUTORIALLEAF4}, // S_TUTORIALLEAF3 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|3, 3, {NULL}, 0, 0, S_TUTORIALLEAF5}, // S_TUTORIALLEAF4 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|4, 3, {NULL}, 0, 0, S_TUTORIALLEAF6}, // S_TUTORIALLEAF5 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|5, 3, {NULL}, 0, 0, S_TUTORIALLEAF7}, // S_TUTORIALLEAF6 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|6, 3, {NULL}, 0, 0, S_TUTORIALLEAF8}, // S_TUTORIALLEAF7 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|7, 3, {NULL}, 0, 0, S_TUTORIALLEAF9}, // S_TUTORIALLEAF8 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|7, 3, {NULL}, 0, 0, S_TUTORIALLEAF10}, // S_TUTORIALLEAF9 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|6, 3, {NULL}, 0, 0, S_TUTORIALLEAF11}, // S_TUTORIALLEAF10 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|5, 3, {NULL}, 0, 0, S_TUTORIALLEAF12}, // S_TUTORIALLEAF11 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|4, 3, {NULL}, 0, 0, S_TUTORIALLEAF13}, // S_TUTORIALLEAF12 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|3, 3, {NULL}, 0, 0, S_TUTORIALLEAF14}, // S_TUTORIALLEAF13 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|2, 3, {NULL}, 0, 0, S_TUTORIALLEAF15}, // S_TUTORIALLEAF14 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|1, 3, {NULL}, 0, 0, S_TUTORIALLEAF16}, // S_TUTORIALLEAF15 + {SPR_TUPL, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|0, 3, {NULL}, 0, 0, S_TUTORIALLEAF1}, // S_TUTORIALLEAF16 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|0, 3, {NULL}, 0, 0, S_TUTORIALFLOWER2}, // S_TUTORIALFLOWER1 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|1, 3, {NULL}, 0, 0, S_TUTORIALFLOWER3}, // S_TUTORIALFLOWER2 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|2, 3, {NULL}, 0, 0, S_TUTORIALFLOWER4}, // S_TUTORIALFLOWER3 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|3, 3, {NULL}, 0, 0, S_TUTORIALFLOWER5}, // S_TUTORIALFLOWER4 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|4, 3, {NULL}, 0, 0, S_TUTORIALFLOWER6}, // S_TUTORIALFLOWER5 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|5, 3, {NULL}, 0, 0, S_TUTORIALFLOWER7}, // S_TUTORIALFLOWER6 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|6, 3, {NULL}, 0, 0, S_TUTORIALFLOWER8}, // S_TUTORIALFLOWER7 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|7, 3, {NULL}, 0, 0, S_TUTORIALFLOWER9}, // S_TUTORIALFLOWER8 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|7, 3, {NULL}, 0, 0, S_TUTORIALFLOWER10}, // S_TUTORIALFLOWER9 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|6, 3, {NULL}, 0, 0, S_TUTORIALFLOWER11}, // S_TUTORIALFLOWER10 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|5, 3, {NULL}, 0, 0, S_TUTORIALFLOWER12}, // S_TUTORIALFLOWER11 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|4, 3, {NULL}, 0, 0, S_TUTORIALFLOWER13}, // S_TUTORIALFLOWER12 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|3, 3, {NULL}, 0, 0, S_TUTORIALFLOWER14}, // S_TUTORIALFLOWER13 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|2, 3, {NULL}, 0, 0, S_TUTORIALFLOWER15}, // S_TUTORIALFLOWER14 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|1, 3, {NULL}, 0, 0, S_TUTORIALFLOWER16}, // S_TUTORIALFLOWER15 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_PAPERSPRITE|0, 3, {NULL}, 0, 0, S_TUTORIALFLOWER1}, // S_TUTORIALFLOWER16 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|0, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF2}, // S_TUTORIALFLOWERF1 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|1, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF3}, // S_TUTORIALFLOWERF2 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|2, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF4}, // S_TUTORIALFLOWERF3 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|3, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF5}, // S_TUTORIALFLOWERF4 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|4, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF6}, // S_TUTORIALFLOWERF5 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|5, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF7}, // S_TUTORIALFLOWERF6 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|6, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF8}, // S_TUTORIALFLOWERF7 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|7, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF9}, // S_TUTORIALFLOWERF8 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|7, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF10}, // S_TUTORIALFLOWERF9 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|6, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF11}, // S_TUTORIALFLOWERF10 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|5, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF12}, // S_TUTORIALFLOWERF11 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|4, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF13}, // S_TUTORIALFLOWERF12 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|3, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF14}, // S_TUTORIALFLOWERF13 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|2, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF15}, // S_TUTORIALFLOWERF14 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|1, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF16}, // S_TUTORIALFLOWERF15 + {SPR_TUPF, FF_SEMIBRIGHT|FF_ADD|FF_FLOORSPRITE|0, 3, {NULL}, 0, 0, S_TUTORIALFLOWERF1}, // S_TUTORIALFLOWERF16 + // GFZ flowers {SPR_FWR1, FF_ANIMATE, -1, {NULL}, 7, 3, S_NULL}, // S_GFZFLOWERA {SPR_FWR2, FF_ANIMATE, -1, {NULL}, 19, 3, S_NULL}, // S_GFZFLOWERB @@ -9979,6 +10033,114 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, + { // MT_TUTORIALPLANT + 799, // doomednum + S_NULL, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 0, // speed + 32*FRACUNIT, // radius + 32*FRACUNIT, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY, // flags + S_NULL // raisestate + }, + + { // MT_TUTORIALLEAF + -1, // doomednum + S_TUTORIALLEAF1, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 0, // speed + 32*FRACUNIT, // radius + 32*FRACUNIT, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY, // flags + S_NULL // raisestate + }, + + { // MT_TUTORIALFLOWER + -1, // doomednum + S_TUTORIALFLOWER1, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 0, // speed + 32*FRACUNIT, // radius + 32*FRACUNIT, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY, // flags + S_NULL // raisestate + }, + + { // MT_TUTORIALFLOWERF + -1, // doomednum + S_TUTORIALFLOWERF1, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 0, // speed + 32*FRACUNIT, // radius + 32*FRACUNIT, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY, // flags + S_NULL // raisestate + }, + { // MT_GFZFLOWER1 800, // doomednum S_GFZFLOWERA, // spawnstate diff --git a/src/info.h b/src/info.h index a0e141606..9b67e29cd 100644 --- a/src/info.h +++ b/src/info.h @@ -741,6 +741,10 @@ typedef enum sprite // The letter SPR_LETR, + // Tutorial scenery + SPR_TUPL, + SPR_TUPF, + // Greenflower Scenery SPR_FWR1, SPR_FWR2, // GFZ Sunflower @@ -2555,6 +2559,56 @@ typedef enum state // The letter S_LETTER, + // Tutorial scenery + S_TUTORIALLEAF1, + S_TUTORIALLEAF2, + S_TUTORIALLEAF3, + S_TUTORIALLEAF4, + S_TUTORIALLEAF5, + S_TUTORIALLEAF6, + S_TUTORIALLEAF7, + S_TUTORIALLEAF8, + S_TUTORIALLEAF9, + S_TUTORIALLEAF10, + S_TUTORIALLEAF11, + S_TUTORIALLEAF12, + S_TUTORIALLEAF13, + S_TUTORIALLEAF14, + S_TUTORIALLEAF15, + S_TUTORIALLEAF16, + S_TUTORIALFLOWER1, + S_TUTORIALFLOWER2, + S_TUTORIALFLOWER3, + S_TUTORIALFLOWER4, + S_TUTORIALFLOWER5, + S_TUTORIALFLOWER6, + S_TUTORIALFLOWER7, + S_TUTORIALFLOWER8, + S_TUTORIALFLOWER9, + S_TUTORIALFLOWER10, + S_TUTORIALFLOWER11, + S_TUTORIALFLOWER12, + S_TUTORIALFLOWER13, + S_TUTORIALFLOWER14, + S_TUTORIALFLOWER15, + S_TUTORIALFLOWER16, + S_TUTORIALFLOWERF1, + S_TUTORIALFLOWERF2, + S_TUTORIALFLOWERF3, + S_TUTORIALFLOWERF4, + S_TUTORIALFLOWERF5, + S_TUTORIALFLOWERF6, + S_TUTORIALFLOWERF7, + S_TUTORIALFLOWERF8, + S_TUTORIALFLOWERF9, + S_TUTORIALFLOWERF10, + S_TUTORIALFLOWERF11, + S_TUTORIALFLOWERF12, + S_TUTORIALFLOWERF13, + S_TUTORIALFLOWERF14, + S_TUTORIALFLOWERF15, + S_TUTORIALFLOWERF16, + // GFZ flowers S_GFZFLOWERA, S_GFZFLOWERB, @@ -4587,6 +4641,12 @@ typedef enum mobj_type // The letter MT_LETTER, + // Tutorial Scenery + MT_TUTORIALPLANT, + MT_TUTORIALLEAF, + MT_TUTORIALFLOWER, + MT_TUTORIALFLOWERF, + // Greenflower Scenery MT_GFZFLOWER1, MT_GFZFLOWER2, diff --git a/src/p_mobj.c b/src/p_mobj.c index 87e20fd4a..25e78d67b 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -7978,6 +7978,9 @@ static void P_MobjSceneryThink(mobj_t *mobj) P_SetScale(mobj, mobj->target->scale); } break; + case MT_TUTORIALFLOWER: + mobj->angle += FixedAngle(3*FRACUNIT); + break; case MT_VWREF: case MT_VWREB: { @@ -12827,6 +12830,25 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean P_SpawnMobjFromMobj(mobj, -FRACUNIT, 0, 0, MT_THZTREEBRANCH)->angle = mobjangle + ANGLE_270; } break; + case MT_TUTORIALPLANT: + { + INT32 i; + mobj_t *segment; + for (i = 0; i < 6; i++) + { + segment = P_SpawnMobjFromMobj(mobj, 0, 0, 0, MT_TUTORIALLEAF); + segment->angle = mobj->angle + FixedAngle(i*60*FRACUNIT); + P_SetMobjState(segment, S_TUTORIALLEAF1 + mthing->extrainfo); + } + for (i = 0; i < 3; i++) + { + segment = P_SpawnMobjFromMobj(mobj, 0, 0, 112*FRACUNIT, MT_TUTORIALFLOWER); + segment->angle = mobj->angle + FixedAngle(i*120*FRACUNIT); + P_SetMobjState(segment, S_TUTORIALFLOWER1 + mthing->extrainfo); + } + P_SetMobjState(P_SpawnMobjFromMobj(mobj, 0, 0, 112*FRACUNIT, MT_TUTORIALFLOWERF), S_TUTORIALFLOWERF1 + mthing->extrainfo); + } + break; case MT_CEZPOLE1: case MT_CEZPOLE2: { // Spawn the banner From cdef5a679b2ddb3cb86344a496932a6d3f2f76b7 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 23 Jan 2022 20:39:17 +0100 Subject: [PATCH 46/98] disable develop --- src/doomdef.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doomdef.h b/src/doomdef.h index a5ee79cd3..7e7e35599 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -124,7 +124,7 @@ extern char logfilename[1024]; /* A mod name to further distinguish versions. */ #define SRB2APPLICATION "SRB2" -#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3 +//#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3 #ifdef DEVELOP #define VERSIONSTRING "Development EXE" #define VERSIONSTRING_RC "Development EXE" "\0" @@ -150,7 +150,7 @@ extern char logfilename[1024]; // Does this version require an added patch file? // Comment or uncomment this as necessary. -//#define USE_PATCH_DTA +#define USE_PATCH_DTA // Enforce a limit of loaded WAD files. //#define ENFORCE_WAD_LIMIT From c705067173d02ebd9215ebc87b1a449f0a8eabae Mon Sep 17 00:00:00 2001 From: spherallic Date: Mon, 24 Jan 2022 13:50:14 +0100 Subject: [PATCH 47/98] Update ZB configuration for the tutorial plant. --- extras/conf/SRB2-22.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extras/conf/SRB2-22.cfg b/extras/conf/SRB2-22.cfg index f9595e868..02b20081a 100644 --- a/extras/conf/SRB2-22.cfg +++ b/extras/conf/SRB2-22.cfg @@ -6889,8 +6889,9 @@ thingtypes { title = "Tutorial Plant"; sprite = "TUPFH0"; - width = 32; + width = 40; height = 144; + parametertext = "Start frame"; } flickies From ba04b045e68252cec7b87a788ec253631a6aae27 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Tue, 25 Jan 2022 04:53:09 +0200 Subject: [PATCH 48/98] Fix portals - Resetting portalcullsector fixes the major visual glitches - Using 32 bits for nummasks and i fixes crashes when rendering lots of portals --- src/r_main.c | 3 +-- src/r_portal.c | 1 + src/r_things.c | 4 ++-- src/r_things.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/r_main.c b/src/r_main.c index 8729b5dcb..e25d257c6 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1450,7 +1450,7 @@ static void Mask_Post (maskcount_t* m) void R_RenderPlayerView(player_t *player) { - UINT8 nummasks = 1; + INT32 nummasks = 1; maskcount_t* masks = malloc(sizeof(maskcount_t)); if (cv_homremoval.value && player == &players[displayplayer]) // if this is display player 1 @@ -1515,7 +1515,6 @@ void R_RenderPlayerView(player_t *player) R_ClipSprites(drawsegs, NULL); PS_STOP_TIMING(ps_sw_spritecliptime); - // Add skybox portals caused by sky visplanes. if (cv_skybox.value && skyboxmo[0]) Portal_AddSkyboxPortals(); diff --git a/src/r_portal.c b/src/r_portal.c index 3026f4e4c..cba98db05 100644 --- a/src/r_portal.c +++ b/src/r_portal.c @@ -132,6 +132,7 @@ static portal_t* Portal_Add (const INT16 x1, const INT16 x2) void Portal_Remove (portal_t* portal) { + portalcullsector = NULL; portal_base = portal->next; Z_Free(portal->ceilingclip); Z_Free(portal->floorclip); diff --git a/src/r_things.c b/src/r_things.c index accd1e2b3..520f42688 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -3168,10 +3168,10 @@ static void R_DrawMaskedList (drawnode_t* head) } } -void R_DrawMasked(maskcount_t* masks, UINT8 nummasks) +void R_DrawMasked(maskcount_t* masks, INT32 nummasks) { drawnode_t *heads; /**< Drawnode lists; as many as number of views/portals. */ - SINT8 i; + INT32 i; heads = calloc(nummasks, sizeof(drawnode_t)); diff --git a/src/r_things.h b/src/r_things.h index b1ff32b1e..b4676fbbd 100644 --- a/src/r_things.h +++ b/src/r_things.h @@ -100,7 +100,7 @@ typedef struct sector_t* viewsector; } maskcount_t; -void R_DrawMasked(maskcount_t* masks, UINT8 nummasks); +void R_DrawMasked(maskcount_t* masks, INT32 nummasks); // ---------- // VISSPRITES From 89843d0eca6588dd37cbdf1aa42b1476ee4c47ae Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Tue, 25 Jan 2022 05:01:23 +0200 Subject: [PATCH 49/98] did not mean to remove this line --- src/r_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/r_main.c b/src/r_main.c index e25d257c6..0d6a74a3b 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1515,6 +1515,7 @@ void R_RenderPlayerView(player_t *player) R_ClipSprites(drawsegs, NULL); PS_STOP_TIMING(ps_sw_spritecliptime); + // Add skybox portals caused by sky visplanes. if (cv_skybox.value && skyboxmo[0]) Portal_AddSkyboxPortals(); From 432f691852e256d00487a4cea32c308d2b365a96 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 14 Dec 2021 23:19:45 -0800 Subject: [PATCH 50/98] Free unused texture lumps in R_LoadTextures PU_CACHE never gets freed automatically and Z_Unlock does NOTHING. --- src/r_textures.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_textures.c b/src/r_textures.c index 793e5237f..86e8ae43c 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -814,7 +814,7 @@ Rloadflats (INT32 i, INT32 w) patch->lump = texstart + j; patch->flip = 0; - Z_Unlock(flatlump); + Z_Free(flatlump); texturewidth[i] = texture->width; textureheight[i] = texture->height << FRACBITS; @@ -915,7 +915,7 @@ Rloadtextures (INT32 i, INT32 w) patch->lump = texstart + j; patch->flip = 0; - Z_Unlock(patchlump); + Z_Free(patchlump); texturewidth[i] = texture->width; textureheight[i] = texture->height << FRACBITS; From 571e4753948b6297b55238962dd8bea6b5e5be62 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 15 Dec 2021 14:02:56 -0800 Subject: [PATCH 51/98] Read only header bytes when creating textures list R_LoadTextures was reading in the entirety of every texture lump, now it only reads the 8 byte PNG header. This saved more than 1 second for me (1.68 s -> 0.24 s). PNG still need to be read in entirely to check their dimensions; I didn't bother looking into optimizing it since we don't have many PNG textures right now. --- src/r_picformats.h | 1 + src/r_textures.c | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/r_picformats.h b/src/r_picformats.h index c74f8a13a..73010e092 100644 --- a/src/r_picformats.h +++ b/src/r_picformats.h @@ -105,6 +105,7 @@ typedef struct } spriteinfo_t; // Portable Network Graphics +#define PNG_HEADER_SIZE (8) boolean Picture_IsLumpPNG(const UINT8 *d, size_t s); #define Picture_ThrowPNGError(lumpname, wadfilename) I_Error("W_Wad: Lump \"%s\" in file \"%s\" is a .png - please convert to either Doom or Flat (raw) image format.", lumpname, wadfilename); // Fears Of LJ Sonic diff --git a/src/r_textures.c b/src/r_textures.c index 86e8ae43c..117192526 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -725,6 +725,7 @@ Rloadflats (INT32 i, INT32 w) UINT16 texstart, texend; texture_t *texture; texpatch_t *patch; + UINT8 header[PNG_HEADER_SIZE]; // Yes if (W_FileHasFolders(wadfiles[w])) @@ -743,7 +744,6 @@ Rloadflats (INT32 i, INT32 w) // Work through each lump between the markers in the WAD. for (j = 0; j < (texend - texstart); j++) { - UINT8 *flatlump; UINT16 wadnum = (UINT16)w; lumpnum_t lumpnum = texstart + j; size_t lumplength; @@ -755,7 +755,7 @@ Rloadflats (INT32 i, INT32 w) continue; // If it is then SKIP IT } - flatlump = W_CacheLumpNumPwad(wadnum, lumpnum, PU_CACHE); + W_ReadLumpHeaderPwad(wadnum, lumpnum, header, sizeof header, 0); lumplength = W_LumpLengthPwad(wadnum, lumpnum); switch (lumplength) @@ -790,12 +790,14 @@ Rloadflats (INT32 i, INT32 w) M_Memcpy(texture->name, W_CheckNameForNumPwad(wadnum, lumpnum), sizeof(texture->name)); #ifndef NO_PNG_LUMPS - if (Picture_IsLumpPNG((UINT8 *)flatlump, lumplength)) + if (Picture_IsLumpPNG(header, lumplength)) { + UINT8 *flatlump = W_CacheLumpNumPwad(wadnum, lumpnum, PU_CACHE); INT32 width, height; Picture_PNGDimensions((UINT8 *)flatlump, &width, &height, NULL, NULL, lumplength); texture->width = (INT16)width; texture->height = (INT16)height; + Z_Free(flatlump); } else #endif @@ -814,8 +816,6 @@ Rloadflats (INT32 i, INT32 w) patch->lump = texstart + j; patch->flip = 0; - Z_Free(flatlump); - texturewidth[i] = texture->width; textureheight[i] = texture->height << FRACBITS; i++; @@ -835,8 +835,8 @@ Rloadtextures (INT32 i, INT32 w) UINT16 j; UINT16 texstart, texend, texturesLumpPos; texture_t *texture; - softwarepatch_t *patchlump; texpatch_t *patch; + softwarepatch_t patchlump; // Get the lump numbers for the markers in the WAD, if they exist. if (W_FileHasFolders(wadfiles[w])) @@ -876,7 +876,7 @@ Rloadtextures (INT32 i, INT32 w) continue; // If it is then SKIP IT } - patchlump = W_CacheLumpNumPwad(wadnum, lumpnum, PU_CACHE); + W_ReadLumpHeaderPwad(wadnum, lumpnum, &patchlump, PNG_HEADER_SIZE, 0); #ifndef NO_PNG_LUMPS lumplength = W_LumpLengthPwad(wadnum, lumpnum); #endif @@ -888,18 +888,20 @@ Rloadtextures (INT32 i, INT32 w) M_Memcpy(texture->name, W_CheckNameForNumPwad(wadnum, lumpnum), sizeof(texture->name)); #ifndef NO_PNG_LUMPS - if (Picture_IsLumpPNG((UINT8 *)patchlump, lumplength)) + if (Picture_IsLumpPNG((UINT8 *)&patchlump, lumplength)) { + UINT8 *png = W_CacheLumpNumPwad(wadnum, lumpnum, PU_CACHE); INT32 width, height; - Picture_PNGDimensions((UINT8 *)patchlump, &width, &height, NULL, NULL, lumplength); + Picture_PNGDimensions(png, &width, &height, NULL, NULL, lumplength); texture->width = (INT16)width; texture->height = (INT16)height; + Z_Free(png); } else #endif { - texture->width = SHORT(patchlump->width); - texture->height = SHORT(patchlump->height); + texture->width = SHORT(patchlump.width); + texture->height = SHORT(patchlump.height); } texture->type = TEXTURETYPE_SINGLEPATCH; @@ -915,8 +917,6 @@ Rloadtextures (INT32 i, INT32 w) patch->lump = texstart + j; patch->flip = 0; - Z_Free(patchlump); - texturewidth[i] = texture->width; textureheight[i] = texture->height << FRACBITS; i++; From 2ebec5356187a17e01fe06e5c7c026ffd0c4c4bc Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 16 Dec 2021 18:34:51 -0800 Subject: [PATCH 52/98] P_AddWadFile: only load textures in current file --- src/p_setup.c | 2 +- src/r_textures.c | 229 +++++++++++++++++++++++++++-------------------- src/r_textures.h | 1 + 3 files changed, 133 insertions(+), 99 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index 4f21922a0..5d70daeec 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -4722,7 +4722,7 @@ static boolean P_LoadAddon(UINT16 wadnum, UINT16 numlumps) // Reload it all anyway, just in case they // added some textures but didn't insert a // TEXTURES/etc. list. - R_LoadTextures(); // numtexture changes + R_LoadTexturesPwad(wadnum); // numtexture changes // Reload ANIMDEFS P_InitPicAnims(); diff --git a/src/r_textures.c b/src/r_textures.c index 117192526..a53c2e738 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -926,27 +926,53 @@ Rloadtextures (INT32 i, INT32 w) return i; } -// -// R_LoadTextures -// Initializes the texture list with the textures from the world map. -// -void R_LoadTextures(void) +static INT32 +count_range +( const char * marker_start, + const char * marker_end, + const char * folder, + UINT16 wadnum) { - INT32 i, w; UINT16 j; - UINT16 texstart, texend, texturesLumpPos; + UINT16 texstart, texend; + INT32 count = 0; - // Free previous memory before numtextures change. - if (numtextures) + // Count flats + if (W_FileHasFolders(wadfiles[wadnum])) { - for (i = 0; i < numtextures; i++) - { - Z_Free(textures[i]); - Z_Free(texturecache[i]); - } - Z_Free(texturetranslation); - Z_Free(textures); + texstart = W_CheckNumForFolderStartPK3(folder, wadnum, 0); + texend = W_CheckNumForFolderEndPK3(folder, wadnum, texstart); } + else + { + texstart = W_CheckNumForMarkerStartPwad(marker_start, wadnum, 0); + texend = W_CheckNumForNamePwad(marker_end, wadnum, texstart); + } + + if (texstart != INT16_MAX && texend != INT16_MAX) + { + // PK3s have subfolders, so we can't just make a simple sum + if (W_FileHasFolders(wadfiles[wadnum])) + { + for (j = texstart; j < texend; j++) + { + if (!W_IsLumpFolder(wadnum, j)) // Check if lump is a folder; if not, then count it + count++; + } + } + else // Add all the textures between markers + { + count += (texend - texstart); + } + } + + return count; +} + +static INT32 R_CountTextures(UINT16 wadnum) +{ + UINT16 texturesLumpPos; + INT32 count = 0; // Load patches and textures. @@ -955,106 +981,76 @@ void R_LoadTextures(void) // the markers. // This system will allocate memory for all duplicate/patched textures even if it never uses them, // but the alternative is to spend a ton of time checking and re-checking all previous entries just to skip any potentially patched textures. - for (w = 0, numtextures = 0; w < numwadfiles; w++) - { + #ifdef WALLFLATS - // Count flats - if (W_FileHasFolders(wadfiles[w])) - { - texstart = W_CheckNumForFolderStartPK3("flats/", (UINT16)w, 0); - texend = W_CheckNumForFolderEndPK3("flats/", (UINT16)w, texstart); - } - else - { - texstart = W_CheckNumForMarkerStartPwad("F_START", (UINT16)w, 0); - texend = W_CheckNumForNamePwad("F_END", (UINT16)w, texstart); - } + count += count_range("F_START", "F_END", "flats/", wadnum); +#endif - if (!( texstart == INT16_MAX || texend == INT16_MAX )) - { - // PK3s have subfolders, so we can't just make a simple sum - if (W_FileHasFolders(wadfiles[w])) - { - for (j = texstart; j < texend; j++) - { - if (!W_IsLumpFolder((UINT16)w, j)) // Check if lump is a folder; if not, then count it - numtextures++; - } - } - else // Add all the textures between F_START and F_END - { - numtextures += (UINT32)(texend - texstart); - } - } -#endif/*WALLFLATS*/ + // Count the textures from TEXTURES lumps + texturesLumpPos = W_CheckNumForNamePwad("TEXTURES", wadnum, 0); - // Count the textures from TEXTURES lumps - texturesLumpPos = W_CheckNumForNamePwad("TEXTURES", (UINT16)w, 0); - while (texturesLumpPos != INT16_MAX) - { - numtextures += R_CountTexturesInTEXTURESLump((UINT16)w, (UINT16)texturesLumpPos); - texturesLumpPos = W_CheckNumForNamePwad("TEXTURES", (UINT16)w, texturesLumpPos + 1); - } - - // Count single-patch textures - if (W_FileHasFolders(wadfiles[w])) - { - texstart = W_CheckNumForFolderStartPK3("textures/", (UINT16)w, 0); - texend = W_CheckNumForFolderEndPK3("textures/", (UINT16)w, texstart); - } - else - { - texstart = W_CheckNumForMarkerStartPwad(TX_START, (UINT16)w, 0); - texend = W_CheckNumForNamePwad(TX_END, (UINT16)w, 0); - } - - if (texstart == INT16_MAX || texend == INT16_MAX) - continue; - - // PK3s have subfolders, so we can't just make a simple sum - if (W_FileHasFolders(wadfiles[w])) - { - for (j = texstart; j < texend; j++) - { - if (!W_IsLumpFolder((UINT16)w, j)) // Check if lump is a folder; if not, then count it - numtextures++; - } - } - else // Add all the textures between TX_START and TX_END - { - numtextures += (UINT32)(texend - texstart); - } + while (texturesLumpPos != INT16_MAX) + { + count += R_CountTexturesInTEXTURESLump(wadnum, texturesLumpPos); + texturesLumpPos = W_CheckNumForNamePwad("TEXTURES", wadnum, texturesLumpPos + 1); } - // If no textures found by this point, bomb out - if (!numtextures) - I_Error("No textures detected in any WADs!\n"); + // Count single-patch textures + count += count_range(TX_START, TX_END, "textures/", wadnum); + + return count; +} + +static void +recallocuser +( void * user, + size_t old, + size_t new) +{ + char *p = Z_Realloc(*(void**)user, + new, PU_STATIC, user); + + if (new > old) + memset(&p[old], 0, (new - old)); +} + +static void R_AllocateTextures(INT32 add) +{ + const INT32 newtextures = (numtextures + add); + const size_t newsize = newtextures * sizeof (void*); + const size_t oldsize = numtextures * sizeof (void*); + + INT32 i; // Allocate memory and initialize to 0 for all the textures we are initialising. - // There are actually 5 buffers allocated in one for convenience. - textures = Z_Calloc((numtextures * sizeof(void *)) * 5, PU_STATIC, NULL); + recallocuser(&textures, oldsize, newsize); // Allocate texture column offset table. - texturecolumnofs = (void *)((UINT8 *)textures + (numtextures * sizeof(void *))); + recallocuser(&texturecolumnofs, oldsize, newsize); // Allocate texture referencing cache. - texturecache = (void *)((UINT8 *)textures + ((numtextures * sizeof(void *)) * 2)); + recallocuser(&texturecache, oldsize, newsize); // Allocate texture width table. - texturewidth = (void *)((UINT8 *)textures + ((numtextures * sizeof(void *)) * 3)); + recallocuser(&texturewidth, oldsize, newsize); // Allocate texture height table. - textureheight = (void *)((UINT8 *)textures + ((numtextures * sizeof(void *)) * 4)); + recallocuser(&textureheight, oldsize, newsize); // Create translation table for global animation. - texturetranslation = Z_Malloc((numtextures + 1) * sizeof(*texturetranslation), PU_STATIC, NULL); + Z_Realloc(texturetranslation, (newtextures + 1) * sizeof(*texturetranslation), PU_STATIC, &texturetranslation); - for (i = 0; i < numtextures; i++) + for (i = numtextures; i < newtextures; ++i) texturetranslation[i] = i; +} - for (i = 0, w = 0; w < numwadfiles; w++) - { +static INT32 R_DefineTextures(INT32 i, UINT16 w) +{ #ifdef WALLFLATS - i = Rloadflats(i, w); + i = Rloadflats(i, w); #endif - i = Rloadtextures(i, w); - } + return Rloadtextures(i, w); +} + +static void R_FinishLoadingTextures(INT32 add) +{ + numtextures += add; #ifdef HWRENDER if (rendermode == render_opengl) @@ -1062,6 +1058,43 @@ void R_LoadTextures(void) #endif } +// +// R_LoadTextures +// Initializes the texture list with the textures from the world map. +// +void R_LoadTextures(void) +{ + INT32 i, w; + INT32 newtextures = 0; + + for (w = 0; w < numwadfiles; w++) + { + newtextures += R_CountTextures((UINT16)w); + } + + // If no textures found by this point, bomb out + if (!newtextures) + I_Error("No textures detected in any WADs!\n"); + + R_AllocateTextures(newtextures); + + for (i = 0, w = 0; w < numwadfiles; w++) + { + i = R_DefineTextures(i, w); + } + + R_FinishLoadingTextures(newtextures); +} + +void R_LoadTexturesPwad(UINT16 wadnum) +{ + INT32 newtextures = R_CountTextures(wadnum); + + R_AllocateTextures(newtextures); + R_DefineTextures(numtextures, wadnum); + R_FinishLoadingTextures(newtextures); +} + static texpatch_t *R_ParsePatch(boolean actuallyLoadPatch) { char *texturesToken; diff --git a/src/r_textures.h b/src/r_textures.h index dd286b6ac..95796d89c 100644 --- a/src/r_textures.h +++ b/src/r_textures.h @@ -76,6 +76,7 @@ extern UINT8 **texturecache; // graphics data for each generated full-size textu // Load TEXTURES definitions, create lookup tables void R_LoadTextures(void); +void R_LoadTexturesPwad(UINT16 wadnum); void R_FlushTextureCache(void); // Texture generation From 2aec4501eb4c742ba7830c2cce16bd64db7ac55d Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 16 Dec 2021 22:10:36 -0800 Subject: [PATCH 53/98] Hash name lookup for textures and lumps --- src/doomdef.h | 16 ++++++++++++++++ src/r_textures.c | 12 ++++++++++-- src/r_textures.h | 1 + src/w_wad.c | 19 ++++++++++++++++--- src/w_wad.h | 1 + 5 files changed, 44 insertions(+), 5 deletions(-) diff --git a/src/doomdef.h b/src/doomdef.h index 7e7e35599..e1a7a247a 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -530,6 +530,22 @@ extern boolean capslock; // i_system.c, replace getchar() once the keyboard has been appropriated INT32 I_GetKey(void); +/* http://www.cse.yorku.ca/~oz/hash.html */ +static inline +UINT32 quickncasehash (const char *p, size_t n) +{ + size_t i = 0; + UINT32 x = 5381; + + while (i < n && p[i]) + { + x = (x * 33) ^ tolower(p[i]); + i++; + } + + return x; +} + #ifndef min // Double-Check with WATTCP-32's cdefs.h #define min(x, y) (((x) < (y)) ? (x) : (y)) #endif diff --git a/src/r_textures.c b/src/r_textures.c index a53c2e738..645a57b9b 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -59,6 +59,7 @@ INT32 *texturetranslation; // Painfully simple texture id cacheing to make maps load faster. :3 static struct { char name[9]; + UINT32 hash; INT32 id; } *tidcache = NULL; static INT32 tidcachelen = 0; @@ -788,6 +789,7 @@ Rloadflats (INT32 i, INT32 w) // Set texture properties. M_Memcpy(texture->name, W_CheckNameForNumPwad(wadnum, lumpnum), sizeof(texture->name)); + texture->hash = quickncasehash(texture->name, 8); #ifndef NO_PNG_LUMPS if (Picture_IsLumpPNG(header, lumplength)) @@ -886,6 +888,7 @@ Rloadtextures (INT32 i, INT32 w) // Set texture properties. M_Memcpy(texture->name, W_CheckNameForNumPwad(wadnum, lumpnum), sizeof(texture->name)); + texture->hash = quickncasehash(texture->name, 8); #ifndef NO_PNG_LUMPS if (Picture_IsLumpPNG((UINT8 *)&patchlump, lumplength)) @@ -1401,6 +1404,7 @@ static texture_t *R_ParseTexture(boolean actuallyLoadTexture) // Allocate memory for a zero-patch texture. Obviously, we'll be adding patches momentarily. resultTexture = (texture_t *)Z_Calloc(sizeof(texture_t),PU_STATIC,NULL); M_Memcpy(resultTexture->name, newTextureName, 8); + resultTexture->hash = quickncasehash(newTextureName, 8); resultTexture->width = newTextureWidth; resultTexture->height = newTextureHeight; resultTexture->type = TEXTURETYPE_COMPOSITE; @@ -1627,19 +1631,22 @@ void R_ClearTextureNumCache(boolean btell) INT32 R_CheckTextureNumForName(const char *name) { INT32 i; + UINT32 hash; // "NoTexture" marker. if (name[0] == '-') return 0; + hash = quickncasehash(name, 8); + for (i = 0; i < tidcachelen; i++) - if (!strncasecmp(tidcache[i].name, name, 8)) + if (tidcache[i].hash == hash && !strncasecmp(tidcache[i].name, name, 8)) return tidcache[i].id; // Need to parse the list backwards, so textures loaded more recently are used in lieu of ones loaded earlier //for (i = 0; i < numtextures; i++) <- old for (i = (numtextures - 1); i >= 0; i--) // <- new - if (!strncasecmp(textures[i]->name, name, 8)) + if (textures[i]->hash == hash && !strncasecmp(textures[i]->name, name, 8)) { tidcachelen++; Z_Realloc(tidcache, tidcachelen * sizeof(*tidcache), PU_STATIC, &tidcache); @@ -1648,6 +1655,7 @@ INT32 R_CheckTextureNumForName(const char *name) #ifndef ZDEBUG CONS_Debug(DBG_SETUP, "texture #%s: %s\n", sizeu1(tidcachelen), tidcache[tidcachelen-1].name); #endif + tidcache[tidcachelen-1].hash = hash; tidcache[tidcachelen-1].id = i; return i; } diff --git a/src/r_textures.h b/src/r_textures.h index 95796d89c..69b59426a 100644 --- a/src/r_textures.h +++ b/src/r_textures.h @@ -54,6 +54,7 @@ typedef struct { // Keep name for switch changing, etc. char name[8]; + UINT32 hash; UINT8 type; // TEXTURETYPE_ INT16 width, height; boolean holes; diff --git a/src/w_wad.c b/src/w_wad.c index e49e0ce82..9c631da65 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -361,6 +361,7 @@ static lumpinfo_t* ResGetLumpsStandalone (FILE* handle, UINT16* numlumps, const lumpinfo->size = ftell(handle); fseek(handle, 0, SEEK_SET); strcpy(lumpinfo->name, lumpname); + lumpinfo->hash = quickncasehash(lumpname, 8); // Allocate the lump's long name. lumpinfo->longname = Z_Malloc(9 * sizeof(char), PU_STATIC, NULL); @@ -459,6 +460,7 @@ static lumpinfo_t* ResGetLumpsWad (FILE* handle, UINT16* nlmp, const char* filen lump_p->compression = CM_NOCOMPRESSION; memset(lump_p->name, 0x00, 9); strncpy(lump_p->name, fileinfo->name, 8); + lump_p->hash = quickncasehash(lump_p->name, 8); // Allocate the lump's long name. lump_p->longname = Z_Malloc(9 * sizeof(char), PU_STATIC, NULL); @@ -634,6 +636,7 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp) memset(lump_p->name, '\0', 9); // Making sure they're initialized to 0. Is it necessary? strncpy(lump_p->name, trimname, min(8, dotpos - trimname)); + lump_p->hash = quickncasehash(lump_p->name, 8); lump_p->longname = Z_Calloc(dotpos - trimname + 1, PU_STATIC, NULL); strlcpy(lump_p->longname, trimname, dotpos - trimname + 1); @@ -1225,12 +1228,14 @@ UINT16 W_CheckNumForNamePwad(const char *name, UINT16 wad, UINT16 startlump) { UINT16 i; static char uname[8 + 1]; + UINT32 hash; if (!TestValidLump(wad,0)) return INT16_MAX; strlcpy(uname, name, sizeof uname); strupr(uname); + hash = quickncasehash(uname, 8); // // scan forward @@ -1241,7 +1246,7 @@ UINT16 W_CheckNumForNamePwad(const char *name, UINT16 wad, UINT16 startlump) { lumpinfo_t *lump_p = wadfiles[wad]->lumpinfo + startlump; for (i = startlump; i < wadfiles[wad]->numlumps; i++, lump_p++) - if (!strncmp(lump_p->name, uname, sizeof(uname) - 1)) + if (lump_p->hash == hash && !strncmp(lump_p->name, uname, sizeof(uname) - 1)) return i; } @@ -1444,15 +1449,20 @@ lumpnum_t W_CheckNumForLongName(const char *name) // TODO: Make it search through cache first, maybe...? lumpnum_t W_CheckNumForMap(const char *name) { + UINT32 hash = quickncasehash(name, 8); UINT16 lumpNum, end; UINT32 i; + lumpinfo_t *p; for (i = numwadfiles - 1; i < numwadfiles; i--) { if (wadfiles[i]->type == RET_WAD) { for (lumpNum = 0; lumpNum < wadfiles[i]->numlumps; lumpNum++) - if (!strncmp(name, (wadfiles[i]->lumpinfo + lumpNum)->name, 8)) + { + p = wadfiles[i]->lumpinfo + lumpNum; + if (p->hash == hash && !strncmp(name, p->name, 8)) return (i<<16) + lumpNum; + } } else if (W_FileHasFolders(wadfiles[i])) { @@ -1463,8 +1473,11 @@ lumpnum_t W_CheckNumForMap(const char *name) continue; // Now look for the specified map. for (; lumpNum < end; lumpNum++) - if (!strnicmp(name, (wadfiles[i]->lumpinfo + lumpNum)->name, 8)) + { + p = wadfiles[i]->lumpinfo + lumpNum; + if (p->hash == hash && !strnicmp(name, p->name, 8)) return (i<<16) + lumpNum; + } } } return LUMPERROR; diff --git a/src/w_wad.h b/src/w_wad.h index a41ba1724..9b8a66aa7 100644 --- a/src/w_wad.h +++ b/src/w_wad.h @@ -67,6 +67,7 @@ typedef struct unsigned long position; // filelump_t filepos unsigned long disksize; // filelump_t size char name[9]; // filelump_t name[] e.g. "LongEntr" + UINT32 hash; char *longname; // e.g. "LongEntryName" char *fullname; // e.g. "Folder/Subfolder/LongEntryName.extension" char *diskpath; // path to the file e.g. "/usr/games/srb2/Addon/Folder/Subfolder/LongEntryName.extension" From 37add34b9c729b21e624e22d64159073c9258e25 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 27 Jan 2022 00:28:36 -0800 Subject: [PATCH 54/98] Update texturecache user when reallocating --- src/r_textures.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/r_textures.c b/src/r_textures.c index 645a57b9b..3a7611365 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -1039,8 +1039,20 @@ static void R_AllocateTextures(INT32 add) // Create translation table for global animation. Z_Realloc(texturetranslation, (newtextures + 1) * sizeof(*texturetranslation), PU_STATIC, &texturetranslation); - for (i = numtextures; i < newtextures; ++i) + for (i = 0; i < numtextures; ++i) + { + // R_FlushTextureCache relies on the user for + // Z_Free, texturecache has been reallocated so the + // user is now garbage memory. + Z_SetUser(texturecache[i], + (void**)&texturecache[i]); + } + + while (i < newtextures) + { texturetranslation[i] = i; + i++; + } } static INT32 R_DefineTextures(INT32 i, UINT16 w) From 611054b6cd6d2cccb97adc2dae4b643fcaa1eb02 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Sat, 29 Jan 2022 02:24:52 +0200 Subject: [PATCH 55/98] Fix perfstats failing to compile with NOHW=1 --- src/m_perfstats.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/m_perfstats.c b/src/m_perfstats.c index 439a9da1c..b11e0e26a 100644 --- a/src/m_perfstats.c +++ b/src/m_perfstats.c @@ -228,10 +228,13 @@ static boolean PS_IsLevelActive(void) // Is the row valid in the current context? static boolean PS_IsRowValid(perfstatrow_t *row) { - return !((row->flags & PS_LEVEL && !PS_IsLevelActive()) || - (row->flags & PS_SW && rendermode != render_soft) || - (row->flags & PS_HW && rendermode != render_opengl) || - (row->flags & PS_BATCHING && !cv_glbatching.value)); + return !((row->flags & PS_LEVEL && !PS_IsLevelActive()) + || (row->flags & PS_SW && rendermode != render_soft) + || (row->flags & PS_HW && rendermode != render_opengl) +#ifdef HWRENDER + || (row->flags & PS_BATCHING && !cv_glbatching.value) +#endif + ); } // Should the row be visible on the screen? From 0a0c17da7c793ec29e80c5bdaa66b02da0884078 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 1 Feb 2022 02:27:27 -0800 Subject: [PATCH 56/98] PARANOIA: I_Error if mobj hook is called with MT_NULL --- src/lua_hooklib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index 287a185bc..d5f1cf25e 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -347,6 +347,10 @@ static boolean prepare_mobj_hook int hook_type, mobjtype_t mobj_type ){ +#ifdef PARANOIA + if (mobj_type == MT_NULL) + I_Error("MT_NULL has been passed to a mobj hook\n"); +#endif return init_hook_type(hook, default_status, hook_type, mobj_type, NULL, mobj_hook_available(hook_type, mobj_type)); From f6f002e70b645982dddd83d6f831a601faa0fdae Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 1 Feb 2022 02:42:33 -0800 Subject: [PATCH 57/98] A_LobShot: remove ??? MT_NULL spawning, not cool bro. --- src/p_enemy.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 3b1d0a7cd..9c226481e 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -2655,7 +2655,7 @@ void A_LobShot(mobj_t *actor) { INT32 locvar1 = var1; INT32 locvar2 = var2 >> 16; - mobj_t *shot, *hitspot; + mobj_t *shot; angle_t an; fixed_t z; fixed_t dist; @@ -2694,11 +2694,6 @@ void A_LobShot(mobj_t *actor) P_SetScale(shot, actor->scale); } - // Keep track of where it's going to land - hitspot = P_SpawnMobj(actor->target->x&(64*FRACUNIT-1), actor->target->y&(64*FRACUNIT-1), actor->target->subsector->sector->floorheight, MT_NULL); - hitspot->tics = airtime; - P_SetTarget(&shot->tracer, hitspot); - P_SetTarget(&shot->target, actor); // where it came from shot->angle = an = actor->angle; From 518de0ce104166c3eacd10ebe6ade422307ce671 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 1 Feb 2022 03:29:38 -0800 Subject: [PATCH 58/98] Add P_CheckMove Checks if P_TryMove would succeed without actually moving. --- src/deh_tables.c | 1 + src/info.c | 27 +++++++++++++++++++++++++++ src/info.h | 1 + src/p_local.h | 1 + src/p_map.c | 43 +++++++++++++++++++++++++++++++++++++------ 5 files changed, 67 insertions(+), 6 deletions(-) diff --git a/src/deh_tables.c b/src/deh_tables.c index cfc98f631..9db18be9b 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -3496,6 +3496,7 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi // because sadly no one remembers this place while searching for full state names. const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity testing later. "MT_NULL", + "MT_RAY", "MT_UNKNOWN", "MT_THOK", // Thok! mobj diff --git a/src/info.c b/src/info.c index 57899f4f1..eaea5110a 100644 --- a/src/info.c +++ b/src/info.c @@ -3964,6 +3964,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, + { // MT_RAY + -1, // doomednum + S_NULL, // spawnstate + 0, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 0, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 0, // speed + 0, // radius + 0, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags + S_NULL // raisestate + }, + { // MT_UNKNOWN -1, // doomednum S_UNKNOWN, // spawnstate diff --git a/src/info.h b/src/info.h index 031a08b43..9ceeead2c 100644 --- a/src/info.h +++ b/src/info.h @@ -4316,6 +4316,7 @@ extern playersprite_t free_spr2; typedef enum mobj_type { MT_NULL, + MT_RAY, // General purpose mobj MT_UNKNOWN, MT_THOK, // Thok! mobj diff --git a/src/p_local.h b/src/p_local.h index 28a77afe5..4fa244a05 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -410,6 +410,7 @@ void P_SetUnderlayPosition(mobj_t *thing); boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y); boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam); +boolean P_CheckMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff); boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff); boolean P_Move(mobj_t *actor, fixed_t speed); boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z); diff --git a/src/p_map.c b/src/p_map.c index 329224d0b..bd504ca17 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2654,17 +2654,17 @@ boolean PIT_PushableMoved(mobj_t *thing) return true; } -// -// P_TryMove -// Attempt to move to a new position. -// -boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) +static boolean +increment_move +( mobj_t * thing, + fixed_t x, + fixed_t y, + boolean allowdropoff) { fixed_t tryx = thing->x; fixed_t tryy = thing->y; fixed_t radius = thing->radius; fixed_t thingtop; - fixed_t startingonground = P_IsObjectOnGround(thing); floatok = false; if (radius < MAXRADIUS/2) @@ -2802,7 +2802,38 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) } } while (tryx != x || tryy != y); + return true; +} + +// +// P_CheckMove +// Check if a P_TryMove would be successful. +// +boolean P_CheckMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) +{ + boolean moveok; + mobj_t *hack = P_SpawnMobjFromMobj(thing, 0, 0, 0, MT_RAY); + + hack->radius = thing->radius; + hack->height = thing->height; + + moveok = increment_move(hack, x, y, allowdropoff); + P_RemoveMobj(hack); + + return moveok; +} + +// +// P_TryMove +// Attempt to move to a new position. +// +boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) +{ + fixed_t startingonground = P_IsObjectOnGround(thing); + // The move is ok! + if (!increment_move(thing, x, y, allowdropoff)) + return false; // If it's a pushable object, check if anything is // standing on top and move it, too. From 9dfa153e7497403d874e980868b7aa6d15595286 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 1 Feb 2022 03:40:26 -0800 Subject: [PATCH 59/98] Use P_CheckMove --- src/p_enemy.c | 15 +++++---------- src/p_user.c | 15 ++++----------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 9c226481e..94c030d0f 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -3333,10 +3333,8 @@ void A_SkullAttack(mobj_t *actor) UINT32 oldflags = mobjinfo[MT_NULL].flags; fixed_t oldradius = mobjinfo[MT_NULL].radius; fixed_t oldheight = mobjinfo[MT_NULL].height; - mobj_t *check; INT32 i, j; static INT32 k;/* static for (at least) GCC 9.1 weirdness */ - boolean allow; angle_t testang = 0; mobjinfo[MT_NULL].spawnstate = S_INVISIBLE; @@ -3355,15 +3353,12 @@ void A_SkullAttack(mobj_t *actor) j = 9; } -#define dostuff(q) check = P_SpawnMobjFromMobj(actor, 0, 0, 0, MT_NULL);\ +#define dostuff(q) \ testang = actor->angle + ((i+(q))*ANG10);\ - allow = (P_TryMove(check,\ - P_ReturnThrustX(check, testang, dist + 2*actor->radius),\ - P_ReturnThrustY(check, testang, dist + 2*actor->radius),\ - true));\ - P_RemoveMobj(check);\ - if (allow)\ - break; + if (P_CheckMove(actor,\ + P_ReturnThrustX(actor, testang, dist + 2*actor->radius),\ + P_ReturnThrustY(actor, testang, dist + 2*actor->radius),\ + true)) break; if (P_RandomChance(FRACUNIT/2)) // port priority 2? { diff --git a/src/p_user.c b/src/p_user.c index 83eb4ea02..e1998cdff 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -6281,18 +6281,11 @@ static void P_NightsTransferPoints(player_t *player, fixed_t xspeed, fixed_t rad if (player->exiting) return; + if (!P_CheckMove(player->mo, + player->mo->x + player->mo->momx, + player->mo->y + player->mo->momy, true)) { - boolean notallowed; - mobj_t *hack = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_NULL); - hack->flags = MF_NOGRAVITY; - hack->radius = player->mo->radius; - hack->height = player->mo->height; - hack->z = player->mo->z; - P_SetThingPosition(hack); - notallowed = (!(P_TryMove(hack, player->mo->x+player->mo->momx, player->mo->y+player->mo->momy, true))); - P_RemoveMobj(hack); - if (notallowed) - return; + return; } { From 6325185091d852aae5fecb35b20d4341bd0ebfaf Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 1 Feb 2022 03:51:01 -0800 Subject: [PATCH 60/98] Add P_SetPower; remove mobj hack from line 434 --- src/p_enemy.c | 8 +------- src/p_local.h | 1 + src/p_spec.c | 21 ++++++++------------- src/p_user.c | 18 ++++++++++++++++++ 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 94c030d0f..2e99436da 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -4179,7 +4179,6 @@ void A_CustomPower(mobj_t *actor) player_t *player; INT32 locvar1 = var1; INT32 locvar2 = var2; - boolean spawnshield = false; if (LUA_CallAction(A_CUSTOMPOWER, actor)) return; @@ -4198,15 +4197,10 @@ void A_CustomPower(mobj_t *actor) player = actor->target->player; - if (locvar1 == pw_shield && player->powers[pw_shield] != locvar2) - spawnshield = true; + P_SetPower(player, locvar1, locvar2); - player->powers[locvar1] = (UINT16)locvar2; if (actor->info->seesound) S_StartSound(player->mo, actor->info->seesound); - - if (spawnshield) //workaround for a bug - P_SpawnShieldOrb(player); } // Function: A_GiveWeapon diff --git a/src/p_local.h b/src/p_local.h index 4fa244a05..38c7f5d13 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -155,6 +155,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff); void P_SetObjectMomZ(mobj_t *mo, fixed_t value, boolean relative); void P_RestoreMusic(player_t *player); +void P_SetPower(player_t *player, powertype_t power, UINT16 value); void P_SpawnShieldOrb(player_t *player); void P_SwitchShield(player_t *player, UINT16 shieldtype); mobj_t *P_SpawnGhostMobj(mobj_t *mobj); diff --git a/src/p_spec.c b/src/p_spec.c index ebabe6a79..459ee80a9 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2888,25 +2888,20 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) case 434: // Custom Power if (mo && mo->player) { - mobj_t *dummy = P_SpawnMobj(mo->x, mo->y, mo->z, MT_NULL); - - var1 = sides[line->sidenum[0]].toptexture; //(line->dx>>FRACBITS)-1; + powertype_t power = sides[line->sidenum[0]].toptexture; //(line->dx>>FRACBITS)-1; + UINT16 value; if (line->sidenum[1] != 0xffff && line->flags & ML_BLOCKMONSTERS) // read power from back sidedef - var2 = sides[line->sidenum[1]].toptexture; + value = sides[line->sidenum[1]].toptexture; else if (line->flags & ML_NOCLIMB) // 'Infinite' - var2 = UINT16_MAX; + value = UINT16_MAX; else - var2 = sides[line->sidenum[0]].textureoffset>>FRACBITS; + value = sides[line->sidenum[0]].textureoffset>>FRACBITS; - P_SetTarget(&dummy->target, mo); - A_CustomPower(dummy); + P_SetPower(mo->player, power, value); - if (bot) { - P_SetTarget(&dummy->target, bot); - A_CustomPower(dummy); - } - P_RemoveMobj(dummy); + if (bot) + P_SetPower(bot->player, power, value); } break; diff --git a/src/p_user.c b/src/p_user.c index e1998cdff..a81d90905 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2011,6 +2011,24 @@ void P_SwitchShield(player_t *player, UINT16 shieldtype) } } +// +// P_SetPower +// +// Sets a power and spawns a shield orb if required. +// +void P_SetPower(player_t *player, powertype_t power, UINT16 value) +{ + boolean spawnshield = false; + + if (power == pw_shield && player->powers[pw_shield] != value) + spawnshield = true; + + player->powers[power] = value; + + if (spawnshield) //workaround for a bug + P_SpawnShieldOrb(player); +} + // // P_SpawnGhostMobj // From a8c658b545e3c7709212a43489163f33ffbe91f0 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 1 Feb 2022 04:04:53 -0800 Subject: [PATCH 61/98] Never spawn MT_NULL --- src/p_mobj.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 87e20fd4a..ca5c03ed0 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10481,7 +10481,17 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) const mobjinfo_t *info = &mobjinfo[type]; SINT8 sc = -1; state_t *st; - mobj_t *mobj = Z_Calloc(sizeof (*mobj), PU_LEVEL, NULL); + mobj_t *mobj; + + if (type == MT_NULL) + { +#ifdef PARANOIA + I_Error("Tried to spawn MT_NULL\n"); +#endif + return NULL; + } + + mobj = Z_Calloc(sizeof (*mobj), PU_LEVEL, NULL); // this is officially a mobj, declared as soon as possible. mobj->thinker.function.acp1 = (actionf_p1)P_MobjThinker; From e301327dee6339ff89d089c5633f171f066c6717 Mon Sep 17 00:00:00 2001 From: spherallic Date: Wed, 2 Feb 2022 12:15:14 +0100 Subject: [PATCH 62/98] Avoid using old explosion states for Jetty-Syn/Skim mines. --- src/info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/info.c b/src/info.c index 57899f4f1..eed919b6c 100644 --- a/src/info.c +++ b/src/info.c @@ -9776,8 +9776,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_None, // painsound S_NULL, // meleestate S_NULL, // missilestate - S_MINE_BOOM1, // deathstate - S_MINE_BOOM1, // xdeathstate + S_XPLD1, // deathstate + S_XPLD1, // xdeathstate sfx_cybdth, // deathsound 0, // speed 8*FRACUNIT, // radius From 6e105a23f643c44e6986f5389e89b5a41476341e Mon Sep 17 00:00:00 2001 From: spherallic Date: Wed, 2 Feb 2022 14:43:22 +0100 Subject: [PATCH 63/98] Update Nightopian states for the new sprites & fix another bug --- src/deh_tables.c | 15 +++++++-------- src/info.c | 23 +++++++++++------------ src/info.h | 15 +++++++-------- 3 files changed, 25 insertions(+), 28 deletions(-) diff --git a/src/deh_tables.c b/src/deh_tables.c index cfc98f631..77b4b0f0f 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -3293,14 +3293,13 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi "S_NIGHTOPIANHELPER9", // Nightopian - "S_PIAN0", - "S_PIAN1", - "S_PIAN2", - "S_PIAN3", - "S_PIAN4", - "S_PIAN5", - "S_PIAN6", - "S_PIANSING", + "S_PIAN_LOOK1", + "S_PIAN_LOOK2", + "S_PIAN_LOOK3", + "S_PIAN_FLY1", + "S_PIAN_FLY2", + "S_PIAN_FLY3", + "S_PIAN_SING", // Shleep "S_SHLEEP1", diff --git a/src/info.c b/src/info.c index eed919b6c..a26cc2d86 100644 --- a/src/info.c +++ b/src/info.c @@ -3736,14 +3736,13 @@ state_t states[NUMSTATES] = {SPR_FL01, 3, 1, {A_OrbitNights}, ANG2*2, 180 | 0x10000, S_NIGHTOPIANHELPER1}, // S_NIGHTOPIANHELPER9 // Nightopian - {SPR_NTPN, 0, 4, {A_Look}, 0, 0, S_PIAN0}, // S_PIAN0 - {SPR_NTPN, 0, 4, {A_JetgThink}, 0, 0, S_PIAN2}, // S_PIAN1 - {SPR_NTPN, 1, 4, {NULL}, 0, 0, S_PIAN3}, // S_PIAN2 - {SPR_NTPN, 2, 4, {NULL}, 0, 0, S_PIAN4}, // S_PIAN3 - {SPR_NTPN, 3, 4, {NULL}, 0, 0, S_PIAN5}, // S_PIAN4 - {SPR_NTPN, 2, 4, {NULL}, 0, 0, S_PIAN6}, // S_PIAN5 - {SPR_NTPN, 1, 4, {NULL}, 0, 0, S_PIAN1}, // S_PIAN6 - {SPR_NTPN, 4|FF_ANIMATE, 24, {NULL}, 1, 4, S_PIAN1}, // S_PIANSING + {SPR_NTPN, 0, 2, {A_Look}, 1, 1, S_PIAN_LOOK2}, // S_PIAN_LOOK1 + {SPR_NTPN, 1, 2, {A_Look}, 1, 1, S_PIAN_LOOK3}, // S_PIAN_LOOK1 + {SPR_NTPN, 2, 2, {A_Look}, 1, 1, S_PIAN_LOOK1}, // S_PIAN_LOOK1 + {SPR_NTPN, 0, 2, {A_JetgThink}, 0, 0, S_PIAN_FLY2}, // S_PIAN_FLY1 + {SPR_NTPN, 1, 2, {NULL}, 0, 0, S_PIAN_FLY3}, // S_PIAN_FLY2 + {SPR_NTPN, 2, 2, {NULL}, 0, 0, S_PIAN_FLY1}, // S_PIAN_FLY3 + {SPR_NTPN, 3|FF_ANIMATE, 24, {NULL}, 2, 2, S_PIAN_FLY1}, // S_PIANSING // Shleep {SPR_SHLP, 0, 15, {NULL}, 0, 0, S_SHLEEP2}, // S_SHLEEP1 @@ -20119,9 +20118,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = { // MT_PIAN 1602, // doomednum - S_PIAN0, // spawnstate + S_PIAN_LOOK1, // spawnstate 1000, // spawnhealth - S_PIAN1, // seestate + S_PIAN_FLY1, // seestate sfx_None, // seesound 0, // reactiontime sfx_None, // attacksound @@ -20129,7 +20128,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 200, // painchance sfx_None, // painsound S_NULL, // meleestate - S_PIANSING, // missilestate + S_PIAN_SING, // missilestate S_NULL, // deathstate S_NULL, // xdeathstate sfx_None, // deathsound @@ -20140,7 +20139,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 16, // mass 0, // damage sfx_None, // activesound - MF_SLIDEME|MF_SPECIAL|MF_NOGRAVITY, // flags + MF_SLIDEME|MF_NOGRAVITY, // flags S_NULL // raisestate }, diff --git a/src/info.h b/src/info.h index 031a08b43..4f7c962bf 100644 --- a/src/info.h +++ b/src/info.h @@ -4093,14 +4093,13 @@ typedef enum state S_NIGHTOPIANHELPER9, // Nightopian - S_PIAN0, - S_PIAN1, - S_PIAN2, - S_PIAN3, - S_PIAN4, - S_PIAN5, - S_PIAN6, - S_PIANSING, + S_PIAN_LOOK1, + S_PIAN_LOOK2, + S_PIAN_LOOK3, + S_PIAN_FLY1, + S_PIAN_FLY2, + S_PIAN_FLY3, + S_PIAN_SING, // Shleep S_SHLEEP1, From e64775c8670b5d6e541027400e4ea744cac0698e Mon Sep 17 00:00:00 2001 From: spherallic Date: Wed, 2 Feb 2022 23:16:12 +0100 Subject: [PATCH 64/98] Check V_ThinStringWidth instead of strlen for level platter names. --- src/m_menu.c | 20 +++++++++++--------- src/m_menu.h | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 3c1d8d7ca..367ee1590 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -5408,11 +5408,13 @@ static boolean M_PrepareLevelPlatter(INT32 gt, boolean nextmappick) if (actnum) sprintf(mapname, "%s %d", mapheaderinfo[headingIterate]->lvlttl, actnum); + else if (V_ThinStringWidth(mapheaderinfo[headingIterate]->lvlttl, 0) <= 80) + strlcpy(mapname, mapheaderinfo[headingIterate]->lvlttl, 22); else - strcpy(mapname, mapheaderinfo[headingIterate]->lvlttl); - - if (strlen(mapname) >= 17) - strcpy(mapname+17-3, "..."); + { + strlcpy(mapname, mapheaderinfo[headingIterate]->lvlttl, 15); + strcat(mapname, "..."); + } strcpy(levelselect.rows[row].mapnames[col], (const char *)mapname); } @@ -5747,7 +5749,7 @@ static void M_DrawLevelPlatterMap(UINT8 row, UINT8 col, INT32 x, INT32 y, boolea ? 159 : 63)); if (strlen(levelselect.rows[row].mapnames[col]) > 6) // "AERIAL GARDEN" vs "ACT 18" - "THE ACT" intentionally compressed - V_DrawThinString(x, y+50, (highlight ? V_YELLOWMAP : 0), levelselect.rows[row].mapnames[col]); + V_DrawThinString(x, y+50+1, (highlight ? V_YELLOWMAP : 0), levelselect.rows[row].mapnames[col]); else V_DrawString(x, y+50, (highlight ? V_YELLOWMAP : 0), levelselect.rows[row].mapnames[col]); } @@ -8748,12 +8750,12 @@ static void M_ReadSavegameInfo(UINT32 slot) if(!mapheaderinfo[(fake-1) & 8191]) savegameinfo[slot].levelname[0] = '\0'; + else if (V_ThinStringWidth(mapheaderinfo[(fake-1) & 8191]->lvlttl, 0) <= 78) + strlcpy(savegameinfo[slot].levelname, mapheaderinfo[(fake-1) & 8191]->lvlttl, 22); else { - strlcpy(savegameinfo[slot].levelname, mapheaderinfo[(fake-1) & 8191]->lvlttl, 17+1); - - if (strlen(mapheaderinfo[(fake-1) & 8191]->lvlttl) >= 17) - strcpy(savegameinfo[slot].levelname+17-3, "..."); + strlcpy(savegameinfo[slot].levelname, mapheaderinfo[(fake-1) & 8191]->lvlttl, 15); + strcat(savegameinfo[slot].levelname, "..."); } savegameinfo[slot].gamemap = fake; diff --git a/src/m_menu.h b/src/m_menu.h index ba9c326a0..e495f7f7c 100644 --- a/src/m_menu.h +++ b/src/m_menu.h @@ -389,9 +389,9 @@ typedef struct // level select platter typedef struct { - char header[22+5]; // mapheader_t lvltttl max length + " ZONE" + char header[22+5]; // mapheader_t lvlttl max length + " ZONE" INT32 maplist[3]; - char mapnames[3][17+1]; + char mapnames[3][22]; // lvlttl max length boolean mapavailable[4]; // mapavailable[3] == wide or not } levelselectrow_t; From 878b4dc5b6025e1deef775ccb72b8a871833598a Mon Sep 17 00:00:00 2001 From: spherallic Date: Fri, 4 Feb 2022 20:09:37 +0100 Subject: [PATCH 65/98] Don't read or set MT_NULL's properties in A_SkullAttack --- src/p_enemy.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 2e99436da..0a3edc8bb 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -3329,18 +3329,18 @@ void A_SkullAttack(mobj_t *actor) actor->angle += (P_RandomChance(FRACUNIT/2)) ? ANGLE_90 : -ANGLE_90; else if (locvar1 == 3) { - statenum_t oldspawnstate = mobjinfo[MT_NULL].spawnstate; - UINT32 oldflags = mobjinfo[MT_NULL].flags; - fixed_t oldradius = mobjinfo[MT_NULL].radius; - fixed_t oldheight = mobjinfo[MT_NULL].height; + statenum_t oldspawnstate = mobjinfo[MT_RAY].spawnstate; + UINT32 oldflags = mobjinfo[MT_RAY].flags; + fixed_t oldradius = mobjinfo[MT_RAY].radius; + fixed_t oldheight = mobjinfo[MT_RAY].height; INT32 i, j; static INT32 k;/* static for (at least) GCC 9.1 weirdness */ angle_t testang = 0; - mobjinfo[MT_NULL].spawnstate = S_INVISIBLE; - mobjinfo[MT_NULL].flags = MF_NOGRAVITY|MF_NOTHINK|MF_NOCLIPTHING|MF_NOBLOCKMAP; - mobjinfo[MT_NULL].radius = mobjinfo[actor->type].radius; - mobjinfo[MT_NULL].height = mobjinfo[actor->type].height; + mobjinfo[MT_RAY].spawnstate = S_INVISIBLE; + mobjinfo[MT_RAY].flags = MF_NOGRAVITY|MF_NOTHINK|MF_NOCLIPTHING|MF_NOBLOCKMAP; + mobjinfo[MT_RAY].radius = mobjinfo[actor->type].radius; + mobjinfo[MT_RAY].height = mobjinfo[actor->type].height; if (P_RandomChance(FRACUNIT/2)) // port priority 1? { @@ -3384,10 +3384,10 @@ void A_SkullAttack(mobj_t *actor) #undef dostuff - mobjinfo[MT_NULL].spawnstate = oldspawnstate; - mobjinfo[MT_NULL].flags = oldflags; - mobjinfo[MT_NULL].radius = oldradius; - mobjinfo[MT_NULL].height = oldheight; + mobjinfo[MT_RAY].spawnstate = oldspawnstate; + mobjinfo[MT_RAY].flags = oldflags; + mobjinfo[MT_RAY].radius = oldradius; + mobjinfo[MT_RAY].height = oldheight; } an = actor->angle >> ANGLETOFINESHIFT; @@ -8276,7 +8276,7 @@ void A_Boss3ShockThink(mobj_t *actor) snew->angle = (actor->angle + snext->angle) >> 1; P_SetTarget(&snew->target, actor->target); snew->fuse = actor->fuse; - + P_SetScale(snew, actor->scale); snew->destscale = actor->destscale; snew->scalespeed = actor->scalespeed; From c49dd5f535bc652bdf54ca1b652e72a9c1991dd0 Mon Sep 17 00:00:00 2001 From: GoldenTails Date: Sat, 5 Feb 2022 18:19:00 -0600 Subject: [PATCH 66/98] Make dedicated servers not pop up that annoying SDL error window So they don't mess with shell scripts that expect SRB2 to exit when it crashes (like most other programs) --- src/sdl/i_system.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index ccec37093..ab63be946 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -358,9 +358,10 @@ static void I_ReportSignal(int num, int coredumped) I_OutputMsg("\nProcess killed by signal: %s\n\n", sigmsg); - SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "Process killed by signal", - sigmsg, NULL); + if (!M_CheckParm("-dedicated")) + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, + "Process killed by signal", + sigmsg, NULL); } #ifndef NEWSIGNALHANDLER @@ -2202,9 +2203,10 @@ static void newsignalhandler_Warn(const char *pr) I_OutputMsg("%s\n", text); - SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "Startup error", - text, NULL); + if (!M_CheckParm("-dedicated")) + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, + "Startup error", + text, NULL); I_ShutdownConsole(); exit(-1); @@ -2405,9 +2407,10 @@ void I_Error(const char *error, ...) // Implement message box with SDL_ShowSimpleMessageBox, // which should fail gracefully if it can't put a message box up // on the target system - SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "SRB2 "VERSIONSTRING" Recursive Error", - buffer, NULL); + if (!M_CheckParm("-dedicated")) + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, + "SRB2 "VERSIONSTRING" Recursive Error", + buffer, NULL); W_Shutdown(); exit(-1); // recursive errors detected @@ -2449,9 +2452,10 @@ void I_Error(const char *error, ...) // Implement message box with SDL_ShowSimpleMessageBox, // which should fail gracefully if it can't put a message box up // on the target system - SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "SRB2 "VERSIONSTRING" Error", - buffer, NULL); + if (!M_CheckParm("-dedicated")) + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, + "SRB2 "VERSIONSTRING" Error", + buffer, NULL); // Note that SDL_ShowSimpleMessageBox does *not* require SDL to be // initialized at the time, so calling it after SDL_Quit() is // perfectly okay! In addition, we do this on purpose so the From 9fee550fb05052df36526a41c59ef7d0d7cfd7d2 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 8 Feb 2022 14:58:09 +0100 Subject: [PATCH 67/98] Actually check bot names in lib_gAddPlayer. --- src/lua_baselib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 12ad4fee0..e12ec146d 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -3455,7 +3455,7 @@ static int lib_gAddPlayer(lua_State *L) lua_pushnil(L); return 1; } - + newplayernum = i; @@ -3486,15 +3486,15 @@ static int lib_gAddPlayer(lua_State *L) // Read the bot name, if given if (!lua_isnoneornil(L, 3)) - strcpy(player_names[newplayernum], luaL_checkstring(L, 3)); - + strlcpy(player_names[newplayernum], luaL_checkstring(L, 3), sizeof(*player_names)); + bot = luaL_optinteger(L, 4, 3); newplayer->bot = (bot >= BOT_NONE && bot <= BOT_MPAI) ? bot : BOT_MPAI; - + // If our bot is a 2P type, we'll need to set its leader so it can spawn if (newplayer->bot == BOT_2PAI || newplayer->bot == BOT_2PHUMAN) B_UpdateBotleader(newplayer); - + // Set the skin (can't do this until AFTER bot type is set!) SetPlayerSkinByNum(newplayernum, skinnum); @@ -3507,7 +3507,7 @@ static int lib_gAddPlayer(lua_State *L) strcpy(joinmsg, va(joinmsg, player_names[newplayernum], newplayernum)); HU_AddChatText(joinmsg, false); } - + LUA_PushUserdata(L, newplayer, META_PLAYER); return 1; } From bb84ae1793e24d3fd6c600d3010331026553bae5 Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 10 Feb 2022 13:10:56 +0100 Subject: [PATCH 68/98] Decrease hitbox sizes to prevent collision with thin air. --- extras/conf/SRB2-22.cfg | 14 +++++++------- src/info.c | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/extras/conf/SRB2-22.cfg b/extras/conf/SRB2-22.cfg index 4ed68e1ca..b6e8bc53c 100644 --- a/extras/conf/SRB2-22.cfg +++ b/extras/conf/SRB2-22.cfg @@ -3807,8 +3807,8 @@ thingtypes { title = "Egg Mobile"; sprite = "EGGMA1"; - width = 24; - height = 76; + width = 36; + height = 84; flags4text = "[4] End level on death"; flags8text = "[8] Alternate laser attack"; } @@ -3816,8 +3816,8 @@ thingtypes { title = "Egg Slimer"; sprite = "EGGNA1"; - width = 24; - height = 76; + width = 36; + height = 84; flags4text = "[4] End level on death"; flags8text = "[8] Speed up when hit"; } @@ -3825,7 +3825,7 @@ thingtypes { title = "Sea Egg"; sprite = "EGGOA1"; - width = 32; + width = 36; height = 116; flags4text = "[4] End level on death"; } @@ -3833,8 +3833,8 @@ thingtypes { title = "Egg Colosseum"; sprite = "EGGPA1"; - width = 24; - height = 76; + width = 36; + height = 84; flags4text = "[4] End level on death"; } 204 diff --git a/src/info.c b/src/info.c index 544ed1e31..4b0625961 100644 --- a/src/info.c +++ b/src/info.c @@ -5601,7 +5601,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_EGGMOBILE_FLEE1, // xdeathstate sfx_s3kb4, // deathsound 4, // speed - 48*FRACUNIT, // radius + 36*FRACUNIT, // radius 84*FRACUNIT, // height 0, // display offset sfx_None, // mass @@ -5736,8 +5736,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_EGGMOBILE2_FLEE1,// xdeathstate sfx_s3kb4, // deathsound 2*FRACUNIT, // speed - 48*FRACUNIT, // radius - 96*FRACUNIT, // height + 36*FRACUNIT, // radius + 84*FRACUNIT, // height 0, // display offset 0, // mass 3, // damage @@ -5844,7 +5844,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_EGGMOBILE3_FLEE1, // xdeathstate sfx_s3kb4, // deathsound 8*FRACUNIT, // speed - 48*FRACUNIT, // radius + 36*FRACUNIT, // radius 116*FRACUNIT, // height 0, // display offset MT_FAKEMOBILE, // mass @@ -5871,7 +5871,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_mswarp, // deathsound 8*FRACUNIT, // speed - 32*FRACUNIT, // radius + 36*FRACUNIT, // radius 116*FRACUNIT, // height 0, // display offset 0, // mass @@ -5925,7 +5925,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_EGGMOBILE4_FLEE1,// xdeathstate sfx_s3kb4, // deathsound 0, // speed - 48*FRACUNIT, // radius + 36*FRACUNIT, // radius 84*FRACUNIT, // height 0, // display offset 0, // mass From 2033b77b46b55802dd9f5634fec2d5783d494348 Mon Sep 17 00:00:00 2001 From: SMS Alfredo <65426124+SMS-Alfredo@users.noreply.github.com> Date: Fri, 11 Feb 2022 00:33:49 -0600 Subject: [PATCH 69/98] Actually do the thing --- src/p_user.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/p_user.c b/src/p_user.c index 83eb4ea02..d69c57565 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2036,12 +2036,22 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj) ghost->angle = (mobj->player ? mobj->player->drawangle : mobj->angle); ghost->rollangle = mobj->rollangle; + ghost->sprite = mobj->sprite; ghost->sprite2 = mobj->sprite2; ghost->frame = mobj->frame; ghost->tics = -1; ghost->frame &= ~FF_TRANSMASK; ghost->frame |= tr_trans50<renderflags = mobj->renderflags; + ghost->blendmode = mobj->blendmode; + + ghost->spritexscale = mobj->spritexscale; + ghost->spriteyscale = mobj->spriteyscale; + ghost->spritexoffset = mobj->spritexoffset; + ghost->spriteyoffset = mobj->spriteyoffset; + ghost->fuse = ghost->info->damage; ghost->skin = mobj->skin; From a4778075b2bde8d0e45a540311e95cf337b1890a Mon Sep 17 00:00:00 2001 From: spherallic Date: Mon, 14 Feb 2022 14:57:00 +0100 Subject: [PATCH 70/98] Convert old frame flags in Metal recordings to their 2.2.10 equivalents. --- src/g_demo.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++----- src/g_demo.h | 1 + 2 files changed, 58 insertions(+), 5 deletions(-) diff --git a/src/g_demo.c b/src/g_demo.c index c97dbcf9e..8324a4f21 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -94,7 +94,7 @@ demoghost *ghosts = NULL; // DEMO RECORDING // -#define DEMOVERSION 0x000e +#define DEMOVERSION 0x000f #define DEMOHEADER "\xF0" "SRB2Replay" "\x0F" #define DF_GHOST 0x01 // This demo contains ghost data too! @@ -1029,7 +1029,11 @@ void G_ReadMetalTic(mobj_t *metal) if (ziptic & GZT_ANGLE) metal->angle = READUINT8(metal_p)<<24; if (ziptic & GZT_FRAME) + { oldmetal.frame = READUINT32(metal_p); + if (metalversion < 0x000f) + oldmetal.frame = G_ConvertOldFrameFlags(oldmetal.frame); + } if (ziptic & GZT_SPR2) oldmetal.sprite2 = READUINT8(metal_p); @@ -1169,6 +1173,8 @@ void G_ReadMetalTic(mobj_t *metal) follow->sprite2 = 0; follow->sprite = READUINT16(metal_p); follow->frame = READUINT32(metal_p); // NOT & FF_FRAMEMASK here, so 32 bits + if (metalversion < 0x000f) + follow->frame = G_ConvertOldFrameFlags(follow->frame); follow->angle = metal->angle; follow->color = (metalversion==0x000c) ? READUINT8(metal_p) : READUINT16(metal_p); @@ -1680,8 +1686,9 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname) switch(oldversion) // demoversion { case DEMOVERSION: // latest always supported - case 0x000d: // The previous demoversion also supported - case 0x000c: // all that changed between then and now was longer color name + case 0x000e: // The previous demoversions also supported + case 0x000d: // all that changed between then and now was longer color name + case 0x000c: break; // too old, cannot support. default: @@ -1824,6 +1831,7 @@ void G_DoPlayDemo(char *defdemoname) switch(demoversion) { case 0x000d: + case 0x000e: case DEMOVERSION: // latest always supported cnamelen = MAXCOLORNAME; break; @@ -2077,6 +2085,7 @@ void G_AddGhost(char *defdemoname) switch(ghostversion) { case 0x000d: + case 0x000e: case DEMOVERSION: // latest always supported cnamelen = MAXCOLORNAME; break; @@ -2337,8 +2346,9 @@ void G_DoPlayMetal(void) switch(metalversion) { case DEMOVERSION: // latest always supported - case 0x000d: // There are checks wheter the momentum is from older demo versions or not - case 0x000c: // all that changed between then and now was longer color name + case 0x000e: // There are checks wheter the momentum is from older demo versions or not + case 0x000d: // all that changed between then and now was longer color name + case 0x000c: break; // too old, cannot support. default: @@ -2554,3 +2564,45 @@ boolean G_CheckDemoStatus(void) return false; } + +// 2.2.10 shifted some frame flags around, this function converts frame flags from older versions to their 2.2.10 equivalents. +INT32 G_ConvertOldFrameFlags(INT32 frame) +{ + if (frame & 0x01000000) // was FF_ANIMATE, is now FF_VERTICALFLIP + { + frame &= ~0x01000000; + frame |= FF_ANIMATE; + } + + if (frame & 0x02000000) // was FF_RANDOMANIM, is now FF_HORIZONTALFLIP + { + frame &= ~0x02000000; + frame |= FF_RANDOMANIM; + } + + if (frame & 0x04000000) // was FF_GLOBALANIM, is now empty + { + frame &= ~0x04000000; + frame |= FF_GLOBALANIM; + } + + if (frame & 0x00200000) // was FF_VERTICALFLIP, is now FF_FULLDARK + { + frame &= ~0x00200000; + frame |= FF_VERTICALFLIP; + } + + if (frame & 0x00400000) // was FF_HORIZONTALFLIP, is now FF_PAPERSPRITE + { + frame &= ~0x00400000; + frame |= FF_HORIZONTALFLIP; + } + + if (frame & 0x00800000) // was FF_PAPERSPRITE, is now FF_FLOORSPRITE + { + frame &= ~0x00800000; + frame |= FF_PAPERSPRITE; + } + + return frame; +} diff --git a/src/g_demo.h b/src/g_demo.h index 73cf27358..1a618ba64 100644 --- a/src/g_demo.h +++ b/src/g_demo.h @@ -82,5 +82,6 @@ void G_StopMetalDemo(void); ATTRNORETURN void FUNCNORETURN G_StopMetalRecording(boolean kill); void G_StopDemo(void); boolean G_CheckDemoStatus(void); +INT32 G_ConvertOldFrameFlags(INT32 frame); #endif // __G_DEMO__ From 7218060a7ac454be458338299c0181cc3f34bb6a Mon Sep 17 00:00:00 2001 From: sphere Date: Sat, 19 Feb 2022 01:49:19 +0000 Subject: [PATCH 71/98] :lachyes: --- src/info.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/info.c b/src/info.c index a26cc2d86..7a3476669 100644 --- a/src/info.c +++ b/src/info.c @@ -3737,12 +3737,12 @@ state_t states[NUMSTATES] = // Nightopian {SPR_NTPN, 0, 2, {A_Look}, 1, 1, S_PIAN_LOOK2}, // S_PIAN_LOOK1 - {SPR_NTPN, 1, 2, {A_Look}, 1, 1, S_PIAN_LOOK3}, // S_PIAN_LOOK1 - {SPR_NTPN, 2, 2, {A_Look}, 1, 1, S_PIAN_LOOK1}, // S_PIAN_LOOK1 + {SPR_NTPN, 1, 2, {A_Look}, 1, 1, S_PIAN_LOOK3}, // S_PIAN_LOOK2 + {SPR_NTPN, 2, 2, {A_Look}, 1, 1, S_PIAN_LOOK1}, // S_PIAN_LOOK3 {SPR_NTPN, 0, 2, {A_JetgThink}, 0, 0, S_PIAN_FLY2}, // S_PIAN_FLY1 {SPR_NTPN, 1, 2, {NULL}, 0, 0, S_PIAN_FLY3}, // S_PIAN_FLY2 {SPR_NTPN, 2, 2, {NULL}, 0, 0, S_PIAN_FLY1}, // S_PIAN_FLY3 - {SPR_NTPN, 3|FF_ANIMATE, 24, {NULL}, 2, 2, S_PIAN_FLY1}, // S_PIANSING + {SPR_NTPN, 3|FF_ANIMATE, 24, {NULL}, 2, 2, S_PIAN_FLY1}, // S_PIAN_SING // Shleep {SPR_SHLP, 0, 15, {NULL}, 0, 0, S_SHLEEP2}, // S_SHLEEP1 From 946100939aa29b21975a7e1abc658fb8768d4c4c Mon Sep 17 00:00:00 2001 From: spherallic Date: Sat, 19 Feb 2022 22:19:39 +0100 Subject: [PATCH 72/98] Update editor configurations & increase Nightopians' hitbox height. --- extras/conf/SRB2-22.cfg | 6 +++--- extras/conf/udb/Includes/SRB222_things.cfg | 6 +++--- src/info.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extras/conf/SRB2-22.cfg b/extras/conf/SRB2-22.cfg index b780ff75f..bd3728e01 100644 --- a/extras/conf/SRB2-22.cfg +++ b/extras/conf/SRB2-22.cfg @@ -6298,10 +6298,10 @@ thingtypes } 1602 { - title = "Pian"; - sprite = "NTPNALAR"; + title = "Nightopian"; + sprite = "NTPNA1"; width = 16; - height = 32; + height = 40; } } diff --git a/extras/conf/udb/Includes/SRB222_things.cfg b/extras/conf/udb/Includes/SRB222_things.cfg index 113c1a4c2..0407741fc 100644 --- a/extras/conf/udb/Includes/SRB222_things.cfg +++ b/extras/conf/udb/Includes/SRB222_things.cfg @@ -2528,10 +2528,10 @@ dreamhill } 1602 { - title = "Pian"; - sprite = "NTPNALAR"; + title = "Nightopian"; + sprite = "NTPNA1"; width = 16; - height = 32; + height = 40; } } diff --git a/src/info.c b/src/info.c index 7a3476669..19789a93d 100644 --- a/src/info.c +++ b/src/info.c @@ -20134,7 +20134,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_None, // deathsound FRACUNIT, // speed 16*FRACUNIT, // radius - 32*FRACUNIT, // height + 40*FRACUNIT, // height 0, // display offset 16, // mass 0, // damage From fcc28d0714abb569de4830e36de666a716a2f1db Mon Sep 17 00:00:00 2001 From: spherallic Date: Mon, 21 Feb 2022 16:00:21 +0100 Subject: [PATCH 73/98] Update seaweed state to utilize new features & sprites. --- src/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.c b/src/info.c index 19789a93d..3806b5356 100644 --- a/src/info.c +++ b/src/info.c @@ -2168,7 +2168,7 @@ state_t states[NUMSTATES] = {SPR_GARG, 1, -1, {NULL}, 0, 0, S_NULL}, // S_BIGGARGOYLE // DSZ Seaweed - {SPR_SEWE, 0, -1, {NULL}, 0, 0, S_SEAWEED2}, // S_SEAWEED1 + {SPR_SEWE, FF_ANIMATE|FF_RANDOMANIM, -1, {NULL}, 26, 3, S_SEAWEED1}, // S_SEAWEED1 {SPR_SEWE, 1, 5, {NULL}, 0, 0, S_SEAWEED3}, // S_SEAWEED2 {SPR_SEWE, 2, 5, {NULL}, 0, 0, S_SEAWEED4}, // S_SEAWEED3 {SPR_SEWE, 3, 5, {NULL}, 0, 0, S_SEAWEED5}, // S_SEAWEED4 From a6c52f5bad1f2507e4fa8ea648b4667bc9287fc9 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 22 Feb 2022 15:49:16 +0100 Subject: [PATCH 74/98] Move MT_RAY to the very end of the mobj list. --- src/deh_tables.c | 2 +- src/info.c | 54 ++++++++++++++++++++++++------------------------ src/info.h | 2 +- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/deh_tables.c b/src/deh_tables.c index 9db18be9b..9aacd3c50 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -3496,7 +3496,6 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi // because sadly no one remembers this place while searching for full state names. const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity testing later. "MT_NULL", - "MT_RAY", "MT_UNKNOWN", "MT_THOK", // Thok! mobj @@ -4270,6 +4269,7 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t "MT_YELLOWBRICKDEBRIS", "MT_NAMECHECK", + "MT_RAY", }; const char *const MOBJFLAG_LIST[] = { diff --git a/src/info.c b/src/info.c index 991bf383e..fe419b5c4 100644 --- a/src/info.c +++ b/src/info.c @@ -3964,33 +3964,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, - { // MT_RAY - -1, // doomednum - S_NULL, // spawnstate - 0, // spawnhealth - S_NULL, // seestate - sfx_None, // seesound - 0, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 0, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_NULL, // deathstate - S_NULL, // xdeathstate - sfx_None, // deathsound - 0, // speed - 0, // radius - 0, // height - 0, // display offset - 0, // mass - 0, // damage - sfx_None, // activesound - MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags - S_NULL // raisestate - }, - { // MT_UNKNOWN -1, // doomednum S_UNKNOWN, // spawnstate @@ -21712,6 +21685,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_NOBLOCKMAP|MF_MISSILE|MF_NOGRAVITY|MF_NOSECTOR, // flags S_NULL // raisestate }, + + { // MT_RAY + -1, // doomednum + S_NULL, // spawnstate + 0, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 0, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 0, // speed + 0, // radius + 0, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags + S_NULL // raisestate + }, }; skincolor_t skincolors[MAXSKINCOLORS] = { diff --git a/src/info.h b/src/info.h index 9ceeead2c..0539f0b12 100644 --- a/src/info.h +++ b/src/info.h @@ -4316,7 +4316,6 @@ extern playersprite_t free_spr2; typedef enum mobj_type { MT_NULL, - MT_RAY, // General purpose mobj MT_UNKNOWN, MT_THOK, // Thok! mobj @@ -5090,6 +5089,7 @@ typedef enum mobj_type MT_YELLOWBRICKDEBRIS, // for CEZ3 MT_NAMECHECK, + MT_RAY, // General purpose mobj MT_FIRSTFREESLOT, MT_LASTFREESLOT = MT_FIRSTFREESLOT + NUMMOBJFREESLOTS - 1, From d624ee2541e97234de2a827b8cbe1619021b850b Mon Sep 17 00:00:00 2001 From: spherallic Date: Mon, 28 Feb 2022 14:30:01 +0100 Subject: [PATCH 75/98] Revert "minor spike optimisations" This reverts commit b2d693a54704f08eecca461192753c1f57f44acf. --- src/info.c | 6 +- src/p_map.c | 152 +++++++++++++++++++++++++++------------------------ src/p_mobj.c | 98 ++++++++++++++------------------- 3 files changed, 127 insertions(+), 129 deletions(-) diff --git a/src/info.c b/src/info.c index 991bf383e..238ea0fe8 100644 --- a/src/info.c +++ b/src/info.c @@ -8004,7 +8004,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = DMG_SPIKE, // mass 0, // damage sfx_None, // activesound - MF_SOLID|MF_SCENERY, // flags + MF_NOBLOCKMAP|MF_SCENERY|MF_NOCLIPHEIGHT, // flags S_NULL // raisestate }, @@ -8031,7 +8031,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = DMG_SPIKE, // mass 0, // damage sfx_None, // activesound - MF_SOLID|MF_NOGRAVITY|MF_SCENERY|MF_PAPERCOLLISION, // flags + MF_NOBLOCKMAP|MF_NOGRAVITY|MF_SCENERY|MF_NOCLIPHEIGHT|MF_PAPERCOLLISION, // flags S_NULL // raisestate }, @@ -8058,7 +8058,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 4, // mass 0, // damage sfx_None, // activesound - MF_NOBLOCKMAP|MF_NOGRAVITY|MF_SCENERY|MF_NOCLIP|MF_NOCLIPTHING, // flags + MF_NOBLOCKMAP|MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPTHING, // flags S_NULL // raisestate }, diff --git a/src/p_map.c b/src/p_map.c index bd504ca17..ce1e793ff 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1465,6 +1465,86 @@ static boolean PIT_CheckThing(mobj_t *thing) return true; } + // Sprite Spikes! + // Do not return because solidity code comes below. + if (tmthing->type == MT_SPIKE && tmthing->flags & MF_SOLID && thing->player) // moving spike rams into player?! + { + if (tmthing->eflags & MFE_VERTICALFLIP) + { + if (thing->z + thing->height <= tmthing->z + FixedMul(FRACUNIT, tmthing->scale) + && thing->z + thing->height + thing->momz >= tmthing->z + FixedMul(FRACUNIT, tmthing->scale) + tmthing->momz + && !(thing->player->charability == CA_BOUNCE && thing->player->panim == PA_ABILITY && thing->eflags & MFE_VERTICALFLIP)) + P_DamageMobj(thing, tmthing, tmthing, 1, DMG_SPIKE); + } + else if (thing->z >= tmthing->z + tmthing->height - FixedMul(FRACUNIT, tmthing->scale) + && thing->z + thing->momz <= tmthing->z + tmthing->height - FixedMul(FRACUNIT, tmthing->scale) + tmthing->momz + && !(thing->player->charability == CA_BOUNCE && thing->player->panim == PA_ABILITY && !(thing->eflags & MFE_VERTICALFLIP))) + P_DamageMobj(thing, tmthing, tmthing, 1, DMG_SPIKE); + } + else if (thing->type == MT_SPIKE && thing->flags & MF_SOLID && tmthing->player) // unfortunate player falls into spike?! + { + if (thing->eflags & MFE_VERTICALFLIP) + { + if (tmthing->z + tmthing->height <= thing->z - FixedMul(FRACUNIT, thing->scale) + && tmthing->z + tmthing->height + tmthing->momz >= thing->z - FixedMul(FRACUNIT, thing->scale) + && !(tmthing->player->charability == CA_BOUNCE && tmthing->player->panim == PA_ABILITY && tmthing->eflags & MFE_VERTICALFLIP)) + P_DamageMobj(tmthing, thing, thing, 1, DMG_SPIKE); + } + else if (tmthing->z >= thing->z + thing->height + FixedMul(FRACUNIT, thing->scale) + && tmthing->z + tmthing->momz <= thing->z + thing->height + FixedMul(FRACUNIT, thing->scale) + && !(tmthing->player->charability == CA_BOUNCE && tmthing->player->panim == PA_ABILITY && !(tmthing->eflags & MFE_VERTICALFLIP))) + P_DamageMobj(tmthing, thing, thing, 1, DMG_SPIKE); + } + + if (tmthing->type == MT_WALLSPIKE && tmthing->flags & MF_SOLID && thing->player) // wall spike impales player + { + fixed_t bottomz, topz; + bottomz = tmthing->z; + topz = tmthing->z + tmthing->height; + if (tmthing->eflags & MFE_VERTICALFLIP) + bottomz -= FixedMul(FRACUNIT, tmthing->scale); + else + topz += FixedMul(FRACUNIT, tmthing->scale); + + if (thing->z + thing->height > bottomz // above bottom + && thing->z < topz) // below top + // don't check angle, the player was clearly in the way in this case + P_DamageMobj(thing, tmthing, tmthing, 1, DMG_SPIKE); + } + else if (thing->type == MT_WALLSPIKE && thing->flags & MF_SOLID && tmthing->player) + { + fixed_t bottomz, topz; + angle_t touchangle = R_PointToAngle2(thing->tracer->x, thing->tracer->y, tmthing->x, tmthing->y); + + if (P_PlayerInPain(tmthing->player) && (tmthing->momx || tmthing->momy)) + { + angle_t playerangle = R_PointToAngle2(0, 0, tmthing->momx, tmthing->momy) - touchangle; + if (playerangle > ANGLE_180) + playerangle = InvAngle(playerangle); + if (playerangle < ANGLE_90) + return true; // Yes, this is intentionally outside the z-height check. No standing on spikes whilst moving away from them. + } + + bottomz = thing->z; + topz = thing->z + thing->height; + + if (thing->eflags & MFE_VERTICALFLIP) + bottomz -= FixedMul(FRACUNIT, thing->scale); + else + topz += FixedMul(FRACUNIT, thing->scale); + + if (tmthing->z + tmthing->height > bottomz // above bottom + && tmthing->z < topz // below top + && !P_MobjWasRemoved(thing->tracer)) // this probably wouldn't work if we didn't have a tracer + { // use base as a reference point to determine what angle you touched the spike at + touchangle = thing->angle - touchangle; + if (touchangle > ANGLE_180) + touchangle = InvAngle(touchangle); + if (touchangle <= ANGLE_22h) // if you touched it at this close an angle, you get poked! + P_DamageMobj(tmthing, thing, thing, 1, DMG_SPIKE); + } + } + if (thing->flags & MF_PUSHABLE) { if (tmthing->type == MT_FAN || tmthing->type == MT_STEAM) @@ -1543,22 +1623,6 @@ static boolean PIT_CheckThing(mobj_t *thing) if (thing->player) { - if (tmthing->type == MT_WALLSPIKE && (tmthing->flags & MF_SOLID)) // wall spike impales player - { - fixed_t bottomz, topz; - bottomz = tmthing->z; - topz = tmthing->z + tmthing->height; - if (tmthing->eflags & MFE_VERTICALFLIP) - bottomz -= FixedMul(FRACUNIT, tmthing->scale); - else - topz += FixedMul(FRACUNIT, tmthing->scale); - - if (thing->z + thing->height > bottomz // above bottom - && thing->z < topz) // below top - // don't check angle, the player was clearly in the way in this case - P_DamageMobj(thing, tmthing, tmthing, 1, DMG_SPIKE); - } - // Doesn't matter what gravity player's following! Just do your stuff in YOUR direction only if (tmthing->eflags & MFE_VERTICALFLIP && (tmthing->z + tmthing->height + tmthing->momz < thing->z @@ -1593,55 +1657,6 @@ static boolean PIT_CheckThing(mobj_t *thing) if (!tmthing->health) return true; - if (thing->type == MT_SPIKE && (thing->flags & MF_SOLID)) // unfortunate player falls into spike?! - { - if (thing->eflags & MFE_VERTICALFLIP) - { - if (tmthing->z + tmthing->height <= thing->z - FixedMul(FRACUNIT, thing->scale) - && tmthing->z + tmthing->height + tmthing->momz >= thing->z - FixedMul(FRACUNIT, thing->scale) - && !(tmthing->player->charability == CA_BOUNCE && tmthing->player->panim == PA_ABILITY && tmthing->eflags & MFE_VERTICALFLIP)) - P_DamageMobj(tmthing, thing, thing, 1, DMG_SPIKE); - } - else if (tmthing->z >= thing->z + thing->height + FixedMul(FRACUNIT, thing->scale) - && tmthing->z + tmthing->momz <= thing->z + thing->height + FixedMul(FRACUNIT, thing->scale) - && !(tmthing->player->charability == CA_BOUNCE && tmthing->player->panim == PA_ABILITY && !(tmthing->eflags & MFE_VERTICALFLIP))) - P_DamageMobj(tmthing, thing, thing, 1, DMG_SPIKE); - } - - if (thing->type == MT_WALLSPIKE && (thing->flags & MF_SOLID)) - { - fixed_t bottomz, topz; - angle_t touchangle = R_PointToAngle2(thing->tracer->x, thing->tracer->y, tmthing->x, tmthing->y); - - if (P_PlayerInPain(tmthing->player) && (tmthing->momx || tmthing->momy)) - { - angle_t playerangle = R_PointToAngle2(0, 0, tmthing->momx, tmthing->momy) - touchangle; - if (playerangle > ANGLE_180) - playerangle = InvAngle(playerangle); - if (playerangle < ANGLE_90) - return true; // Yes, this is intentionally outside the z-height check. No standing on spikes whilst moving away from them. - } - - bottomz = thing->z; - topz = thing->z + thing->height; - - if (thing->eflags & MFE_VERTICALFLIP) - bottomz -= FixedMul(FRACUNIT, thing->scale); - else - topz += FixedMul(FRACUNIT, thing->scale); - - if (tmthing->z + tmthing->height > bottomz // above bottom - && tmthing->z < topz // below top - && !P_MobjWasRemoved(thing->tracer)) // this probably wouldn't work if we didn't have a tracer - { // use base as a reference point to determine what angle you touched the spike at - touchangle = thing->angle - touchangle; - if (touchangle > ANGLE_180) - touchangle = InvAngle(touchangle); - if (touchangle <= ANGLE_22h) // if you touched it at this close an angle, you get poked! - P_DamageMobj(tmthing, thing, thing, 1, DMG_SPIKE); - } - } - if (thing->type == MT_FAN || thing->type == MT_STEAM) P_DoFanAndGasJet(thing, tmthing); else if (thing->flags & MF_SPRING && tmthing->player->powers[pw_carry] != CR_MINECART) @@ -1706,8 +1721,8 @@ static boolean PIT_CheckThing(mobj_t *thing) } } - if ((thing->player) && (tmthing->flags & MF_SPRING || tmthing->type == MT_STEAM)) - ; // springs and gas jets should never be able to step up onto a player + if ((tmthing->flags & MF_SPRING || tmthing->type == MT_STEAM || tmthing->type == MT_SPIKE || tmthing->type == MT_WALLSPIKE) && (thing->player)) + ; // springs, gas jets and springs should never be able to step up onto a player // z checking at last // Treat noclip things as non-solid! else if ((thing->flags & (MF_SOLID|MF_NOCLIP)) == MF_SOLID @@ -1715,9 +1730,6 @@ static boolean PIT_CheckThing(mobj_t *thing) { fixed_t topz, tmtopz; - if (tmthing->type == MT_SPIKE || tmthing->type == MT_WALLSPIKE) // do not run height checks if you are a spike - return true; - if (tmthing->eflags & MFE_VERTICALFLIP) { // pass under diff --git a/src/p_mobj.c b/src/p_mobj.c index ca5c03ed0..04e02f847 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -7845,48 +7845,6 @@ static void P_MobjSceneryThink(mobj_t *mobj) if (P_MobjFlip(mobj)*mobj->momz < mobj->info->speed) mobj->momz = P_MobjFlip(mobj)*mobj->info->speed; break; - case MT_SPIKE: - if (mobj->fuse) - { - mobj->fuse--; - break; - } - P_SetMobjState(mobj, mobj->state->nextstate); - mobj->fuse = mobj->info->speed; - if (mobj->spawnpoint) - mobj->fuse += mobj->spawnpoint->angle; - break; - case MT_WALLSPIKE: - if (mobj->fuse) - { - mobj->fuse--; - break; - } - P_SetMobjState(mobj, mobj->state->nextstate); - mobj->fuse = mobj->info->speed; - if (mobj->spawnpoint) - mobj->fuse += (mobj->spawnpoint->angle / 360); - break; - case MT_WALLSPIKEBASE: - if (!mobj->target) - { - P_RemoveMobj(mobj); - return; - } - mobj->frame = (mobj->frame & ~FF_FRAMEMASK)|(mobj->target->frame & FF_FRAMEMASK); -#if 0 - if (mobj->angle != mobj->target->angle + ANGLE_90) // reposition if not the correct angle - { - mobj_t* target = mobj->target; // shortcut - const fixed_t baseradius = target->radius - (target->scale/2); //FixedMul(FRACUNIT/2, target->scale); - P_UnsetThingPosition(mobj); - mobj->x = target->x - P_ReturnThrustX(target, target->angle, baseradius); - mobj->y = target->y - P_ReturnThrustY(target, target->angle, baseradius); - P_SetThingPosition(mobj); - mobj->angle = target->angle + ANGLE_90; - } -#endif - break; case MT_ROCKCRUMBLE1: case MT_ROCKCRUMBLE2: case MT_ROCKCRUMBLE3: @@ -9283,6 +9241,25 @@ static boolean P_MobjRegularThink(mobj_t *mobj) switch (mobj->type) { + case MT_WALLSPIKEBASE: + if (!mobj->target) { + P_RemoveMobj(mobj); + return false; + } + mobj->frame = (mobj->frame & ~FF_FRAMEMASK)|(mobj->target->frame & FF_FRAMEMASK); +#if 0 + if (mobj->angle != mobj->target->angle + ANGLE_90) // reposition if not the correct angle + { + mobj_t* target = mobj->target; // shortcut + const fixed_t baseradius = target->radius - (target->scale/2); //FixedMul(FRACUNIT/2, target->scale); + P_UnsetThingPosition(mobj); + mobj->x = target->x - P_ReturnThrustX(target, target->angle, baseradius); + mobj->y = target->y - P_ReturnThrustY(target, target->angle, baseradius); + P_SetThingPosition(mobj); + mobj->angle = target->angle + ANGLE_90; + } +#endif + break; case MT_FALLINGROCK: // Despawn rocks here in case zmovement code can't do so (blame slopes) if (!mobj->momx && !mobj->momy && !mobj->momz @@ -9968,6 +9945,18 @@ static boolean P_FuseThink(mobj_t *mobj) break; case MT_METALSONIC_BATTLE: break; // don't remove + case MT_SPIKE: + P_SetMobjState(mobj, mobj->state->nextstate); + mobj->fuse = mobj->info->speed; + if (mobj->spawnpoint) + mobj->fuse += mobj->spawnpoint->angle; + break; + case MT_WALLSPIKE: + P_SetMobjState(mobj, mobj->state->nextstate); + mobj->fuse = mobj->info->speed; + if (mobj->spawnpoint) + mobj->fuse += (mobj->spawnpoint->angle / 360); + break; case MT_NIGHTSCORE: P_RemoveMobj(mobj); return false; @@ -12980,18 +12969,17 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean // Pop up spikes! if (mthing->options & MTF_OBJECTSPECIAL) { + mobj->flags &= ~MF_SCENERY; mobj->fuse = (16 - mthing->extrainfo)*(mthing->angle + mobj->info->speed)/16; if (mthing->options & MTF_EXTRA) P_SetMobjState(mobj, mobj->info->meleestate); } - else - mobj->flags |= MF_NOTHINK; - // no collision for spikes if the ambush flag is checked - if ((mthing->options & MTF_AMBUSH) || metalrecording) + // Use per-thing collision for spikes if the deaf flag isn't checked. + if (!(mthing->options & MTF_AMBUSH) && !metalrecording) { P_UnsetThingPosition(mobj); - mobj->flags |= (MF_NOBLOCKMAP|MF_NOCLIPHEIGHT); - mobj->flags &= ~MF_SOLID; + mobj->flags &= ~(MF_NOBLOCKMAP|MF_NOGRAVITY|MF_NOCLIPHEIGHT); + mobj->flags |= MF_SOLID; P_SetThingPosition(mobj); } break; @@ -12999,20 +12987,20 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean // Pop up spikes! if (mthing->options & MTF_OBJECTSPECIAL) { + mobj->flags &= ~MF_SCENERY; mobj->fuse = (16 - mthing->extrainfo)*((mthing->angle/360) + mobj->info->speed)/16; if (mthing->options & MTF_EXTRA) P_SetMobjState(mobj, mobj->info->meleestate); } - else - mobj->flags |= MF_NOTHINK; - // no collision for spikes if the ambush flag is checked - if ((mthing->options & MTF_AMBUSH) || metalrecording) + // Use per-thing collision for spikes if the deaf flag isn't checked. + if (!(mthing->options & MTF_AMBUSH) && !metalrecording) { P_UnsetThingPosition(mobj); - mobj->flags |= (MF_NOBLOCKMAP|MF_NOCLIPHEIGHT); - mobj->flags &= ~MF_SOLID; + mobj->flags &= ~(MF_NOBLOCKMAP | MF_NOCLIPHEIGHT); + mobj->flags |= MF_SOLID; P_SetThingPosition(mobj); } + // spawn base { const angle_t mobjangle = FixedAngle(mthing->angle << FRACBITS); // the mobj's own angle hasn't been set quite yet so... @@ -13026,8 +13014,6 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean P_SetScale(base, mobj->scale); P_SetTarget(&base->target, mobj); P_SetTarget(&mobj->tracer, base); - if (!(mthing->options & MTF_OBJECTSPECIAL)) - base->flags |= MF_NOTHINK; } break; case MT_RING_BOX: From 34f8464cbfc01adf1650da1311a0751fce5b0678 Mon Sep 17 00:00:00 2001 From: SteelT Date: Wed, 2 Mar 2022 12:35:03 -0500 Subject: [PATCH 76/98] Spawn MT_RAY when attempting to spawn MT_NULL Some code assumes that P_SpawnMobj can never return NULL So spawn MT_RAY in it's place when attempting to spawn MT_NULL and show a console warning --- src/p_mobj.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index 04e02f847..e8fd5fd13 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10474,10 +10474,17 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) if (type == MT_NULL) { +#if 0 #ifdef PARANOIA I_Error("Tried to spawn MT_NULL\n"); #endif return NULL; +#endif + // Hack: Some code assumes that P_SpawnMobj can never return NULL + // So replace MT_NULL with MT_RAY in the meantime + // Remove when dealt properly + CONS_Alert(CONS_WARNING, "Tried to spawn MT_NULL, using MT_RAY\n"); + type = MT_RAY; } mobj = Z_Calloc(sizeof (*mobj), PU_LEVEL, NULL); From 893ea10a677274b8cb3aa0987f22f162521b6311 Mon Sep 17 00:00:00 2001 From: SteelT Date: Wed, 2 Mar 2022 12:46:24 -0500 Subject: [PATCH 77/98] Turn the console warning into a devmode print because turns out it happens more often than I thought --- src/p_mobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index e8fd5fd13..96683a123 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10483,7 +10483,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) // Hack: Some code assumes that P_SpawnMobj can never return NULL // So replace MT_NULL with MT_RAY in the meantime // Remove when dealt properly - CONS_Alert(CONS_WARNING, "Tried to spawn MT_NULL, using MT_RAY\n"); + CONS_Debug(DBG_GAMELOGIC, "Tried to spawn MT_NULL, using MT_RAY\n"); type = MT_RAY; } From 3b75ef7e7643dd3188ce628051245617516ba1ea Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 3 Mar 2022 12:08:15 +0100 Subject: [PATCH 78/98] Fix warning when compiling with NONET=1 --- src/d_clisrv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 78a3ebe6c..734337ada 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2077,6 +2077,7 @@ static boolean CL_FinishedFileList(void) return true; } +#ifndef NONET static const char * InvalidServerReason (serverinfo_pak *info) { #define EOT "\nPress ESC\n" @@ -2140,6 +2141,7 @@ static const char * InvalidServerReason (serverinfo_pak *info) #undef EOT } +#endif // ifndef NONET /** Called by CL_ServerConnectionTicker * From 14295ac7de8fd8f836769753f594977f291fa768 Mon Sep 17 00:00:00 2001 From: spherallic Date: Thu, 3 Mar 2022 20:24:46 +0100 Subject: [PATCH 79/98] 2022 --- src/Makefile | 4 ++-- src/am_map.c | 2 +- src/am_map.h | 2 +- src/apng.c | 2 +- src/apng.h | 2 +- src/asm_defs.inc | 2 +- src/b_bot.c | 2 +- src/b_bot.h | 2 +- src/byteptr.h | 2 +- src/command.c | 2 +- src/command.h | 2 +- src/console.c | 2 +- src/console.h | 2 +- src/d_clisrv.c | 2 +- src/d_clisrv.h | 2 +- src/d_event.h | 2 +- src/d_main.c | 4 ++-- src/d_main.h | 2 +- src/d_net.c | 2 +- src/d_net.h | 2 +- src/d_netcmd.c | 2 +- src/d_netcmd.h | 2 +- src/d_netfil.c | 2 +- src/d_netfil.h | 2 +- src/d_player.h | 2 +- src/d_think.h | 2 +- src/d_ticcmd.h | 2 +- src/deh_lua.c | 2 +- src/deh_lua.h | 2 +- src/deh_soc.c | 2 +- src/deh_soc.h | 2 +- src/deh_tables.c | 2 +- src/deh_tables.h | 2 +- src/dehacked.c | 2 +- src/dehacked.h | 2 +- src/doomdata.h | 2 +- src/doomdef.h | 2 +- src/doomstat.h | 2 +- src/doomtype.h | 2 +- src/endian.h | 2 +- src/f_finale.c | 2 +- src/f_finale.h | 2 +- src/f_wipe.c | 2 +- src/g_demo.c | 2 +- src/g_demo.h | 2 +- src/g_game.c | 4 ++-- src/g_game.h | 2 +- src/g_input.c | 2 +- src/g_input.h | 2 +- src/g_state.h | 2 +- src/hardware/hw_batching.c | 2 +- src/hardware/hw_batching.h | 2 +- src/hardware/hw_cache.c | 2 +- src/hardware/hw_data.h | 2 +- src/hardware/hw_defs.h | 2 +- src/hardware/hw_draw.c | 2 +- src/hardware/hw_drv.h | 2 +- src/hardware/hw_glob.h | 2 +- src/hardware/hw_light.c | 2 +- src/hardware/hw_light.h | 2 +- src/hardware/hw_main.c | 2 +- src/hardware/hw_main.h | 2 +- src/hardware/hw_md2.c | 2 +- src/hardware/hw_md2.h | 2 +- src/hardware/r_opengl/r_opengl.c | 2 +- src/http-mserv.c | 2 +- src/hu_stuff.c | 2 +- src/hu_stuff.h | 2 +- src/i_addrinfo.c | 2 +- src/i_addrinfo.h | 2 +- src/i_joy.h | 2 +- src/i_net.h | 2 +- src/i_sound.h | 2 +- src/i_system.h | 2 +- src/i_tcp.c | 2 +- src/i_tcp.h | 2 +- src/i_threads.h | 2 +- src/i_video.h | 2 +- src/info.c | 2 +- src/info.h | 2 +- src/keys.h | 2 +- src/lua_baselib.c | 2 +- src/lua_blockmaplib.c | 4 ++-- src/lua_consolelib.c | 2 +- src/lua_hook.h | 2 +- src/lua_hooklib.c | 2 +- src/lua_hud.h | 2 +- src/lua_hudlib.c | 2 +- src/lua_infolib.c | 2 +- src/lua_inputlib.c | 2 +- src/lua_libs.h | 2 +- src/lua_maplib.c | 2 +- src/lua_mathlib.c | 2 +- src/lua_mobjlib.c | 2 +- src/lua_playerlib.c | 2 +- src/lua_polyobjlib.c | 4 ++-- src/lua_script.c | 2 +- src/lua_script.h | 2 +- src/lua_skinlib.c | 2 +- src/lua_taglib.c | 4 ++-- src/lua_thinkerlib.c | 2 +- src/m_aatree.c | 2 +- src/m_aatree.h | 2 +- src/m_anigif.c | 2 +- src/m_anigif.h | 2 +- src/m_argv.c | 2 +- src/m_argv.h | 2 +- src/m_bbox.c | 2 +- src/m_bbox.h | 2 +- src/m_cheat.c | 2 +- src/m_cheat.h | 2 +- src/m_cond.c | 2 +- src/m_cond.h | 2 +- src/m_dllist.h | 2 +- src/m_easing.c | 2 +- src/m_easing.h | 2 +- src/m_fixed.c | 2 +- src/m_fixed.h | 2 +- src/m_menu.c | 2 +- src/m_menu.h | 2 +- src/m_misc.c | 2 +- src/m_misc.h | 2 +- src/m_perfstats.c | 2 +- src/m_perfstats.h | 2 +- src/m_queue.c | 2 +- src/m_queue.h | 2 +- src/m_random.c | 2 +- src/m_random.h | 2 +- src/m_swap.h | 2 +- src/mserv.c | 4 ++-- src/mserv.h | 4 ++-- src/p_ceilng.c | 2 +- src/p_enemy.c | 2 +- src/p_floor.c | 2 +- src/p_inter.c | 10 +++++----- src/p_lights.c | 2 +- src/p_local.h | 2 +- src/p_map.c | 2 +- src/p_maputl.c | 2 +- src/p_maputl.h | 2 +- src/p_mobj.c | 2 +- src/p_mobj.h | 4 ++-- src/p_polyobj.c | 2 +- src/p_polyobj.h | 2 +- src/p_pspr.h | 2 +- src/p_saveg.c | 2 +- src/p_saveg.h | 2 +- src/p_setup.c | 2 +- src/p_setup.h | 2 +- src/p_sight.c | 2 +- src/p_slopes.c | 2 +- src/p_slopes.h | 2 +- src/p_spec.c | 4 ++-- src/p_spec.h | 2 +- src/p_telept.c | 2 +- src/p_tick.c | 2 +- src/p_tick.h | 2 +- src/p_user.c | 2 +- src/r_bsp.c | 2 +- src/r_bsp.h | 2 +- src/r_data.c | 2 +- src/r_data.h | 2 +- src/r_defs.h | 2 +- src/r_draw.c | 2 +- src/r_draw.h | 2 +- src/r_draw16.c | 2 +- src/r_draw8.c | 2 +- src/r_draw8_npo2.c | 2 +- src/r_local.h | 2 +- src/r_main.c | 2 +- src/r_main.h | 2 +- src/r_patch.c | 2 +- src/r_patch.h | 2 +- src/r_patchrotation.c | 2 +- src/r_patchrotation.h | 2 +- src/r_picformats.c | 4 ++-- src/r_picformats.h | 4 ++-- src/r_plane.c | 2 +- src/r_plane.h | 2 +- src/r_portal.c | 2 +- src/r_portal.h | 2 +- src/r_segs.c | 2 +- src/r_segs.h | 2 +- src/r_skins.c | 2 +- src/r_skins.h | 2 +- src/r_sky.c | 2 +- src/r_sky.h | 2 +- src/r_splats.c | 2 +- src/r_splats.h | 2 +- src/r_state.h | 2 +- src/r_textures.c | 2 +- src/r_textures.h | 2 +- src/r_things.c | 2 +- src/r_things.h | 2 +- src/s_sound.c | 2 +- src/s_sound.h | 2 +- src/screen.c | 2 +- src/screen.h | 2 +- src/sdl/i_system.c | 2 +- src/sdl/i_threads.c | 2 +- src/sdl/i_video.c | 2 +- src/sdl/mixer_sound.c | 2 +- src/sdl/ogl_sdl.c | 2 +- src/sdl/ogl_sdl.h | 2 +- src/sdl/sdl_sound.c | 2 +- src/sdl/sdlmain.h | 2 +- src/sounds.c | 2 +- src/sounds.h | 2 +- src/st_stuff.c | 2 +- src/st_stuff.h | 2 +- src/strcasestr.c | 2 +- src/string.c | 2 +- src/tables.c | 2 +- src/tables.h | 2 +- src/taglist.c | 4 ++-- src/taglist.h | 4 ++-- src/tmap.nas | 2 +- src/tmap.s | 2 +- src/tmap_asm.s | 2 +- src/tmap_mmx.nas | 2 +- src/tmap_vc.nas | 2 +- src/v_video.c | 2 +- src/v_video.h | 2 +- src/vid_copy.s | 2 +- src/w_wad.c | 2 +- src/w_wad.h | 2 +- src/win32/Srb2win.rc | 3 +-- src/y_inter.c | 2 +- src/y_inter.h | 2 +- src/z_zone.c | 2 +- src/z_zone.h | 2 +- 231 files changed, 249 insertions(+), 250 deletions(-) diff --git a/src/Makefile b/src/Makefile index 9659a4994..c1aa35742 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,8 +2,8 @@ # the poly3 Makefile adapted over and over... # # Copyright 1998-2000 DooM Legacy Team. -# Copyright 2020-2021 James R. -# Copyright 2003-2021 Sonic Team Junior. +# Copyright 2020-2022 James R. +# Copyright 2003-2022 Sonic Team Junior. # # This program is free software distributed under the # terms of the GNU General Public License, version 2. diff --git a/src/am_map.c b/src/am_map.c index 24379e2f1..65a57c09e 100644 --- a/src/am_map.c +++ b/src/am_map.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/am_map.h b/src/am_map.h index 022a7208b..89c4ad9fa 100644 --- a/src/am_map.h +++ b/src/am_map.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/apng.c b/src/apng.c index 36b205c60..f4c08d979 100644 --- a/src/apng.c +++ b/src/apng.c @@ -1,5 +1,5 @@ /* -Copyright 2019-2021, James R. +Copyright 2019-2022, James R. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/apng.h b/src/apng.h index 893b523cb..6b9347424 100644 --- a/src/apng.h +++ b/src/apng.h @@ -1,5 +1,5 @@ /* -Copyright 2019-2021, James R. +Copyright 2019-2022, James R. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/asm_defs.inc b/src/asm_defs.inc index 9074f20f8..a8c60f19e 100644 --- a/src/asm_defs.inc +++ b/src/asm_defs.inc @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/b_bot.c b/src/b_bot.c index 82075eb8e..775a13e29 100644 --- a/src/b_bot.c +++ b/src/b_bot.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2007-2016 by John "JTE" Muniz. -// Copyright (C) 2011-2021 by Sonic Team Junior. +// Copyright (C) 2011-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/b_bot.h b/src/b_bot.h index a89cfab19..c29974c50 100644 --- a/src/b_bot.h +++ b/src/b_bot.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2007-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/byteptr.h b/src/byteptr.h index ee16bc13f..33c2c8a4b 100644 --- a/src/byteptr.h +++ b/src/byteptr.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/command.c b/src/command.c index ae4a7178e..50310f112 100644 --- a/src/command.c +++ b/src/command.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/command.h b/src/command.h index 34fd15963..30d7e5bbe 100644 --- a/src/command.h +++ b/src/command.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/console.c b/src/console.c index 6f21aeb3d..40fb43121 100644 --- a/src/console.c +++ b/src/console.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/console.h b/src/console.h index accf89d96..1cd032ac1 100644 --- a/src/console.h +++ b/src/console.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 78a3ebe6c..d26aed6c2 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_clisrv.h b/src/d_clisrv.h index 8e75fb963..bf3f0b64f 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_event.h b/src/d_event.h index c30a8ced2..c0b9cef77 100644 --- a/src/d_event.h +++ b/src/d_event.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_main.c b/src/d_main.c index 83419d266..eb82280bc 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -1141,7 +1141,7 @@ void D_SRB2Main(void) // Print GPL notice for our console users (Linux) CONS_Printf( "\n\nSonic Robo Blast 2\n" - "Copyright (C) 1998-2021 by Sonic Team Junior\n\n" + "Copyright (C) 1998-2022 by Sonic Team Junior\n\n" "This program comes with ABSOLUTELY NO WARRANTY.\n\n" "This is free software, and you are welcome to redistribute it\n" "and/or modify it under the terms of the GNU General Public License\n" diff --git a/src/d_main.h b/src/d_main.h index e282906d9..8189a9f2b 100644 --- a/src/d_main.h +++ b/src/d_main.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_net.c b/src/d_net.c index fc029f967..5e5c10889 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_net.h b/src/d_net.h index dbc6d8ba5..5baa593a0 100644 --- a/src/d_net.h +++ b/src/d_net.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_netcmd.c b/src/d_netcmd.c index fe7e7678f..d9080d342 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 7bb7eab03..0beeae154 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_netfil.c b/src/d_netfil.c index fdc0026a8..37fb7265f 100644 --- a/src/d_netfil.c +++ b/src/d_netfil.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_netfil.h b/src/d_netfil.h index 3d713c150..f778a518f 100644 --- a/src/d_netfil.h +++ b/src/d_netfil.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_player.h b/src/d_player.h index a0db1402d..755926480 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_think.h b/src/d_think.h index c3f91edc4..90a58ab68 100644 --- a/src/d_think.h +++ b/src/d_think.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/d_ticcmd.h b/src/d_ticcmd.h index 182b30e6a..e632a74a8 100644 --- a/src/d_ticcmd.h +++ b/src/d_ticcmd.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/deh_lua.c b/src/deh_lua.c index a2ffca95b..1f4d22dca 100644 --- a/src/deh_lua.c +++ b/src/deh_lua.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/deh_lua.h b/src/deh_lua.h index 9df4028bd..657e66b6e 100644 --- a/src/deh_lua.h +++ b/src/deh_lua.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/deh_soc.c b/src/deh_soc.c index 3a611f3ba..9e3c2f242 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/deh_soc.h b/src/deh_soc.h index 28e3c9512..f972ec26e 100644 --- a/src/deh_soc.h +++ b/src/deh_soc.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/deh_tables.c b/src/deh_tables.c index 9aacd3c50..c53fb5174 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/deh_tables.h b/src/deh_tables.h index 1f265cc99..972b08838 100644 --- a/src/deh_tables.h +++ b/src/deh_tables.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/dehacked.c b/src/dehacked.c index da8c81c35..3f339e477 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/dehacked.h b/src/dehacked.h index 1b200e246..b4651c66a 100644 --- a/src/dehacked.h +++ b/src/dehacked.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/doomdata.h b/src/doomdata.h index e317fec1b..009af00fa 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/doomdef.h b/src/doomdef.h index 7e7e35599..d38886296 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/doomstat.h b/src/doomstat.h index 32669b68b..bce43416b 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/doomtype.h b/src/doomtype.h index 3a57d90e8..5ddd9ae44 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/endian.h b/src/endian.h index e78204e72..86297f0cb 100644 --- a/src/endian.h +++ b/src/endian.h @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2014-2021 by Sonic Team Junior. +// Copyright (C) 2014-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/f_finale.c b/src/f_finale.c index 8dd03d44f..b5715b863 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/f_finale.h b/src/f_finale.h index 4aa2c3f05..efdc9d4ad 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/f_wipe.c b/src/f_wipe.c index 7526aeca3..43b7180b7 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -3,7 +3,7 @@ // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. // Copyright (C) 2013-2016 by Matthew "Kaito Sinclaire" Walsh. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/g_demo.c b/src/g_demo.c index 8324a4f21..e293ad9dc 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/g_demo.h b/src/g_demo.h index 1a618ba64..37664dc71 100644 --- a/src/g_demo.h +++ b/src/g_demo.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/g_game.c b/src/g_game.c index fa0900b02..39d003056 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -1557,7 +1557,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) if (player->bot == BOT_2PHUMAN) cmd->angleturn = (INT16)((localangle - *myangle) >> 16); - + *myangle += (cmd->angleturn<<16); if (controlstyle == CS_LMAOGALOG) { diff --git a/src/g_game.h b/src/g_game.h index f98269fce..dca043f2e 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/g_input.c b/src/g_input.c index 250a24772..7bb2e799d 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/g_input.h b/src/g_input.h index 2e9f53dcf..bf6ad39b3 100644 --- a/src/g_input.h +++ b/src/g_input.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/g_state.h b/src/g_state.h index 589dc6361..a6ac1970d 100644 --- a/src/g_state.h +++ b/src/g_state.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_batching.c b/src/hardware/hw_batching.c index da0319bcc..f9c6542ae 100644 --- a/src/hardware/hw_batching.c +++ b/src/hardware/hw_batching.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Sonic Team Junior. +// Copyright (C) 2020-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_batching.h b/src/hardware/hw_batching.h index 9ccc7de3d..df5c478a3 100644 --- a/src/hardware/hw_batching.h +++ b/src/hardware/hw_batching.h @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Sonic Team Junior. +// Copyright (C) 2020-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 317efd320..fe0b65c50 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_data.h b/src/hardware/hw_data.h index 5aba6a2a9..ceefe9abd 100644 --- a/src/hardware/hw_data.h +++ b/src/hardware/hw_data.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_defs.h b/src/hardware/hw_defs.h index 8df9b8916..fca9b80a3 100644 --- a/src/hardware/hw_defs.h +++ b/src/hardware/hw_defs.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index 02697789e..691e3cd3f 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_drv.h b/src/hardware/hw_drv.h index d4a586d41..718774773 100644 --- a/src/hardware/hw_drv.h +++ b/src/hardware/hw_drv.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_glob.h b/src/hardware/hw_glob.h index 37d77b467..8b30a3468 100644 --- a/src/hardware/hw_glob.h +++ b/src/hardware/hw_glob.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_light.c b/src/hardware/hw_light.c index e83d9a6ec..eb3c9bbbb 100644 --- a/src/hardware/hw_light.c +++ b/src/hardware/hw_light.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_light.h b/src/hardware/hw_light.h index 244cc921f..a0a9e93ad 100644 --- a/src/hardware/hw_light.h +++ b/src/hardware/hw_light.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index d2982afe4..92076e644 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index 3f90f0ae1..cd822c0c1 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index b66f91e19..d546e2f7f 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/hw_md2.h b/src/hardware/hw_md2.h index 9249c034c..966ed016b 100644 --- a/src/hardware/hw_md2.h +++ b/src/hardware/hw_md2.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index de0e8c6a6..7ec7ee270 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 1998-2021 by Sonic Team Junior. +// Copyright (C) 1998-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/http-mserv.c b/src/http-mserv.c index f9134ba50..b0ef37fa1 100644 --- a/src/http-mserv.c +++ b/src/http-mserv.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by James R. +// Copyright (C) 2020-2022 by James R. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 39ad1d9ed..5d893a551 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/hu_stuff.h b/src/hu_stuff.h index bb1a59e69..110486378 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/i_addrinfo.c b/src/i_addrinfo.c index 5dcea1002..49aadf27d 100644 --- a/src/i_addrinfo.c +++ b/src/i_addrinfo.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2011-2021 by Sonic Team Junior. +// Copyright (C) 2011-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/i_addrinfo.h b/src/i_addrinfo.h index 397a1969d..592e693f4 100644 --- a/src/i_addrinfo.h +++ b/src/i_addrinfo.h @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2011-2021 by Sonic Team Junior. +// Copyright (C) 2011-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/i_joy.h b/src/i_joy.h index 0c7c8dd3f..27584cea6 100644 --- a/src/i_joy.h +++ b/src/i_joy.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/i_net.h b/src/i_net.h index dbc82db65..62b7528d5 100644 --- a/src/i_net.h +++ b/src/i_net.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/i_sound.h b/src/i_sound.h index e38a17626..6358fbefb 100644 --- a/src/i_sound.h +++ b/src/i_sound.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/i_system.h b/src/i_system.h index a2dd81cca..27fcdeb3f 100644 --- a/src/i_system.h +++ b/src/i_system.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/i_tcp.c b/src/i_tcp.c index cae97a7d1..8838ba725 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/i_tcp.h b/src/i_tcp.h index 785734415..b6e5b9235 100644 --- a/src/i_tcp.h +++ b/src/i_tcp.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/i_threads.h b/src/i_threads.h index bc752181f..c7b71d26c 100644 --- a/src/i_threads.h +++ b/src/i_threads.h @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by James R. +// Copyright (C) 2020-2022 by James R. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/i_video.h b/src/i_video.h index 2d07fcf10..638fcb668 100644 --- a/src/i_video.h +++ b/src/i_video.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/info.c b/src/info.c index 20f0dfe4f..7260caf52 100644 --- a/src/info.c +++ b/src/info.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/info.h b/src/info.h index 0539f0b12..5e088619b 100644 --- a/src/info.h +++ b/src/info.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/keys.h b/src/keys.h index b19259320..df12c95ae 100644 --- a/src/keys.h +++ b/src/keys.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_baselib.c b/src/lua_baselib.c index e12ec146d..120ab671e 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_blockmaplib.c b/src/lua_blockmaplib.c index 9089d19b6..8c63a9d6d 100644 --- a/src/lua_blockmaplib.c +++ b/src/lua_blockmaplib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2016-2021 by Iestyn "Monster Iestyn" Jealous. -// Copyright (C) 2016-2021 by Sonic Team Junior. +// Copyright (C) 2016-2022 by Iestyn "Monster Iestyn" Jealous. +// Copyright (C) 2016-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_consolelib.c b/src/lua_consolelib.c index 2b8cad69b..c8e914e6d 100644 --- a/src/lua_consolelib.c +++ b/src/lua_consolelib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_hook.h b/src/lua_hook.h index 531d16288..fc6a5f4ee 100644 --- a/src/lua_hook.h +++ b/src/lua_hook.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index d5f1cf25e..81f863e03 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_hud.h b/src/lua_hud.h index c1d2d164b..ad2b51d3e 100644 --- a/src/lua_hud.h +++ b/src/lua_hud.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2014-2016 by John "JTE" Muniz. -// Copyright (C) 2014-2021 by Sonic Team Junior. +// Copyright (C) 2014-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 0dd951efd..c7f2bbc28 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2014-2016 by John "JTE" Muniz. -// Copyright (C) 2014-2021 by Sonic Team Junior. +// Copyright (C) 2014-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_infolib.c b/src/lua_infolib.c index af2d99a0c..ac41de419 100644 --- a/src/lua_infolib.c +++ b/src/lua_infolib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_inputlib.c b/src/lua_inputlib.c index 661d93641..1710b0355 100644 --- a/src/lua_inputlib.c +++ b/src/lua_inputlib.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2021 by Sonic Team Junior. +// Copyright (C) 2021-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_libs.h b/src/lua_libs.h index 8903834e8..b4a891edb 100644 --- a/src/lua_libs.h +++ b/src/lua_libs.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_maplib.c b/src/lua_maplib.c index 04e6fde8d..23a293d6b 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_mathlib.c b/src/lua_mathlib.c index bd9218a3d..c7501da60 100644 --- a/src/lua_mathlib.c +++ b/src/lua_mathlib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_mobjlib.c b/src/lua_mobjlib.c index cf8ccab2c..953b39000 100644 --- a/src/lua_mobjlib.c +++ b/src/lua_mobjlib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index 1c634da45..58cfab76c 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_polyobjlib.c b/src/lua_polyobjlib.c index 5d76a912d..e254b0e4a 100644 --- a/src/lua_polyobjlib.c +++ b/src/lua_polyobjlib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Iestyn "Monster Iestyn" Jealous. -// Copyright (C) 2020-2021 by Sonic Team Junior. +// Copyright (C) 2020-2022 by Iestyn "Monster Iestyn" Jealous. +// Copyright (C) 2020-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_script.c b/src/lua_script.c index a1376ca2e..a36e5bf98 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_script.h b/src/lua_script.h index e88256941..e586b04a8 100644 --- a/src/lua_script.h +++ b/src/lua_script.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_skinlib.c b/src/lua_skinlib.c index e66a379e9..9c7c4ad03 100644 --- a/src/lua_skinlib.c +++ b/src/lua_skinlib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2014-2016 by John "JTE" Muniz. -// Copyright (C) 2014-2021 by Sonic Team Junior. +// Copyright (C) 2014-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_taglib.c b/src/lua_taglib.c index d0cf385a9..b69416362 100644 --- a/src/lua_taglib.c +++ b/src/lua_taglib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by James R. -// Copyright (C) 2020-2021 by Sonic Team Junior. +// Copyright (C) 2020-2022 by James R. +// Copyright (C) 2020-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/lua_thinkerlib.c b/src/lua_thinkerlib.c index 65bf8c313..963fdbd5a 100644 --- a/src/lua_thinkerlib.c +++ b/src/lua_thinkerlib.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by John "JTE" Muniz. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_aatree.c b/src/m_aatree.c index b228ed63d..522e38a53 100644 --- a/src/m_aatree.c +++ b/src/m_aatree.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_aatree.h b/src/m_aatree.h index 5a240394f..ed011644e 100644 --- a/src/m_aatree.h +++ b/src/m_aatree.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_anigif.c b/src/m_anigif.c index fe04a5cb4..b3a1d0fe2 100644 --- a/src/m_anigif.c +++ b/src/m_anigif.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 2013-2016 by Matthew "Kaito Sinclaire" Walsh. // Copyright (C) 2013 by "Ninji". -// Copyright (C) 2013-2021 by Sonic Team Junior. +// Copyright (C) 2013-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_anigif.h b/src/m_anigif.h index ca7563b1e..ad64dff7b 100644 --- a/src/m_anigif.h +++ b/src/m_anigif.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2013-2016 by Matthew "Kaito Sinclaire" Walsh. -// Copyright (C) 2013-2021 by Sonic Team Junior. +// Copyright (C) 2013-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_argv.c b/src/m_argv.c index 453d6e45c..1444f0c38 100644 --- a/src/m_argv.c +++ b/src/m_argv.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_argv.h b/src/m_argv.h index f39db513f..cdb6aa246 100644 --- a/src/m_argv.h +++ b/src/m_argv.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_bbox.c b/src/m_bbox.c index e0505fd95..7fde0c171 100644 --- a/src/m_bbox.c +++ b/src/m_bbox.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_bbox.h b/src/m_bbox.h index c56bd22c0..588000fae 100644 --- a/src/m_bbox.h +++ b/src/m_bbox.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_cheat.c b/src/m_cheat.c index ef896c991..82d0b9d5a 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_cheat.h b/src/m_cheat.h index ee4ba5f55..c22e262fb 100644 --- a/src/m_cheat.h +++ b/src/m_cheat.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_cond.c b/src/m_cond.c index 85d732a48..1406317c5 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by Matthew "Kaito Sinclaire" Walsh. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_cond.h b/src/m_cond.h index b2c6d65e6..f36c80009 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2012-2016 by Matthew "Kaito Sinclaire" Walsh. -// Copyright (C) 2012-2021 by Sonic Team Junior. +// Copyright (C) 2012-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_dllist.h b/src/m_dllist.h index 65303b4a3..d8ca6648a 100644 --- a/src/m_dllist.h +++ b/src/m_dllist.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2005 by James Haley -// Copyright (C) 2005-2021 by Sonic Team Junior. +// Copyright (C) 2005-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_easing.c b/src/m_easing.c index c871d3106..0f1cc1d02 100644 --- a/src/m_easing.c +++ b/src/m_easing.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Jaime "Lactozilla" Passos. +// Copyright (C) 2020-2022 by Jaime "Lactozilla" Passos. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_easing.h b/src/m_easing.h index 435ad35e7..229222a15 100644 --- a/src/m_easing.h +++ b/src/m_easing.h @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Jaime "Lactozilla" Passos. +// Copyright (C) 2020-2022 by Jaime "Lactozilla" Passos. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_fixed.c b/src/m_fixed.c index d40ccd98e..70b7623da 100644 --- a/src/m_fixed.c +++ b/src/m_fixed.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_fixed.h b/src/m_fixed.h index 1cf2f00d1..fe5efc551 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_menu.c b/src/m_menu.c index 3c1d8d7ca..5b85f65df 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3,7 +3,7 @@ // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. // Copyright (C) 2011-2016 by Matthew "Kaito Sinclaire" Walsh. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_menu.h b/src/m_menu.h index ba9c326a0..5d2ef69ec 100644 --- a/src/m_menu.h +++ b/src/m_menu.h @@ -3,7 +3,7 @@ // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. // Copyright (C) 2011-2016 by Matthew "Kaito Sinclaire" Walsh. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_misc.c b/src/m_misc.c index 59783d5d3..d7d6d6bbb 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_misc.h b/src/m_misc.h index 82ccd58c7..5b79c6c8c 100644 --- a/src/m_misc.h +++ b/src/m_misc.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_perfstats.c b/src/m_perfstats.c index 439a9da1c..3edbd4196 100644 --- a/src/m_perfstats.c +++ b/src/m_perfstats.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Sonic Team Junior. +// Copyright (C) 2020-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_perfstats.h b/src/m_perfstats.h index 3ff0e6c6b..f6a7c1f74 100644 --- a/src/m_perfstats.h +++ b/src/m_perfstats.h @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Sonic Team Junior. +// Copyright (C) 2020-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_queue.c b/src/m_queue.c index a337ca4ce..2cc3f7cb8 100644 --- a/src/m_queue.c +++ b/src/m_queue.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2003 by James Haley -// Copyright (C) 2003-2021 by Sonic Team Junior. +// Copyright (C) 2003-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_queue.h b/src/m_queue.h index cc64b8dd7..071f9d8fa 100644 --- a/src/m_queue.h +++ b/src/m_queue.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2003 by James Haley -// Copyright (C) 2003-2021 by Sonic Team Junior. +// Copyright (C) 2003-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_random.c b/src/m_random.c index 2e6213e12..112795500 100644 --- a/src/m_random.c +++ b/src/m_random.c @@ -3,7 +3,7 @@ // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. // Copyright (C) 2012-2016 by Matthew "Kaito Sinclaire" Walsh. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_random.h b/src/m_random.h index df10b4bb3..aa5ffb0bb 100644 --- a/src/m_random.h +++ b/src/m_random.h @@ -3,7 +3,7 @@ // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. // Copyright (C) 2012-2016 by Matthew "Kaito Sinclaire" Walsh. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/m_swap.h b/src/m_swap.h index 6aa347d97..df5f3e907 100644 --- a/src/m_swap.h +++ b/src/m_swap.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/mserv.c b/src/mserv.c index ff62f2cdc..bff562c95 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -1,8 +1,8 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. -// Copyright (C) 2020-2021 by James R. +// Copyright (C) 1999-2022 by Sonic Team Junior. +// Copyright (C) 2020-2022 by James R. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/mserv.h b/src/mserv.h index 7a3b3d8ec..23b26fbc5 100644 --- a/src/mserv.h +++ b/src/mserv.h @@ -1,8 +1,8 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. -// Copyright (C) 2020-2021 by James R. +// Copyright (C) 1999-2022 by Sonic Team Junior. +// Copyright (C) 2020-2022 by James R. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_ceilng.c b/src/p_ceilng.c index e28f9b5b1..50344ee0c 100644 --- a/src/p_ceilng.c +++ b/src/p_ceilng.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_enemy.c b/src/p_enemy.c index 0a3edc8bb..d091e303c 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_floor.c b/src/p_floor.c index dd9331e73..5536ee913 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_inter.c b/src/p_inter.c index b37689fd8..7c36bf477 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -470,14 +470,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (!(player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)) { fixed_t setmomz = -toucher->momz; // Store this, momz get changed by P_DoJump within P_DoBubbleBounce - + if (elementalpierce == 2) // Reset bubblewrap, part 1 P_DoBubbleBounce(player); toucher->momz = setmomz; if (elementalpierce == 2) // Reset bubblewrap, part 2 { boolean underwater = toucher->eflags & MFE_UNDERWATER; - + if (underwater) toucher->momz /= 2; toucher->momz -= (toucher->momz/(underwater ? 8 : 4)); // Cap the height! @@ -1387,7 +1387,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (player->bot && player->bot != BOT_MPAI) return; - + // Initialize my junk junk.tags.tags = NULL; junk.tags.count = 0; @@ -1617,7 +1617,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (special->tracer && !(special->tracer->flags2 & MF2_STRONGBOX)) macespin = true; - + if (macespin ? (player->powers[pw_ignorelatch] & (1<<15)) : (player->powers[pw_ignorelatch])) return; diff --git a/src/p_lights.c b/src/p_lights.c index 1e41146da..d7bbea90c 100644 --- a/src/p_lights.c +++ b/src/p_lights.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_local.h b/src/p_local.h index 38c7f5d13..ba8cbe166 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_map.c b/src/p_map.c index ce1e793ff..8cd0223d0 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_maputl.c b/src/p_maputl.c index efcebe736..43a7e92a1 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_maputl.h b/src/p_maputl.h index cec344d03..b7779d88a 100644 --- a/src/p_maputl.h +++ b/src/p_maputl.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_mobj.c b/src/p_mobj.c index 04e02f847..c99b6293f 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_mobj.h b/src/p_mobj.h index 2d096385b..b1b79fd82 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -251,7 +251,7 @@ typedef enum MFE_FORCENOSUPER = 1<<13, // Makes an object use super sprites where they wouldn't have otherwise and vice-versa MFE_REVERSESUPER = MFE_FORCESUPER|MFE_FORCENOSUPER - + // free: to and including 1<<15 } mobjeflag_t; diff --git a/src/p_polyobj.c b/src/p_polyobj.c index 6431e4624..0ccb6ebde 100644 --- a/src/p_polyobj.c +++ b/src/p_polyobj.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2006 by James Haley -// Copyright (C) 2006-2021 by Sonic Team Junior. +// Copyright (C) 2006-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_polyobj.h b/src/p_polyobj.h index 7c814e0bf..4cc1221db 100644 --- a/src/p_polyobj.h +++ b/src/p_polyobj.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2006 by James Haley -// Copyright (C) 2006-2021 by Sonic Team Junior. +// Copyright (C) 2006-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_pspr.h b/src/p_pspr.h index 27002b713..4136c2118 100644 --- a/src/p_pspr.h +++ b/src/p_pspr.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_saveg.c b/src/p_saveg.c index 722340f41..99ec58bb9 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_saveg.h b/src/p_saveg.h index a909282fe..9f4a2633f 100644 --- a/src/p_saveg.h +++ b/src/p_saveg.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_setup.c b/src/p_setup.c index 5f2a63e79..a1c96bed3 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_setup.h b/src/p_setup.h index c3c680fdd..9cb44ed59 100644 --- a/src/p_setup.h +++ b/src/p_setup.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_sight.c b/src/p_sight.c index 706745f35..1aa231a6c 100644 --- a/src/p_sight.c +++ b/src/p_sight.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_slopes.c b/src/p_slopes.c index bfca153a6..ffbfef2d3 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2004 by Stephen McGranahan -// Copyright (C) 2015-2021 by Sonic Team Junior. +// Copyright (C) 2015-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_slopes.h b/src/p_slopes.h index 43cd3edb0..d1a053d28 100644 --- a/src/p_slopes.h +++ b/src/p_slopes.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2004 by Stephen McGranahan -// Copyright (C) 2015-2021 by Sonic Team Junior. +// Copyright (C) 2015-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_spec.c b/src/p_spec.c index 459ee80a9..fa590b5cb 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -2093,7 +2093,7 @@ void P_SwitchWeather(INT32 weathernum) { case PRECIP_SNOW: // snow curWeather = PRECIP_SNOW; - + if (purge) P_SpawnPrecipitation(); diff --git a/src/p_spec.h b/src/p_spec.h index 3b8abfcf8..75954abe2 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_telept.c b/src/p_telept.c index 6bac5ad20..cbbd0ff6b 100644 --- a/src/p_telept.c +++ b/src/p_telept.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_tick.c b/src/p_tick.c index 55a16fd81..28ace9288 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_tick.h b/src/p_tick.h index ae481c6a2..d355bc6d7 100644 --- a/src/p_tick.h +++ b/src/p_tick.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/p_user.c b/src/p_user.c index bbd268fc4..1f14d96c1 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_bsp.c b/src/r_bsp.c index b8559d39e..c9f269816 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_bsp.h b/src/r_bsp.h index 40d24ffec..88757cf4b 100644 --- a/src/r_bsp.h +++ b/src/r_bsp.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_data.c b/src/r_data.c index 2cfe9cb7a..51ed15dd6 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_data.h b/src/r_data.h index 7580a94ea..63772e7b0 100644 --- a/src/r_data.h +++ b/src/r_data.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_defs.h b/src/r_defs.h index fa63de400..c6467a970 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_draw.c b/src/r_draw.c index 65bb87bfb..e12d7ebdd 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_draw.h b/src/r_draw.h index 2576e1577..c96b29e30 100644 --- a/src/r_draw.h +++ b/src/r_draw.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_draw16.c b/src/r_draw16.c index 1a2fed773..763fd1631 100644 --- a/src/r_draw16.c +++ b/src/r_draw16.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_draw8.c b/src/r_draw8.c index 182182574..c9a9e9575 100644 --- a/src/r_draw8.c +++ b/src/r_draw8.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_draw8_npo2.c b/src/r_draw8_npo2.c index 90201c771..49ec28dd8 100644 --- a/src/r_draw8_npo2.c +++ b/src/r_draw8_npo2.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_local.h b/src/r_local.h index ba78ea87d..a5b590e5c 100644 --- a/src/r_local.h +++ b/src/r_local.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_main.c b/src/r_main.c index 0d6a74a3b..13d2413fa 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_main.h b/src/r_main.h index 5f3bed980..c0edb31b3 100644 --- a/src/r_main.h +++ b/src/r_main.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_patch.c b/src/r_patch.c index 6827cd12c..e771e5c94 100644 --- a/src/r_patch.c +++ b/src/r_patch.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Jaime "Lactozilla" Passos. +// Copyright (C) 2020-2022 by Jaime "Lactozilla" Passos. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_patch.h b/src/r_patch.h index 96fbb0e28..26c28e1f9 100644 --- a/src/r_patch.h +++ b/src/r_patch.h @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Jaime "Lactozilla" Passos. +// Copyright (C) 2020-2022 by Jaime "Lactozilla" Passos. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_patchrotation.c b/src/r_patchrotation.c index 5dbc30286..b24e065ba 100644 --- a/src/r_patchrotation.c +++ b/src/r_patchrotation.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Jaime "Lactozilla" Passos. +// Copyright (C) 2020-2022 by Jaime "Lactozilla" Passos. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_patchrotation.h b/src/r_patchrotation.h index 689b7d411..e6bee80ed 100644 --- a/src/r_patchrotation.h +++ b/src/r_patchrotation.h @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by Jaime "Lactozilla" Passos. +// Copyright (C) 2020-2022 by Jaime "Lactozilla" Passos. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_picformats.c b/src/r_picformats.c index 5c81d1e02..6aa4659b9 100644 --- a/src/r_picformats.c +++ b/src/r_picformats.c @@ -2,8 +2,8 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 2005-2009 by Andrey "entryway" Budko. -// Copyright (C) 2018-2021 by Jaime "Lactozilla" Passos. -// Copyright (C) 2019-2021 by Sonic Team Junior. +// Copyright (C) 2018-2022 by Jaime "Lactozilla" Passos. +// Copyright (C) 2019-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_picformats.h b/src/r_picformats.h index c74f8a13a..573fb4946 100644 --- a/src/r_picformats.h +++ b/src/r_picformats.h @@ -1,8 +1,8 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. -// Copyright (C) 2018-2021 by Jaime "Lactozilla" Passos. -// Copyright (C) 2019-2021 by Sonic Team Junior. +// Copyright (C) 2018-2022 by Jaime "Lactozilla" Passos. +// Copyright (C) 2019-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_plane.c b/src/r_plane.c index 1f5c0192e..e31d52be9 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_plane.h b/src/r_plane.h index 862b95069..09648fead 100644 --- a/src/r_plane.h +++ b/src/r_plane.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_portal.c b/src/r_portal.c index cba98db05..4d4132133 100644 --- a/src/r_portal.c +++ b/src/r_portal.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_portal.h b/src/r_portal.h index 0effd07b5..687ee058f 100644 --- a/src/r_portal.h +++ b/src/r_portal.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_segs.c b/src/r_segs.c index 157cf466e..41ffa4103 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_segs.h b/src/r_segs.h index da7d44ad4..4075cc0bb 100644 --- a/src/r_segs.h +++ b/src/r_segs.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_skins.c b/src/r_skins.c index 86c0bbc54..cd53128d2 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_skins.h b/src/r_skins.h index a38997f4d..aeaa9f3e0 100644 --- a/src/r_skins.h +++ b/src/r_skins.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_sky.c b/src/r_sky.c index 041cccfc5..e21b7cbf1 100644 --- a/src/r_sky.c +++ b/src/r_sky.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_sky.h b/src/r_sky.h index f4356dcfa..31c821d22 100644 --- a/src/r_sky.h +++ b/src/r_sky.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_splats.c b/src/r_splats.c index 21048c46d..0a84a3a33 100644 --- a/src/r_splats.c +++ b/src/r_splats.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_splats.h b/src/r_splats.h index 7e31406d1..ec6885e26 100644 --- a/src/r_splats.h +++ b/src/r_splats.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_state.h b/src/r_state.h index 5a606ed8c..69989e7ac 100644 --- a/src/r_state.h +++ b/src/r_state.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_textures.c b/src/r_textures.c index 793e5237f..ff5c49675 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_textures.h b/src/r_textures.h index dd286b6ac..d9c2ab49b 100644 --- a/src/r_textures.h +++ b/src/r_textures.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_things.c b/src/r_things.c index 34a2dd336..5d752b6f7 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/r_things.h b/src/r_things.h index b4676fbbd..857b03b24 100644 --- a/src/r_things.h +++ b/src/r_things.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/s_sound.c b/src/s_sound.c index 76f0d67c1..7e61e8a55 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/s_sound.h b/src/s_sound.h index 8fcb816d9..6223c4fdb 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/screen.c b/src/screen.c index 770f1c802..73af4313d 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/screen.h b/src/screen.h index 67880e2b9..376953169 100644 --- a/src/screen.h +++ b/src/screen.h @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index ab63be946..9de632734 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -5,7 +5,7 @@ // // Copyright (C) 1993-1996 by id Software, Inc. // Portions Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 2014-2021 by Sonic Team Junior. +// Copyright (C) 2014-2022 by Sonic Team Junior. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/sdl/i_threads.c b/src/sdl/i_threads.c index f73d00bcf..a182ae197 100644 --- a/src/sdl/i_threads.c +++ b/src/sdl/i_threads.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2020-2021 by James R. +// Copyright (C) 2020-2022 by James R. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index ed766ff23..a27a5ebd2 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -4,7 +4,7 @@ // // Copyright (C) 1993-1996 by id Software, Inc. // Portions Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 2014-2021 by Sonic Team Junior. +// Copyright (C) 2014-2022 by Sonic Team Junior. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 35a79acc0..748cd374b 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2014-2021 by Sonic Team Junior. +// Copyright (C) 2014-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index bdc693ca5..67e98d4f5 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 2014-2021 by Sonic Team Junior. +// Copyright (C) 2014-2022 by Sonic Team Junior. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/sdl/ogl_sdl.h b/src/sdl/ogl_sdl.h index 8f87f688e..9744bc6f1 100644 --- a/src/sdl/ogl_sdl.h +++ b/src/sdl/ogl_sdl.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 2014-2021 by Sonic Team Junior. +// Copyright (C) 2014-2022 by Sonic Team Junior. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/sdl/sdl_sound.c b/src/sdl/sdl_sound.c index 058b601c3..0de3788fe 100644 --- a/src/sdl/sdl_sound.c +++ b/src/sdl/sdl_sound.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // // Copyright (C) 1993-1996 by id Software, Inc. -// Copyright (C) 2014-2021 by Sonic Team Junior. +// Copyright (C) 2014-2022 by Sonic Team Junior. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/sdl/sdlmain.h b/src/sdl/sdlmain.h index a9676b5c2..6b6e79d97 100644 --- a/src/sdl/sdlmain.h +++ b/src/sdl/sdlmain.h @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// Copyright (C) 2006-2021 by Sonic Team Junior. +// Copyright (C) 2006-2022 by Sonic Team Junior. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/sounds.c b/src/sounds.c index 4c5b11ee9..f7f3ad328 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/sounds.h b/src/sounds.h index 2dd37953c..eec518689 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/st_stuff.c b/src/st_stuff.c index f17b58fa6..6c9a0eeca 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/st_stuff.h b/src/st_stuff.h index b1ea2942d..c59bc2ac6 100644 --- a/src/st_stuff.h +++ b/src/st_stuff.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/strcasestr.c b/src/strcasestr.c index 1cbee286a..6a686d6dc 100644 --- a/src/strcasestr.c +++ b/src/strcasestr.c @@ -2,7 +2,7 @@ strcasestr -- case insensitive substring searching function. */ /* -Copyright 2019-2021 James R. +Copyright 2019-2022 James R. All rights reserved. Redistribution and use in source forms, with or without modification, is diff --git a/src/string.c b/src/string.c index f32025612..5534a3f0c 100644 --- a/src/string.c +++ b/src/string.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2006 by Graue. -// Copyright (C) 2006-2021 by Sonic Team Junior. +// Copyright (C) 2006-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/tables.c b/src/tables.c index 9263f42d3..13949b6a7 100644 --- a/src/tables.c +++ b/src/tables.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/tables.h b/src/tables.h index baa3adf36..c44c7d525 100644 --- a/src/tables.h +++ b/src/tables.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/taglist.c b/src/taglist.c index d08750f9b..6b50a51ab 100644 --- a/src/taglist.c +++ b/src/taglist.c @@ -1,8 +1,8 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. -// Copyright (C) 2020-2021 by Nev3r. +// Copyright (C) 1999-2022 by Sonic Team Junior. +// Copyright (C) 2020-2022 by Nev3r. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/taglist.h b/src/taglist.h index ae1a81c89..d326ef357 100644 --- a/src/taglist.h +++ b/src/taglist.h @@ -1,8 +1,8 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. -// Copyright (C) 2020-2021 by Nev3r. +// Copyright (C) 1999-2022 by Sonic Team Junior. +// Copyright (C) 2020-2022 by Nev3r. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/tmap.nas b/src/tmap.nas index 5bf28359e..f096c8141 100644 --- a/src/tmap.nas +++ b/src/tmap.nas @@ -1,7 +1,7 @@ ;; SONIC ROBO BLAST 2 ;;----------------------------------------------------------------------------- ;; Copyright (C) 1998-2000 by DooM Legacy Team. -;; Copyright (C) 1999-2021 by Sonic Team Junior. +;; Copyright (C) 1999-2022 by Sonic Team Junior. ;; ;; This program is free software distributed under the ;; terms of the GNU General Public License, version 2. diff --git a/src/tmap.s b/src/tmap.s index 62dcf85dc..5bb2dea12 100644 --- a/src/tmap.s +++ b/src/tmap.s @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/tmap_asm.s b/src/tmap_asm.s index b5a0a51e9..8e307f42b 100644 --- a/src/tmap_asm.s +++ b/src/tmap_asm.s @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/tmap_mmx.nas b/src/tmap_mmx.nas index 8b6ef91a6..5312f3c76 100644 --- a/src/tmap_mmx.nas +++ b/src/tmap_mmx.nas @@ -1,7 +1,7 @@ ;; SONIC ROBO BLAST 2 ;;----------------------------------------------------------------------------- ;; Copyright (C) 1998-2000 by DOSDOOM. -;; Copyright (C) 2010-2021 by Sonic Team Junior. +;; Copyright (C) 2010-2022 by Sonic Team Junior. ;; ;; This program is free software distributed under the ;; terms of the GNU General Public License, version 2. diff --git a/src/tmap_vc.nas b/src/tmap_vc.nas index b6ee26e6b..44b2d2e7b 100644 --- a/src/tmap_vc.nas +++ b/src/tmap_vc.nas @@ -1,7 +1,7 @@ ;; SONIC ROBO BLAST 2 ;;----------------------------------------------------------------------------- ;; Copyright (C) 1998-2000 by DooM Legacy Team. -;; Copyright (C) 1999-2021 by Sonic Team Junior. +;; Copyright (C) 1999-2022 by Sonic Team Junior. ;; ;; This program is free software distributed under the ;; terms of the GNU General Public License, version 2. diff --git a/src/v_video.c b/src/v_video.c index 4e17a4497..da725f78a 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/v_video.h b/src/v_video.h index bcb39706e..2831230a3 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/vid_copy.s b/src/vid_copy.s index 6a3788356..8e43e23c1 100644 --- a/src/vid_copy.s +++ b/src/vid_copy.s @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/w_wad.c b/src/w_wad.c index b594912f1..cf954a55e 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/w_wad.h b/src/w_wad.h index a41ba1724..f099b9fd2 100644 --- a/src/w_wad.h +++ b/src/w_wad.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/win32/Srb2win.rc b/src/win32/Srb2win.rc index 0a280448b..730f0a395 100644 --- a/src/win32/Srb2win.rc +++ b/src/win32/Srb2win.rc @@ -97,7 +97,7 @@ BEGIN VALUE "FileDescription", "Sonic Robo Blast 2\0" VALUE "FileVersion", VERSIONSTRING_RC VALUE "InternalName", "srb2\0" - VALUE "LegalCopyright", "Copyright 1998-2021 by Sonic Team Junior\0" + VALUE "LegalCopyright", "Copyright 1998-2022 by Sonic Team Junior\0" VALUE "LegalTrademarks", "Sonic the Hedgehog and related characters are trademarks of Sega.\0" VALUE "OriginalFilename", "srb2win.exe\0" VALUE "PrivateBuild", "\0" @@ -128,4 +128,3 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED - diff --git a/src/y_inter.c b/src/y_inter.c index 288a821e6..34e58494f 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2004-2021 by Sonic Team Junior. +// Copyright (C) 2004-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/y_inter.h b/src/y_inter.h index 871142858..74183066e 100644 --- a/src/y_inter.h +++ b/src/y_inter.h @@ -1,6 +1,6 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- -// Copyright (C) 2004-2021 by Sonic Team Junior. +// Copyright (C) 2004-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/z_zone.c b/src/z_zone.c index 34ff3d37e..b949730e3 100644 --- a/src/z_zone.c +++ b/src/z_zone.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2006 by Graue. -// Copyright (C) 2006-2021 by Sonic Team Junior. +// Copyright (C) 2006-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. diff --git a/src/z_zone.h b/src/z_zone.h index 17f572a90..d7e1ed528 100644 --- a/src/z_zone.h +++ b/src/z_zone.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2021 by Sonic Team Junior. +// Copyright (C) 1999-2022 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. From 8c1991d6746a38462adb7a9e073afb3751304726 Mon Sep 17 00:00:00 2001 From: aiire <1050-aiire@users.noreply.git.do.srb2.org> Date: Fri, 4 Mar 2022 02:57:45 +0000 Subject: [PATCH 80/98] added FF_FULLBRIGHT to S_IVSP --- src/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.c b/src/info.c index 20f0dfe4f..d21c881de 100644 --- a/src/info.c +++ b/src/info.c @@ -2941,7 +2941,7 @@ state_t states[NUMSTATES] = {SPR_SSPK, FF_ANIMATE, -1, {NULL}, 1, 2, S_NULL}, // S_THUNDERCOIN_SPARK // Invincibility Sparkles - {SPR_IVSP, FF_ANIMATE, 32, {NULL}, 31, 1, S_NULL}, // S_IVSP + {SPR_IVSP, FF_ANIMATE|FF_FULLBRIGHT, 32, {NULL}, 31, 1, S_NULL}, // S_IVSP // Super Sonic Spark {SPR_SSPK, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_SSPK2}, // S_SSPK1 From 6040f97dd583f64b6611751a13101b47ab1a2420 Mon Sep 17 00:00:00 2001 From: aiire <1050-aiire@users.noreply.git.do.srb2.org> Date: Fri, 4 Mar 2022 23:25:25 +0000 Subject: [PATCH 81/98] added FF_FULLBRIGHT to S_THUNDERCOIN_SPARK --- src/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.c b/src/info.c index d21c881de..73cf22184 100644 --- a/src/info.c +++ b/src/info.c @@ -2938,7 +2938,7 @@ state_t states[NUMSTATES] = {SPR_NULL, 0, 15*2, {NULL}, 0, 0, S_ZAPSB2 }, // S_ZAPSB11 // Thunder spark - {SPR_SSPK, FF_ANIMATE, -1, {NULL}, 1, 2, S_NULL}, // S_THUNDERCOIN_SPARK + {SPR_SSPK, FF_ANIMATE|FF_FULLBRIGHT, -1, {NULL}, 1, 2, S_NULL}, // S_THUNDERCOIN_SPARK // Invincibility Sparkles {SPR_IVSP, FF_ANIMATE|FF_FULLBRIGHT, 32, {NULL}, 31, 1, S_NULL}, // S_IVSP From 77d4f873b01988dd72a9c5b26980af5691b9952a Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 6 Mar 2022 12:20:41 +0100 Subject: [PATCH 82/98] Add upper bound to emblemlocations[] access. --- src/p_inter.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index b37689fd8..2ac498085 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -470,14 +470,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (!(player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)) { fixed_t setmomz = -toucher->momz; // Store this, momz get changed by P_DoJump within P_DoBubbleBounce - + if (elementalpierce == 2) // Reset bubblewrap, part 1 P_DoBubbleBounce(player); toucher->momz = setmomz; if (elementalpierce == 2) // Reset bubblewrap, part 2 { boolean underwater = toucher->eflags & MFE_UNDERWATER; - + if (underwater) toucher->momz /= 2; toucher->momz -= (toucher->momz/(underwater ? 8 : 4)); // Cap the height! @@ -738,12 +738,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) // Secret emblem thingy case MT_EMBLEM: { - if (demoplayback || (player->bot && player->bot != BOT_MPAI)) + if (demoplayback || (player->bot && player->bot != BOT_MPAI) || special->health > MAXEMBLEMS) return; emblemlocations[special->health-1].collected = true; M_UpdateUnlockablesAndExtraEmblems(); - G_SaveGameData(); break; } @@ -1387,7 +1386,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (player->bot && player->bot != BOT_MPAI) return; - + // Initialize my junk junk.tags.tags = NULL; junk.tags.count = 0; @@ -1617,7 +1616,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (special->tracer && !(special->tracer->flags2 & MF2_STRONGBOX)) macespin = true; - + if (macespin ? (player->powers[pw_ignorelatch] & (1<<15)) : (player->powers[pw_ignorelatch])) return; From 098fcaa4b096bd2a67801732222429b125b20978 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 6 Mar 2022 20:22:22 +0100 Subject: [PATCH 83/98] 2.2.10 --- appveyor.yml | 2 +- assets/CMakeLists.txt | 3 +-- src/config.h.in | 7 ++++--- src/d_main.c | 5 +---- src/doomdef.h | 2 +- src/version.h | 8 ++++---- src/win32/Srb2win.rc | 4 ++-- 7 files changed, 14 insertions(+), 17 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b9f84f395..348b727b1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 2.2.9.{branch}-{build} +version: 2.2.10.{branch}-{build} os: MinGW environment: diff --git a/assets/CMakeLists.txt b/assets/CMakeLists.txt index 3ea7c28df..ef228759c 100644 --- a/assets/CMakeLists.txt +++ b/assets/CMakeLists.txt @@ -22,8 +22,7 @@ set(SRB2_ASSET_INSTALL ON set(SRB2_ASSET_HASHED "srb2.pk3;\ player.dta;\ -zones.pk3;\ -patch.pk3" +zones.pk3" CACHE STRING "Asset filenames to apply MD5 checks. No spaces between entries!" ) diff --git a/src/config.h.in b/src/config.h.in index db794cccc..587a881c7 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -35,10 +35,11 @@ * Last updated 2020 / 09 / 27 - v2.2.7 - patch.pk3 * Last updated 2020 / 10 / 02 - v2.2.8 - patch.pk3 * Last updated 2021 / 05 / 06 - v2.2.9 - patch.pk3 & zones.pk3 + * Last updated 2022 / 03 / 06 - v2.2.10 - main assets */ -#define ASSET_HASH_SRB2_PK3 "0277c9416756627004e83cbb5b2e3e28" -#define ASSET_HASH_ZONES_PK3 "f8f3e2b5deacf40f14e36686a07d44bb" -#define ASSET_HASH_PLAYER_DTA "49dad7b24634c89728cc3e0b689e12bb" +#define ASSET_HASH_SRB2_PK3 "ad911f29a28a18968ee5b2d11c2acb39" +#define ASSET_HASH_ZONES_PK3 "86ae55cae4e0a93ceda868635706a093" +#define ASSET_HASH_PLAYER_DTA "2e7aaae8a6b1b77d90ffe7606ceadb6c" #ifdef USE_PATCH_DTA #define ASSET_HASH_PATCH_PK3 "7d467a883f7887b3c311798ee2f56b6a" #endif diff --git a/src/d_main.c b/src/d_main.c index eb82280bc..fa9e21337 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1102,10 +1102,7 @@ static void IdentifyVersion(void) } MUSICTEST("music.dta") - MUSICTEST("patch_music.pk3") -#ifdef DEVELOP // remove when music_new.dta is merged into music.dta - MUSICTEST("music_new.dta") -#endif + //MUSICTEST("patch_music.pk3") } #endif } diff --git a/src/doomdef.h b/src/doomdef.h index d38886296..3b9eeb193 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -150,7 +150,7 @@ extern char logfilename[1024]; // Does this version require an added patch file? // Comment or uncomment this as necessary. -#define USE_PATCH_DTA +// #define USE_PATCH_DTA // Enforce a limit of loaded WAD files. //#define ENFORCE_WAD_LIMIT diff --git a/src/version.h b/src/version.h index 28fc71c36..7a12fbbbe 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ -#define SRB2VERSION "2.2.9"/* this must be the first line, for cmake !! */ +#define SRB2VERSION "2.2.10"/* this must be the first line, for cmake !! */ // The Modification ID; must be obtained from a Master Server Admin ( https://mb.srb2.org/members/?key=ms_admin ). // DO NOT try to set this otherwise, or your modification will be unplayable through the Master Server. @@ -9,7 +9,7 @@ // it's only for detection of the version the player is using so the MS can alert them of an update. // Only set it higher, not lower, obviously. // Note that we use this to help keep internal testing in check; this is why v2.2.0 is not version "1". -#define MODVERSION 50 +#define MODVERSION 51 -// Define this as a prerelease version suffix -// #define BETAVERSION "RC1" +// Define this as a prerelease version suffix (pre#, RC#) +// #define BETAVERSION "pre1" diff --git a/src/win32/Srb2win.rc b/src/win32/Srb2win.rc index 730f0a395..83948ac81 100644 --- a/src/win32/Srb2win.rc +++ b/src/win32/Srb2win.rc @@ -76,8 +76,8 @@ END #include "../doomdef.h" // Needed for version string VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,2,9,0 - PRODUCTVERSION 2,2,9,0 + FILEVERSION 2,2,10,0 + PRODUCTVERSION 2,2,10,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 82fb731cab932a8ecbf9382b3fd160425e652423 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 6 Mar 2022 22:52:43 +0100 Subject: [PATCH 84/98] :dramahog: --- src/p_inter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_inter.c b/src/p_inter.c index 601f2677b..582cdb0d0 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -738,7 +738,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) // Secret emblem thingy case MT_EMBLEM: { - if (demoplayback || (player->bot && player->bot != BOT_MPAI) || special->health > MAXEMBLEMS) + if (demoplayback || (player->bot && player->bot != BOT_MPAI) || special->health <= 0 || special->health > MAXEMBLEMS) return; emblemlocations[special->health-1].collected = true; From 86336d6bed80bee6f8168078aa8856109091e50f Mon Sep 17 00:00:00 2001 From: katsy Date: Mon, 7 Mar 2022 18:33:15 -0600 Subject: [PATCH 85/98] remove MODID check from hooklib to fix compile issue --- src/lua_hooklib.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index 81f863e03..48980f4a4 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -246,7 +246,6 @@ int LUA_HookLib(lua_State *L) } /* TODO: remove in next backwards incompatible release */ -#if MODID == 18 int lib_hudadd(lua_State *L);/* yeah compiler */ int lib_hudadd(lua_State *L) { @@ -260,7 +259,6 @@ int lib_hudadd(lua_State *L) return 0; } -#endif typedef struct Hook_State Hook_State; typedef void (*Hook_Callback)(Hook_State *); From b161cb4588edbcc16fe38a0772d9380f6dc65301 Mon Sep 17 00:00:00 2001 From: katsy <205-katsy@users.noreply.git.do.srb2.org> Date: Tue, 8 Mar 2022 01:06:01 +0000 Subject: [PATCH 86/98] e --- src/Makefile.d/features.mk | 150 ++++++++++++++++++------------------- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/src/Makefile.d/features.mk b/src/Makefile.d/features.mk index 46194390d..8ba33383b 100644 --- a/src/Makefile.d/features.mk +++ b/src/Makefile.d/features.mk @@ -1,75 +1,75 @@ -# -# Makefile for feature flags. -# - -passthru_opts+=\ - NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ - MOBJCONSISTANCY PACKETDROP ZDEBUG\ - HAVE_MINIUPNPC\ - -# build with debugging information -ifdef DEBUGMODE -PACKETDROP=1 -opts+=-DPARANOIA -DRANGECHECK -endif - -ifndef NOHW -opts+=-DHWRENDER -sources+=$(call List,hardware/Sourcefile) -endif - -ifndef NOASM -ifndef NONX86 -sources+=tmap.nas tmap_mmx.nas -opts+=-DUSEASM -endif -endif - -ifndef NOMD5 -sources+=md5.c -endif - -ifndef NOZLIB -ifndef NOPNG -ifdef PNG_PKGCONFIG -$(eval $(call Use_pkg_config,PNG_PKGCONFIG)) -else -PNG_CONFIG?=$(call Prefix,libpng-config) -$(eval $(call Configure,PNG,$(PNG_CONFIG) \ - $(if $(PNG_STATIC),--static),,--ldflags)) -endif -ifdef LINUX -opts+=-D_LARGFILE64_SOURCE -endif -opts+=-DHAVE_PNG -sources+=apng.c -endif -endif - -ifndef NONET -ifndef NOCURL -CURLCONFIG?=curl-config -$(eval $(call Configure,CURL,$(CURLCONFIG))) -opts+=-DHAVE_CURL -endif -endif - -ifdef HAVE_MINIUPNPC -libs+=-lminiupnpc -endif - -# (Valgrind is a memory debugger.) -ifdef VALGRIND -VALGRIND_PKGCONFIG?=valgrind -$(eval $(call Use_pkg_config,VALGRIND)) -ZDEBUG=1 -opts+=-DHAVE_VALGRIND -endif - -default_packages:=\ - GME/libgme/LIBGME\ - OPENMPT/libopenmpt/LIBOPENMPT\ - ZLIB/zlib\ - -$(foreach p,$(default_packages),\ - $(eval $(call Check_pkg_config,$(p)))) +# +# Makefile for feature flags. +# + +passthru_opts+=\ + NONET NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ + MOBJCONSISTANCY PACKETDROP ZDEBUG\ + HAVE_MINIUPNPC\ + +# build with debugging information +ifdef DEBUGMODE +PACKETDROP=1 +opts+=-DPARANOIA -DRANGECHECK +endif + +ifndef NOHW +opts+=-DHWRENDER +sources+=$(call List,hardware/Sourcefile) +endif + +ifndef NOASM +ifndef NONX86 +sources+=tmap.nas tmap_mmx.nas +opts+=-DUSEASM +endif +endif + +ifndef NOMD5 +sources+=md5.c +endif + +ifndef NOZLIB +ifndef NOPNG +ifdef PNG_PKGCONFIG +$(eval $(call Use_pkg_config,PNG_PKGCONFIG)) +else +PNG_CONFIG?=$(call Prefix,libpng-config) +$(eval $(call Configure,PNG,$(PNG_CONFIG) \ + $(if $(PNG_STATIC),--static),,--ldflags)) +endif +ifdef LINUX +opts+=-D_LARGEFILE64_SOURCE +endif +opts+=-DHAVE_PNG +sources+=apng.c +endif +endif + +ifndef NONET +ifndef NOCURL +CURLCONFIG?=curl-config +$(eval $(call Configure,CURL,$(CURLCONFIG))) +opts+=-DHAVE_CURL +endif +endif + +ifdef HAVE_MINIUPNPC +libs+=-lminiupnpc +endif + +# (Valgrind is a memory debugger.) +ifdef VALGRIND +VALGRIND_PKGCONFIG?=valgrind +$(eval $(call Use_pkg_config,VALGRIND)) +ZDEBUG=1 +opts+=-DHAVE_VALGRIND +endif + +default_packages:=\ + GME/libgme/LIBGME\ + OPENMPT/libopenmpt/LIBOPENMPT\ + ZLIB/zlib\ + +$(foreach p,$(default_packages),\ + $(eval $(call Check_pkg_config,$(p)))) From 6ef7221e38fa0f68a53936b0e841a8145ebd6f25 Mon Sep 17 00:00:00 2001 From: spherallic Date: Wed, 9 Mar 2022 00:49:24 +0100 Subject: [PATCH 87/98] A few drop shadow-related additions: - Added A_SetShadowScale - Added A_ShadowScream which combines the above with A_Scream, used for badnik explosions - Gave flickies drop shadows --- src/deh_tables.c | 2 ++ src/info.c | 26 +++++++++++++------------- src/info.h | 4 ++++ src/p_enemy.c | 41 +++++++++++++++++++++++++++++++++++++++++ src/p_mobj.c | 23 ++++++++++++++++++++++- 5 files changed, 82 insertions(+), 14 deletions(-) diff --git a/src/deh_tables.c b/src/deh_tables.c index 4412206f8..8dbe314cc 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -91,6 +91,8 @@ actionpointer_t actionpointers[] = {{A_FaceTracer}, "A_FACETRACER"}, {{A_Scream}, "A_SCREAM"}, {{A_BossDeath}, "A_BOSSDEATH"}, + {{A_SetShadowScale}, "A_SETSHADOWSCALE"}, + {{A_ShadowScream}, "A_SHADOWSCREAM"}, {{A_CustomPower}, "A_CUSTOMPOWER"}, {{A_GiveWeapon}, "A_GIVEWEAPON"}, {{A_RingBox}, "A_RINGBOX"}, diff --git a/src/info.c b/src/info.c index 3f0f5361f..717ada313 100644 --- a/src/info.c +++ b/src/info.c @@ -3936,23 +3936,23 @@ state_t states[NUMSTATES] = {SPR_SPRK, FF_TRANS20|FF_ANIMATE|9, 18, {NULL}, 8, 2, S_NULL}, // S_SPRK3 // Robot Explosion - {SPR_BOM1, 0, 0, {A_FlickySpawn}, 0, 0, S_XPLD1}, // S_XPLD_FLICKY - {SPR_BOM1, 0, 2, {A_Scream}, 0, 0, S_XPLD2}, // S_XPLD1 - {SPR_BOM1, 1, 2, {NULL}, 0, 0, S_XPLD3}, // S_XPLD2 - {SPR_BOM1, 2, 3, {NULL}, 0, 0, S_XPLD4}, // S_XPLD3 - {SPR_BOM1, 3, 3, {NULL}, 0, 0, S_XPLD5}, // S_XPLD4 - {SPR_BOM1, 4, 4, {NULL}, 0, 0, S_XPLD6}, // S_XPLD5 - {SPR_BOM1, 5, 4, {NULL}, 0, 0, S_NULL}, // S_XPLD6 + {SPR_BOM1, 0, 0, {A_FlickySpawn}, 0, 0, S_XPLD1}, // S_XPLD_FLICKY + {SPR_BOM1, 0, 2, {A_ShadowScream}, 0, 0, S_XPLD2}, // S_XPLD1 + {SPR_BOM1, 1, 2, {NULL}, 0, 0, S_XPLD3}, // S_XPLD2 + {SPR_BOM1, 2, 3, {NULL}, 0, 0, S_XPLD4}, // S_XPLD3 + {SPR_BOM1, 3, 3, {NULL}, 0, 0, S_XPLD5}, // S_XPLD4 + {SPR_BOM1, 4, 4, {NULL}, 0, 0, S_XPLD6}, // S_XPLD5 + {SPR_BOM1, 5, 4, {NULL}, 0, 0, S_NULL}, // S_XPLD6 {SPR_BOM1, FF_ANIMATE, 21, {NULL}, 5, 4, S_INVISIBLE}, // S_XPLD_EGGTRAP // Underwater Explosion - {SPR_BOM4, 0, 3, {A_Scream}, 0, 0, S_WPLD2}, // S_WPLD1 - {SPR_BOM4, 1, 3, {NULL}, 0, 0, S_WPLD3}, // S_WPLD2 - {SPR_BOM4, 2, 3, {NULL}, 0, 0, S_WPLD4}, // S_WPLD3 - {SPR_BOM4, 3, 3, {NULL}, 0, 0, S_WPLD5}, // S_WPLD4 - {SPR_BOM4, 4, 3, {NULL}, 0, 0, S_WPLD6}, // S_WPLD5 - {SPR_BOM4, 5, 3, {NULL}, 0, 0, S_NULL}, // S_WPLD6 + {SPR_BOM4, 0, 3, {A_ShadowScream}, 0, 0, S_WPLD2}, // S_WPLD1 + {SPR_BOM4, 1, 3, {NULL}, 0, 0, S_WPLD3}, // S_WPLD2 + {SPR_BOM4, 2, 3, {NULL}, 0, 0, S_WPLD4}, // S_WPLD3 + {SPR_BOM4, 3, 3, {NULL}, 0, 0, S_WPLD5}, // S_WPLD4 + {SPR_BOM4, 4, 3, {NULL}, 0, 0, S_WPLD6}, // S_WPLD5 + {SPR_BOM4, 5, 3, {NULL}, 0, 0, S_NULL}, // S_WPLD6 {SPR_DUST, FF_TRANS40, 4, {NULL}, 0, 0, S_DUST2}, // S_DUST1 {SPR_DUST, 1|FF_TRANS50, 5, {NULL}, 0, 0, S_DUST3}, // S_DUST2 diff --git a/src/info.h b/src/info.h index 9aa26a97a..1b7a201ce 100644 --- a/src/info.h +++ b/src/info.h @@ -44,6 +44,8 @@ enum actionnum A_FACETRACER, A_SCREAM, A_BOSSDEATH, + A_SETSHADOWSCALE, + A_SHADOWSCREAM, A_CUSTOMPOWER, A_GIVEWEAPON, A_RINGBOX, @@ -312,6 +314,8 @@ void A_FaceTarget(); void A_FaceTracer(); void A_Scream(); void A_BossDeath(); +void A_SetShadowScale(); +void A_ShadowScream(); // MARIA!!!!!! void A_CustomPower(); // Use this for a custom power void A_GiveWeapon(); // Gives the player weapon(s) void A_RingBox(); // Obtained Ring Box Tails diff --git a/src/p_enemy.c b/src/p_enemy.c index 26682ee32..a4ba42c48 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -107,6 +107,8 @@ void A_GoldMonitorRestore(mobj_t *actor); void A_GoldMonitorSparkle(mobj_t *actor); void A_Explode(mobj_t *actor); void A_BossDeath(mobj_t *actor); +void A_SetShadowScale(mobj_t *actor); +void A_ShadowScream(mobj_t *actor); void A_CustomPower(mobj_t *actor); void A_GiveWeapon(mobj_t *actor); void A_RingBox(mobj_t *actor); @@ -4169,6 +4171,45 @@ bossjustdie: } } +// Function: A_SetShadowScale +// +// Description: Sets the target's shadowscale. +// +// var1 = new fixed_t shadowscale (default = FRACUNIT) +// var2 = unused +// +void A_SetShadowScale(mobj_t *actor) +{ + INT32 locvar1 = var1; + INT32 locvar2 = var2; + + if (LUA_CallAction(A_SETSHADOWSCALE, actor)) + return; + + actor->shadowscale = locvar1; +} + + +// Function: A_ShadowScream +// +// Description: Sets the target's shadowscale and starts the death sound of the object. +// +// var1 = new fixed_t shadowscale (default = FRACUNIT) +// var2 = unused +// +void A_ShadowScream(mobj_t *actor) +{ + INT32 locvar1 = var1; + INT32 locvar2 = var2; + + if (LUA_CallAction(A_SHADOWSCREAM, actor)) + return; + + A_SetShadowScale(actor); + A_Scream(actor); +} + + // Function: A_CustomPower // // Description: Provides a custom powerup. Target (must be a player) is awarded the powerup. Reactiontime of the object is used as an index to the powers array. diff --git a/src/p_mobj.c b/src/p_mobj.c index 17be0300a..301b7564d 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10456,6 +10456,27 @@ static fixed_t P_DefaultMobjShadowScale (mobj_t *thing) return 2*FRACUNIT/3; + case MT_FLICKY_01: + case MT_FLICKY_02: + case MT_FLICKY_03: + case MT_FLICKY_04: + case MT_FLICKY_05: + case MT_FLICKY_06: + case MT_FLICKY_07: + case MT_FLICKY_08: + case MT_FLICKY_09: + case MT_FLICKY_10: + case MT_FLICKY_11: + case MT_FLICKY_12: + case MT_FLICKY_13: + case MT_FLICKY_14: + case MT_FLICKY_15: + case MT_FLICKY_16: + case MT_SECRETFLICKY_01: + case MT_SECRETFLICKY_02: + + return FRACUNIT; + default: if (thing->flags & (MF_ENEMY|MF_BOSS)) @@ -10477,7 +10498,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) if (type == MT_NULL) { -#if 0 +#if 0 #ifdef PARANOIA I_Error("Tried to spawn MT_NULL\n"); #endif From 3eaae066ef891d9f81d5f787e88f89d89b5af4d5 Mon Sep 17 00:00:00 2001 From: SteelT Date: Tue, 8 Mar 2022 21:06:01 -0500 Subject: [PATCH 88/98] Show overall grade emblem requirement of a multi-mare NiGHTS stage in SP pause menu Fixes #71 --- src/m_menu.c | 2 +- src/p_setup.c | 11 +++++++++++ src/p_setup.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/m_menu.c b/src/m_menu.c index 5b85f65df..fdff4a0a1 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4751,7 +4751,7 @@ static void M_DrawPauseMenu(void) emblemslot = 2; break; case ET_NGRADE: - snprintf(targettext, 9, "%u", P_GetScoreForGrade(gamemap, 0, emblem->var)); + snprintf(targettext, 9, "%u", P_GetScoreForGradeOverall(gamemap, emblem->var)); snprintf(currenttext, 9, "%u", G_GetBestNightsScore(gamemap, 0)); targettext[8] = 0; diff --git a/src/p_setup.c b/src/p_setup.c index a1c96bed3..bdcb3b217 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -508,6 +508,17 @@ UINT32 P_GetScoreForGrade(INT16 map, UINT8 mare, UINT8 grade) return mapheaderinfo[map-1]->grades[mare].grade[grade-1]; } +UINT32 P_GetScoreForGradeOverall(INT16 map, UINT8 grade) +{ + UINT8 mares; + INT32 i; + UINT32 score = 0; + mares = mapheaderinfo[map-1]->numGradedMares; + for (i = 0; i < mares; ++i) + score += P_GetScoreForGrade(map, i, grade); + return score; +} + // // levelflats // diff --git a/src/p_setup.h b/src/p_setup.h index 9cb44ed59..d0c47a521 100644 --- a/src/p_setup.h +++ b/src/p_setup.h @@ -122,5 +122,6 @@ void P_AddGradesForMare(INT16 i, UINT8 mare, char *gtext); UINT8 P_GetGrade(UINT32 pscore, INT16 map, UINT8 mare); UINT8 P_HasGrades(INT16 map, UINT8 mare); UINT32 P_GetScoreForGrade(INT16 map, UINT8 mare, UINT8 grade); +UINT32 P_GetScoreForGradeOverall(INT16 map, UINT8 grade); #endif From c782e817007dddc868f2104aa84b751f9ef89294 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sat, 12 Mar 2022 17:44:37 +0100 Subject: [PATCH 89/98] Give MT_METALSONIC_RACE a drop shadow & removed unused vars. --- src/p_enemy.c | 4 ---- src/p_mobj.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index a4ba42c48..87aa5ff2f 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -4181,7 +4181,6 @@ bossjustdie: void A_SetShadowScale(mobj_t *actor) { INT32 locvar1 = var1; - INT32 locvar2 = var2; if (LUA_CallAction(A_SETSHADOWSCALE, actor)) return; @@ -4199,9 +4198,6 @@ void A_SetShadowScale(mobj_t *actor) // void A_ShadowScream(mobj_t *actor) { - INT32 locvar1 = var1; - INT32 locvar2 = var2; - if (LUA_CallAction(A_SHADOWSCREAM, actor)) return; diff --git a/src/p_mobj.c b/src/p_mobj.c index 301b7564d..ad329a582 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10412,6 +10412,7 @@ static fixed_t P_DefaultMobjShadowScale (mobj_t *thing) switch (thing->type) { case MT_PLAYER: + case MT_METALSONIC_RACE: case MT_ROLLOUTROCK: case MT_EGGMOBILE4_MACE: From bd2d763bd0529458e711d8de02844bbe961d1cbb Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 13 Mar 2022 12:34:17 +0100 Subject: [PATCH 90/98] Fix Minus & debris behavior in reverse gravity. --- src/p_mobj.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 17be0300a..9f8b11e7a 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -7864,7 +7864,8 @@ static void P_MobjSceneryThink(mobj_t *mobj) case MT_WOODDEBRIS: case MT_BRICKDEBRIS: case MT_BROKENROBOT: - if (mobj->z <= P_FloorzAtPos(mobj->x, mobj->y, mobj->z, mobj->height) + if (((!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z <= P_FloorzAtPos(mobj->x, mobj->y, mobj->z, mobj->height)) + || (mobj->eflags & MFE_VERTICALFLIP && mobj->z + mobj->height >= P_CeilingzAtPos(mobj->x, mobj->y, mobj->z, mobj->height))) && mobj->state != &states[mobj->info->deathstate]) { P_SetMobjState(mobj, mobj->info->deathstate); @@ -9723,7 +9724,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj) if (P_IsObjectOnGround(mobj)) mobj->rollangle = 0; else - mobj->rollangle = R_PointToAngle2(0, 0, mobj->momz, (mobj->scale << 1) - min(abs(mobj->momz), mobj->scale << 1)); + mobj->rollangle = R_PointToAngle2(0, 0, P_MobjFlip(mobj)*mobj->momz, (mobj->scale << 1) - min(abs(mobj->momz), mobj->scale << 1)); break; case MT_SPINFIRE: if (mobj->flags & MF_NOGRAVITY) From 65d47ba35539a4b620c8de747f055e771d4953e9 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 13 Mar 2022 13:33:46 +0100 Subject: [PATCH 91/98] Update README.txt --- assets/README.txt | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/assets/README.txt b/assets/README.txt index 8d2fefa54..e84fa4b5e 100644 --- a/assets/README.txt +++ b/assets/README.txt @@ -1,24 +1,21 @@ SONIC ROBO BLAST 2 -Sonic Robo Blast 2 (SRB2) is a 3D Sonic the Hedgehog fangame based on a -modified version of Doom Legacy. +Sonic Robo Blast 2 (SRB2) is a 3D Sonic the Hedgehog fangame, based on a modified version of Doom Legacy. + +https://srb2.org LICENSE -The source code for SRB2 is licensed under the GNU General Public -License, Version 2. See LICENSE.txt for the full text of this license. +The source code for SRB2 is licensed under the GNU General Public License, Version 2. See LICENSE.txt for the full text of this license. -SRB2 uses various third-party libraries, including SDL, SDL Mixer, and -their dependencies. See LICENSE-3RD-PARTY.txt for the licenses of these -libraries. +SRB2 uses various third-party libraries, including SDL, SDL Mixer, and their dependencies. See LICENSE-3RD-PARTY.txt for the licenses of these libraries. SOURCE CODE -You may obtain the source code for SRB2, including the source code for -specific version releases, at the following web sites: +You may obtain the source code for SRB2, including the source code for specific version releases, at the following web sites: STJr GitLab: -https://git.magicalgirl.moe/STJr/SRB2 +https://git.do.srb2.org/STJr/SRB2 GitHub: https://github.com/STJr/SRB2 @@ -27,25 +24,25 @@ CONTACT You may contact Sonic Team Junior via the following web sites: -SRB2.ORG: -https://www.srb2.org - SRB2 Message Board: https://mb.srb2.org SRB2 Official Discord: -https://discord.gg/pYDXzpX (13+) +https://discord.gg/b3BGb8A + +Twitter: +https://twitter.com/SonicTeamJr + +Facebook: +https://facebook.com/SonicRoboBlast2 + COPYRIGHT AND DISCLAIMER -Design and content on SRB2 is copyright 1998-2019 by Sonic Team Junior. -All non-original material on SRB2.ORG is copyrighted by their -respective owners, and no copyright infringement is intended. The owner -of the SRB2.ORG domain is only acting as an ISP, and is therefore not -responsible for any content on SRB2.ORG under the 1998 DMCA. This -site, its webmaster, and its staff make no profit whatsoever (in fact, -we lose money). Sonic Team Junior assumes no responsibility for the -content on any Sonic Team Junior fan sites. +Design and content in Sonic Robo Blast 2 is copyright 1998-2022 by Sonic Team Jr. -Sonic Team Junior is in no way affiliated with SEGA or Sonic Team. We do -not claim ownership of any of SEGA's intellectual property used in SRB2. +All original material in this game is copyrighted by their respective owners, and no copyright infringement is intended. Sonic Team Jr. is in no way affiliated with SEGA or Sonic Team, and we do not claim ownership of any of SEGA's intellectual property used in SRB2. + +Sonic Robo Blast 2 is not commercial software. If you purchased this game, you have been scammed! Sonic Team Jr.'s staff makes no profit whatsoever (in fact, we lose money). + +This software is provided as-is with no warranty whatsoever. From 29892a5f0c26f869e57587a524c9be1a02394c50 Mon Sep 17 00:00:00 2001 From: spherallic Date: Sun, 13 Mar 2022 14:22:22 +0100 Subject: [PATCH 92/98] Update README.txt again --- assets/README.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/README.txt b/assets/README.txt index e84fa4b5e..5480cb7b0 100644 --- a/assets/README.txt +++ b/assets/README.txt @@ -2,7 +2,7 @@ SONIC ROBO BLAST 2 Sonic Robo Blast 2 (SRB2) is a 3D Sonic the Hedgehog fangame, based on a modified version of Doom Legacy. -https://srb2.org +https://www.srb2.org LICENSE @@ -43,6 +43,8 @@ Design and content in Sonic Robo Blast 2 is copyright 1998-2022 by Sonic Team Jr All original material in this game is copyrighted by their respective owners, and no copyright infringement is intended. Sonic Team Jr. is in no way affiliated with SEGA or Sonic Team, and we do not claim ownership of any of SEGA's intellectual property used in SRB2. -Sonic Robo Blast 2 is not commercial software. If you purchased this game, you have been scammed! Sonic Team Jr.'s staff makes no profit whatsoever (in fact, we lose money). +Sonic Robo Blast 2 is not commercial software. If you purchased this game, you have been scammed! Sonic Team Jr.'s staff makes no profit whatsoever (in fact, we lose money). + +The owner of the srb2.org domain is only acting as an ISP, and is therefore not responsible for any content on srb2.org under the 1998 DMCA. Sonic Team Jr. assumes no responsibility for the content on any Sonic Team Jr. fan sites. This software is provided as-is with no warranty whatsoever. From 9769ad48e0a4da797ba0c3aa0fd97bf332dff7d7 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 15 Mar 2022 13:12:56 +0100 Subject: [PATCH 93/98] Prevent Hangsters from sliding across the ceiling. --- src/p_mobj.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 17be0300a..8cc91c18e 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8433,7 +8433,10 @@ static boolean P_HangsterThink(mobj_t *mobj) } //after swooping back up, check for ceiling else if ((st == S_HANGSTER_RETURN1 || st == S_HANGSTER_RETURN2) && mobj->momz == 0 && mobj->ceilingz == (mobj->z + mobj->height)) + { P_SetMobjState(mobj, (st = S_HANGSTER_RETURN3)); + mobj->momx = mobj->momy = 0; + } //should you roost on a ceiling with F_SKY1 as its flat, disappear forever if (st == S_HANGSTER_RETURN3 && mobj->momz == 0 && mobj->ceilingz == (mobj->z + mobj->height) @@ -10477,7 +10480,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) if (type == MT_NULL) { -#if 0 +#if 0 #ifdef PARANOIA I_Error("Tried to spawn MT_NULL\n"); #endif From bca90893d27423e176c9a6136c354a2e1faffdb5 Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Sun, 20 Mar 2022 09:52:47 +0100 Subject: [PATCH 94/98] Fix Ideya Capture sometimes stealing extra spheres Also clean up redundant "startingspheres" variable --- src/p_user.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 1f14d96c1..1b16064ca 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -6695,7 +6695,7 @@ static void P_NightsTransferPoints(player_t *player, fixed_t xspeed, fixed_t rad // static void P_DoNiGHTSCapsule(player_t *player) { - INT32 i, spherecount, totalduration, popduration, deductinterval, deductquantity, sphereresult, firstpoptic, startingspheres; + INT32 i, spherecount, totalduration, popduration, deductinterval, deductquantity, sphereresult, firstpoptic; INT32 tictimer = ++player->capsule->extravalue2; if (abs(player->mo->x-player->capsule->x) <= 3*FRACUNIT) @@ -6820,13 +6820,19 @@ static void P_DoNiGHTSCapsule(player_t *player) { player->spheres -= deductquantity; player->capsule->health -= deductquantity; + + // If spherecount isn't a multiple of deductquantity, the final deduction might steal too many spheres from the player + // E.g. with 80 capsule health, deductquantity is 3, 3*26 is 78, 78+3=81, and then it'll have stolen more than the 80 that it was meant to! + // So let's check for that and unsteal the extra ones ~Zwip-Zwap Zapony, 2022-20-03 + if (player->capsule->health < sphereresult) + { + player->spheres += sphereresult - player->capsule->health; // Give the player the "stolen" spheres back + player->capsule->health = sphereresult; // Un-deduct the capsule health by the "stolen" spheres. Often, this just sets it to 0 + } + + if (player->spheres < 0) // This probably can't happen, since we give the "stolen" spheres back, but better safe than sorry + player->spheres = 0; } - - if (player->spheres < 0) - player->spheres = 0; - - if (player->capsule->health < sphereresult) - player->capsule->health = sphereresult; } // Spawn a 'pop' for every 2 tics @@ -6847,9 +6853,8 @@ static void P_DoNiGHTSCapsule(player_t *player) } else { - startingspheres = player->spheres - player->capsule->health; + player->spheres -= player->capsule->health; player->capsule->health = 0; - player->spheres = startingspheres; } } From 7fdebdcdb9fb0cf2378543f8e8f54ae4714756a3 Mon Sep 17 00:00:00 2001 From: Zwip-Zwap Zapony Date: Sun, 20 Mar 2022 13:18:22 +0100 Subject: [PATCH 95/98] Suggested optimization --- src/p_user.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 1b16064ca..f2ff7efc6 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -6818,20 +6818,19 @@ static void P_DoNiGHTSCapsule(player_t *player) if (player->capsule->health > sphereresult && player->spheres > 0) { + // If spherecount isn't a multiple of deductquantity, the final deduction might steal too many spheres from the player + // E.g. with 80 capsule health, deductquantity is 3, 3*26 is 78, 78+3=81, and then it'll have stolen more than the 80 that it was meant to! + // So let's adjust deductquantity accordingly for the final deduction + deductquantity = min(deductquantity, player->capsule->health - sphereresult); + player->spheres -= deductquantity; player->capsule->health -= deductquantity; - // If spherecount isn't a multiple of deductquantity, the final deduction might steal too many spheres from the player - // E.g. with 80 capsule health, deductquantity is 3, 3*26 is 78, 78+3=81, and then it'll have stolen more than the 80 that it was meant to! - // So let's check for that and unsteal the extra ones ~Zwip-Zwap Zapony, 2022-20-03 - if (player->capsule->health < sphereresult) - { - player->spheres += sphereresult - player->capsule->health; // Give the player the "stolen" spheres back - player->capsule->health = sphereresult; // Un-deduct the capsule health by the "stolen" spheres. Often, this just sets it to 0 - } - - if (player->spheres < 0) // This probably can't happen, since we give the "stolen" spheres back, but better safe than sorry + if (player->spheres < 0) // This can't happen... without Lua, setrings, et cetera player->spheres = 0; + + //if (player->capsule->health < sphereresult) // This can't happen + //player->capsule->health = sphereresult; } } From 4f9ac9edb818fa0035738d449847d46b6efe1412 Mon Sep 17 00:00:00 2001 From: Lactozilla <73-LZA@users.noreply.git.do.srb2.org> Date: Mon, 21 Mar 2022 22:40:24 +0000 Subject: [PATCH 96/98] Drop shadow fake floor/ceiling fix --- src/hardware/hw_main.c | 33 +++++++++-- src/r_things.c | 126 +++++++++++++++++++++++++++-------------- 2 files changed, 110 insertions(+), 49 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index e0851af85..2bf7025ec 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3614,6 +3614,7 @@ static void HWR_DrawDropShadow(mobj_t *thing, fixed_t scale) FBITFIELD blendmode = PF_Translucent|PF_Modulated; INT32 shader = SHADER_DEFAULT; UINT8 i; + INT32 heightsec, phs; SINT8 flip = P_MobjFlip(thing); INT32 light; @@ -3626,7 +3627,23 @@ static void HWR_DrawDropShadow(mobj_t *thing, fixed_t scale) groundz = R_GetShadowZ(thing, &groundslope); - //if (abs(groundz - gl_viewz) / tz > 4) return; // Prevent stretchy shadows and possible crashes + heightsec = thing->subsector->sector->heightsec; + if (viewplayer->mo && viewplayer->mo->subsector) + phs = viewplayer->mo->subsector->sector->heightsec; + else + phs = -1; + + if (heightsec != -1 && phs != -1) // only clip things which are in special sectors + { + if (gl_viewz < FIXED_TO_FLOAT(sectors[phs].floorheight) ? + thing->z >= sectors[heightsec].floorheight : + thing->z < sectors[heightsec].floorheight) + return; + if (gl_viewz > FIXED_TO_FLOAT(sectors[phs].ceilingheight) ? + thing->z < sectors[heightsec].ceilingheight && gl_viewz >= FIXED_TO_FLOAT(sectors[heightsec].ceilingheight) : + thing->z >= sectors[heightsec].ceilingheight) + return; + } floordiff = abs((flip < 0 ? thing->height : 0) + thing->z - groundz); @@ -5259,13 +5276,19 @@ static void HWR_ProjectSprite(mobj_t *thing) if (heightsec != -1 && phs != -1) // only clip things which are in special sectors { + float top = gzt; + float bottom = FIXED_TO_FLOAT(thing->z); + + if (R_ThingIsFloorSprite(thing)) + top = bottom; + if (gl_viewz < FIXED_TO_FLOAT(sectors[phs].floorheight) ? - FIXED_TO_FLOAT(thing->z) >= FIXED_TO_FLOAT(sectors[heightsec].floorheight) : - gzt < FIXED_TO_FLOAT(sectors[heightsec].floorheight)) + bottom >= FIXED_TO_FLOAT(sectors[heightsec].floorheight) : + top < FIXED_TO_FLOAT(sectors[heightsec].floorheight)) return; if (gl_viewz > FIXED_TO_FLOAT(sectors[phs].ceilingheight) ? - gzt < FIXED_TO_FLOAT(sectors[heightsec].ceilingheight) && gl_viewz >= FIXED_TO_FLOAT(sectors[heightsec].ceilingheight) : - FIXED_TO_FLOAT(thing->z) >= FIXED_TO_FLOAT(sectors[heightsec].ceilingheight)) + top < FIXED_TO_FLOAT(sectors[heightsec].ceilingheight) && gl_viewz >= FIXED_TO_FLOAT(sectors[heightsec].ceilingheight) : + bottom >= FIXED_TO_FLOAT(sectors[heightsec].ceilingheight)) return; } diff --git a/src/r_things.c b/src/r_things.c index ea57e4086..6c510c68d 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1265,6 +1265,7 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale, vissprite_t *shadow; patch_t *patch; fixed_t xscale, yscale, shadowxscale, shadowyscale, shadowskew, x1, x2; + INT32 heightsec, phs; INT32 light = 0; fixed_t scalemul; UINT8 trans; fixed_t floordiff; @@ -1276,6 +1277,24 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale, if (abs(groundz-viewz)/tz > 4) return; // Prevent stretchy shadows and possible crashes + heightsec = thing->subsector->sector->heightsec; + if (viewplayer->mo && viewplayer->mo->subsector) + phs = viewplayer->mo->subsector->sector->heightsec; + else + phs = -1; + + if (heightsec != -1 && phs != -1) // only clip things which are in special sectors + { + if (viewz < sectors[phs].floorheight ? + groundz >= sectors[heightsec].floorheight : + groundz < sectors[heightsec].floorheight) + return; + if (viewz > sectors[phs].ceilingheight ? + groundz < sectors[heightsec].ceilingheight && viewz >= sectors[heightsec].ceilingheight : + groundz >= sectors[heightsec].ceilingheight) + return; + } + floordiff = abs((isflipped ? thing->height : 0) + thing->z - groundz); trans = floordiff / (100*FRACUNIT) + 3; @@ -1926,13 +1945,19 @@ static void R_ProjectSprite(mobj_t *thing) if (heightsec != -1 && phs != -1) // only clip things which are in special sectors { + fixed_t top = gzt; + fixed_t bottom = thing->z; + + if (splat) + top = bottom; + if (viewz < sectors[phs].floorheight ? - thing->z >= sectors[heightsec].floorheight : - gzt < sectors[heightsec].floorheight) + bottom >= sectors[heightsec].floorheight : + top < sectors[heightsec].floorheight) return; if (viewz > sectors[phs].ceilingheight ? - gzt < sectors[heightsec].ceilingheight && viewz >= sectors[heightsec].ceilingheight : - thing->z >= sectors[heightsec].ceilingheight) + top < sectors[heightsec].ceilingheight && viewz >= sectors[heightsec].ceilingheight : + bottom >= sectors[heightsec].ceilingheight) return; } @@ -2801,6 +2826,57 @@ static void R_DrawPrecipitationSprite(vissprite_t *spr) R_DrawPrecipitationVisSprite(spr); } +//SoM: 3/17/2000: Clip sprites in water. +static void R_HeightSecClip(vissprite_t *spr, INT32 x1, INT32 x2) +{ + fixed_t mh, h; + INT32 x, phs; + + if (spr->heightsec == -1) + return; + + if (spr->cut & (SC_SPLAT | SC_SHADOW) || spr->renderflags & RF_SHADOWDRAW) + return; + + phs = viewplayer->mo->subsector->sector->heightsec; + + if ((mh = sectors[spr->heightsec].floorheight) > spr->gz && + (h = centeryfrac - FixedMul(mh -= viewz, spr->sortscale)) >= 0 && + (h >>= FRACBITS) < viewheight) + { + if (mh <= 0 || (phs != -1 && viewz > sectors[phs].floorheight)) + { // clip bottom + for (x = x1; x <= x2; x++) + if (spr->clipbot[x] == -2 || h < spr->clipbot[x]) + spr->clipbot[x] = (INT16)h; + } + else // clip top + { + for (x = x1; x <= x2; x++) + if (spr->cliptop[x] == -2 || h > spr->cliptop[x]) + spr->cliptop[x] = (INT16)h; + } + } + + if ((mh = sectors[spr->heightsec].ceilingheight) < spr->gzt && + (h = centeryfrac - FixedMul(mh-viewz, spr->sortscale)) >= 0 && + (h >>= FRACBITS) < viewheight) + { + if (phs != -1 && viewz >= sectors[phs].ceilingheight) + { // clip bottom + for (x = x1; x <= x2; x++) + if (spr->clipbot[x] == -2 || h < spr->clipbot[x]) + spr->clipbot[x] = (INT16)h; + } + else // clip top + { + for (x = x1; x <= x2; x++) + if (spr->cliptop[x] == -2 || h > spr->cliptop[x]) + spr->cliptop[x] = (INT16)h; + } + } +} + // R_ClipVisSprite // Clips vissprites without drawing, so that portals can work. -Red void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, drawseg_t* dsstart, portal_t* portal) @@ -2902,47 +2978,9 @@ void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, drawseg_t* dsstart, p } } } - //SoM: 3/17/2000: Clip sprites in water. - if (spr->heightsec != -1) // only things in specially marked sectors - { - fixed_t mh, h; - INT32 phs = viewplayer->mo->subsector->sector->heightsec; - if ((mh = sectors[spr->heightsec].floorheight) > spr->gz && - (h = centeryfrac - FixedMul(mh -= viewz, spr->sortscale)) >= 0 && - (h >>= FRACBITS) < viewheight) - { - if (mh <= 0 || (phs != -1 && viewz > sectors[phs].floorheight)) - { // clip bottom - for (x = x1; x <= x2; x++) - if (spr->clipbot[x] == -2 || h < spr->clipbot[x]) - spr->clipbot[x] = (INT16)h; - } - else // clip top - { - for (x = x1; x <= x2; x++) - if (spr->cliptop[x] == -2 || h > spr->cliptop[x]) - spr->cliptop[x] = (INT16)h; - } - } - if ((mh = sectors[spr->heightsec].ceilingheight) < spr->gzt && - (h = centeryfrac - FixedMul(mh-viewz, spr->sortscale)) >= 0 && - (h >>= FRACBITS) < viewheight) - { - if (phs != -1 && viewz >= sectors[phs].ceilingheight) - { // clip bottom - for (x = x1; x <= x2; x++) - if (spr->clipbot[x] == -2 || h < spr->clipbot[x]) - spr->clipbot[x] = (INT16)h; - } - else // clip top - { - for (x = x1; x <= x2; x++) - if (spr->cliptop[x] == -2 || h > spr->cliptop[x]) - spr->cliptop[x] = (INT16)h; - } - } - } + R_HeightSecClip(spr, x1, x2); + if (spr->cut & SC_TOP && spr->cut & SC_BOTTOM) { for (x = x1; x <= x2; x++) From 8c62a0d640c4e556db8018ac93cac5fb9578ff37 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Tue, 22 Mar 2022 05:53:21 -0400 Subject: [PATCH 97/98] Fix papersprites being rotated incorrectly in Software when viewing them on the flipped side --- src/r_things.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/r_things.c b/src/r_things.c index 1179b9f4d..db4263a6a 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1611,7 +1611,16 @@ static void R_ProjectSprite(mobj_t *thing) if (thing->rollangle && !(splat && !(thing->renderflags & RF_NOSPLATROLLANGLE))) { - rollangle = R_GetRollAngle(thing->rollangle); + if (papersprite && ang >= ANGLE_180) + { + // Makes Software act much more sane like OpenGL + rollangle = R_GetRollAngle(InvAngle(thing->rollangle)); + } + else + { + rollangle = R_GetRollAngle(thing->rollangle); + } + rotsprite = Patch_GetRotatedSprite(sprframe, (thing->frame & FF_FRAMEMASK), rot, flip, false, sprinfo, rollangle); if (rotsprite != NULL) From 3581d06012de1eda92ae4b7ea49c3698244bef1c Mon Sep 17 00:00:00 2001 From: Jaime Ita Passos Date: Fri, 8 Apr 2022 16:01:41 -0300 Subject: [PATCH 98/98] Fix frame blend flags not working with 3D models --- src/hardware/hw_md2.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index d546e2f7f..e765656ca 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1346,12 +1346,18 @@ boolean HWR_DrawModel(gl_vissprite_t *spr) //if (tics > durs) //durs = tics; + INT32 blendmode; + if (spr->mobj->frame & FF_BLENDMASK) + blendmode = ((spr->mobj->frame & FF_BLENDMASK) >> FF_BLENDSHIFT) + 1; + else + blendmode = spr->mobj->blendmode; + if (spr->mobj->frame & FF_TRANSMASK) - Surf.PolyFlags = HWR_SurfaceBlend(spr->mobj->blendmode, (spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &Surf); + Surf.PolyFlags = HWR_SurfaceBlend(blendmode, (spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &Surf); else { Surf.PolyColor.s.alpha = (spr->mobj->flags2 & MF2_SHADOW) ? 0x40 : 0xff; - Surf.PolyFlags = HWR_GetBlendModeFlag(spr->mobj->blendmode); + Surf.PolyFlags = HWR_GetBlendModeFlag(blendmode); } // don't forget to enable the depth test because we can't do this