From 7795e146fa36959426539001a0176479146103c9 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 12 Aug 2016 15:56:07 +0100 Subject: [PATCH 01/23] Two seperate single-line fixes, both concerning the end of NiGHTS maps. * The NiGHTS drone had a single tic of visibility when you hit the goal, which is evident stepping frame by frame through http://gfycat.com/ComplicatedComposedAoudad (the contents of which may or may not make it into 2.2). * When completing a NiGHTS stage with a non-zero link, the link could flash up in the final few tics before the fade to black. This just checks for player->exiting to make sure it shouldn't be shown. --- src/p_mobj.c | 1 + src/st_stuff.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 62dee0a67..000022b1f 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -6931,6 +6931,7 @@ void P_MobjThinker(mobj_t *mobj) { mobj->flags &= ~MF_NOGRAVITY; P_SetMobjState(mobj, S_NIGHTSDRONE1); + mobj->flags2 |= MF2_DONTDRAW; } } else if (mobj->tracer && mobj->tracer->player) diff --git a/src/st_stuff.c b/src/st_stuff.c index aac6b09d2..5b208d33a 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -974,8 +974,8 @@ static void ST_drawNiGHTSHUD(void) if (cv_debug & DBG_NIGHTSBASIC) minlink = 0; - // Cheap hack: don't display when the score is showing - if (stplyr->texttimer && stplyr->textvar == 4) + // Cheap hack: don't display when the score is showing or you're exiting a map + if ((stplyr->exiting) || (stplyr->texttimer && stplyr->textvar == 4)) minlink = INT32_MAX; if (G_IsSpecialStage(gamemap)) From 104fc8ba98db280b3681198a52f693a8fe3d3e1d Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 12 Aug 2016 16:01:03 +0100 Subject: [PATCH 02/23] Partially reverted on Inu's reccomendation. --- src/st_stuff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 5b208d33a..06639d4f7 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -974,8 +974,8 @@ static void ST_drawNiGHTSHUD(void) if (cv_debug & DBG_NIGHTSBASIC) minlink = 0; - // Cheap hack: don't display when the score is showing or you're exiting a map - if ((stplyr->exiting) || (stplyr->texttimer && stplyr->textvar == 4)) + // Cheap hack: don't display when the score is showing (it popping up for a split second when exiting a map is intentional) + if (stplyr->texttimer && stplyr->textvar == 4) minlink = INT32_MAX; if (G_IsSpecialStage(gamemap)) From da23d93b00cece0ecd413c9090472dbfd6e6cafb Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 13 Aug 2016 10:03:17 -0400 Subject: [PATCH 03/23] Disable netplay for DirectDraw builds --- src/doomdef.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/doomdef.h b/src/doomdef.h index 66e649ee0..fb8ab1ca2 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -60,6 +60,7 @@ #endif #ifdef _WINDOWS +#define NONET #if !defined (HWRENDER) && !defined (NOHW) #define HWRENDER #endif From bdb5db878a7d62545743575c8420d1b2db3e9ce9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 13 Aug 2016 10:12:14 -0400 Subject: [PATCH 04/23] NONET should also disable UPNP support --- src/i_tcp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i_tcp.c b/src/i_tcp.c index eca218c80..f6212458b 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -56,7 +56,9 @@ //#define NONET #endif -#ifndef NONET +#ifdef NONET +#undef HAVE_MINIUPNPC +#else #ifdef USE_WINSOCK1 #include #elif !defined (SCOUW2) && !defined (SCOUW7) && !defined (__OS2__) From 50ce152c69fa11faef84cb51f215d787852d4742 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sun, 28 Aug 2016 13:19:17 +0100 Subject: [PATCH 05/23] Cleaned up some performance issues in Skytop Zone (2.1.16: THE SUGOI UPDATE) arising from some inefficiencies with P_GetMobjGravity. FPS drops only occasionally to 34 now, which is a big improvement when I was frequently getting 27 in Salt's 15andahalf.exe. --- src/p_mobj.c | 57 +++++++++++++++++++++------------------------------- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 62dee0a67..91451e06e 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1278,25 +1278,23 @@ fixed_t P_GetMobjGravity(mobj_t *mo) for (rover = mo->subsector->sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!((rover->flags & FF_EXISTS) && (P_InsideANonSolidFFloor(mo, rover)))) continue; - if (P_InsideANonSolidFFloor(mo, rover)) - { - if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER)) - goopgravity = true; - if (rover->master->frontsector->gravity) - { - gravityadd = -FixedMul(gravity, - (FixedDiv(*rover->master->frontsector->gravity>>FRACBITS, 1000))); + if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER)) + goopgravity = true; - if (rover->master->frontsector->verticalflip && gravityadd > 0) - mo->eflags |= MFE_VERTICALFLIP; + if (!(rover->master->frontsector->gravity)) + continue; - no3dfloorgrav = false; - break; - } - } + gravityadd = -FixedMul(gravity, + (FixedDiv(*rover->master->frontsector->gravity>>FRACBITS, 1000))); + + if (rover->master->frontsector->verticalflip && gravityadd > 0) + mo->eflags |= MFE_VERTICALFLIP; + + no3dfloorgrav = false; + break; } } @@ -1318,28 +1316,22 @@ fixed_t P_GetMobjGravity(mobj_t *mo) if (mo->player) { - if (mo->player->charability == CA_FLY && (mo->player->powers[pw_tailsfly] - || (mo->state >= &states[S_PLAY_SPC1] && mo->state <= &states[S_PLAY_SPC4]))) - gravityadd = gravityadd/3; // less gravity while flying - if (mo->player->pflags & PF_GLIDING) - gravityadd = gravityadd/3; // less gravity while gliding - if (mo->player->climbing) - gravityadd = 0; - if (mo->player->pflags & PF_NIGHTSMODE) + if ((mo->player->pflags & PF_GLIDING) + || (mo->player->charability == CA_FLY && (mo->player->powers[pw_tailsfly] + || (mo->state >= &states[S_PLAY_SPC1] && mo->state <= &states[S_PLAY_SPC4])))) + gravityadd = gravityadd/3; // less gravity while flying/gliding + if (mo->player->climbing || (mo->player->pflags & PF_NIGHTSMODE)) gravityadd = 0; { - UINT8 bits = 0; - if (mo->flags2 & MF2_OBJECTFLIP) - bits ^= 1; - if (mo->player->powers[pw_gravityboots]) - bits ^= 1; - if (bits & 1) + if (!!(mo->flags2 & MF2_OBJECTFLIP) != !!(mo->player->powers[pw_gravityboots])) { gravityadd = -gravityadd; mo->eflags ^= MFE_VERTICALFLIP; } } + if (!!(mo->eflags & MFE_VERTICALFLIP) != wasflip) + P_PlayerFlip(mo); } else { @@ -1347,10 +1339,10 @@ fixed_t P_GetMobjGravity(mobj_t *mo) if (mo->flags2 & MF2_OBJECTFLIP) { mo->eflags |= MFE_VERTICALFLIP; - if (gravityadd < 0) // Don't sink, only rise up - gravityadd *= -1; if (mo->z + mo->height >= mo->ceilingz) gravityadd = 0; + else if (gravityadd < 0) // Don't sink, only rise up + gravityadd *= -1; } else //Otherwise, sort through the other exceptions. { @@ -1396,9 +1388,6 @@ fixed_t P_GetMobjGravity(mobj_t *mo) if (goopgravity) gravityadd = -gravityadd/5; - if (mo->player && !!(mo->eflags & MFE_VERTICALFLIP) != wasflip) - P_PlayerFlip(mo); - gravityadd = FixedMul(gravityadd, mo->scale); return gravityadd; From c0f5f22b6a11d66f68ff72ba1127f640964dfacf Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sun, 28 Aug 2016 13:51:32 +0100 Subject: [PATCH 06/23] Suggested improvement by MI on irc. --- 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 91451e06e..a66e9cf7c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1278,7 +1278,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) for (rover = mo->subsector->sector->ffloors; rover; rover = rover->next) { - if (!((rover->flags & FF_EXISTS) && (P_InsideANonSolidFFloor(mo, rover)))) + if (!(rover->flags & FF_EXISTS) || !P_InsideANonSolidFFloor(mo, rover)) continue; if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER)) From 25ab97786285cc89a66b5f2c765b5632c85af905 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sun, 28 Aug 2016 14:06:20 +0100 Subject: [PATCH 07/23] ...didn't realise P_InsideANonSolidFFloor checks for FF_EXISTS itself, so HM --- 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 a66e9cf7c..7a96dfd53 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1278,7 +1278,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) for (rover = mo->subsector->sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !P_InsideANonSolidFFloor(mo, rover)) + if (!P_InsideANonSolidFFloor(mo, rover)) // P_InsideANonSolidFFloor checks for FF_EXISTS itself continue; if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER)) From e8775419d135a40ea549824fe90139c8d134cbc4 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sun, 28 Aug 2016 14:09:15 +0100 Subject: [PATCH 08/23] Removed now-irrelevant braces. --- src/p_mobj.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 7a96dfd53..547941e70 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1323,12 +1323,10 @@ fixed_t P_GetMobjGravity(mobj_t *mo) if (mo->player->climbing || (mo->player->pflags & PF_NIGHTSMODE)) gravityadd = 0; + if (!!(mo->flags2 & MF2_OBJECTFLIP) != !!(mo->player->powers[pw_gravityboots])) { - if (!!(mo->flags2 & MF2_OBJECTFLIP) != !!(mo->player->powers[pw_gravityboots])) - { - gravityadd = -gravityadd; - mo->eflags ^= MFE_VERTICALFLIP; - } + gravityadd = -gravityadd; + mo->eflags ^= MFE_VERTICALFLIP; } if (!!(mo->eflags & MFE_VERTICALFLIP) != wasflip) P_PlayerFlip(mo); From 3bad307e2d464eeae5d106183db6b7620c6e3bd7 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sun, 28 Aug 2016 20:46:56 +0100 Subject: [PATCH 09/23] Sorry, Inu. --- 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 547941e70..68f4f40f6 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1278,7 +1278,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) for (rover = mo->subsector->sector->ffloors; rover; rover = rover->next) { - if (!P_InsideANonSolidFFloor(mo, rover)) // P_InsideANonSolidFFloor checks for FF_EXISTS itself + if (!(rover->flags & FF_EXISTS) || !P_InsideANonSolidFFloor(mo, rover)) // P_InsideANonSolidFFloor checks for FF_EXISTS itself, but let's not always call this function continue; if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER)) From eae47c9808335c7177a85769a10f1ddaf58e59b5 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 1 Sep 2016 21:21:20 +0100 Subject: [PATCH 10/23] Fix Knuckles in 2D mode attempting to latch onto air when gliding into a slope. Now he just attempts to latch onto the slope directly (which I'll fix another time, if I can figure out how) (fix for SUGOI's Retro Hill Zone) --- src/p_user.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index f390650f4..4d8b6af1a 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -6976,6 +6976,7 @@ static void P_MovePlayer(player_t *player) msecnode_t *node; // only place it's being used in P_MovePlayer now fixed_t oldx; fixed_t oldy; + fixed_t floorz, ceilingz; oldx = player->mo->x; oldy = player->mo->y; @@ -6993,31 +6994,34 @@ static void P_MovePlayer(player_t *player) if (node->m_sector->ffloors) { ffloor_t *rover; + fixed_t topheight, bottomheight; for (rover = node->m_sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) continue; + if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER)) + continue; - if ((rover->flags & FF_BLOCKPLAYER)) + topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL); + bottomheight = P_GetFOFBottomZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL); + if (topheight > player->mo->z && bottomheight < player->mo->z) { - if (*rover->topheight > player->mo->z && *rover->bottomheight < player->mo->z) - { - P_ResetPlayer(player); - S_StartSound(player->mo, sfx_s3k4a); - player->climbing = 5; - player->mo->momx = player->mo->momy = player->mo->momz = 0; - break; - } + P_ResetPlayer(player); + S_StartSound(player->mo, sfx_s3k4a); + player->climbing = 5; + player->mo->momx = player->mo->momy = player->mo->momz = 0; + break; } } } - if (player->mo->z+player->mo->height > node->m_sector->ceilingheight + floorz = P_GetFloorZ(player->mo, node->m_sector, player->mo->x, player->mo->y, NULL); + ceilingz = P_GetCeilingZ(player->mo, node->m_sector, player->mo->x, player->mo->y, NULL); + + if (player->mo->z+player->mo->height > ceilingz && node->m_sector->ceilingpic == skyflatnum) continue; - if (node->m_sector->floorheight > player->mo->z - || node->m_sector->ceilingheight < player->mo->z) + if (floorz > player->mo->z || ceilingz < player->mo->z) { P_ResetPlayer(player); S_StartSound(player->mo, sfx_s3k4a); From 8f02c50c1068ee6440b0f8e180f2805f9f778062 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 2 Sep 2016 21:41:45 +0100 Subject: [PATCH 11/23] Fix players and pushables not accounting for slopes on bustable FOFs --- src/p_mobj.c | 19 +++++++++++-------- src/p_user.c | 22 +++++++++++++--------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index e1a1820af..9f4f2429c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1553,6 +1553,7 @@ static void P_PushableCheckBustables(mobj_t *mo) if (node->m_sector->ffloors) { ffloor_t *rover; + fixed_t topheight, bottomheight; for (rover = node->m_sector->ffloors; rover; rover = rover->next) { @@ -1565,37 +1566,39 @@ static void P_PushableCheckBustables(mobj_t *mo) if (!rover->master->frontsector->crumblestate) { + topheight = P_GetFOFTopZ(mo, node->m_sector, rover, mo->x, mo->y, NULL); + bottomheight = P_GetFOFBottomZ(mo, node->m_sector, rover, mo->x, mo->y, NULL); // Height checks if (rover->flags & FF_SHATTERBOTTOM) { - if (mo->z+mo->momz + mo->height < *rover->bottomheight) + if (mo->z+mo->momz + mo->height < bottomheight) continue; - if (mo->z+mo->height > *rover->bottomheight) + if (mo->z+mo->height > bottomheight) continue; } else if (rover->flags & FF_SPINBUST) { - if (mo->z+mo->momz > *rover->topheight) + if (mo->z+mo->momz > topheight) continue; - if (mo->z+mo->height < *rover->bottomheight) + if (mo->z+mo->height < bottomheight) continue; } else if (rover->flags & FF_SHATTER) { - if (mo->z+mo->momz > *rover->topheight) + if (mo->z+mo->momz > topheight) continue; - if (mo->z+mo->momz + mo->height < *rover->bottomheight) + if (mo->z+mo->momz + mo->height < bottomheight) continue; } else { - if (mo->z >= *rover->topheight) + if (mo->z >= topheight) continue; - if (mo->z+mo->height < *rover->bottomheight) + if (mo->z+mo->height < bottomheight) continue; } diff --git a/src/p_user.c b/src/p_user.c index 4d8b6af1a..3867137ad 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1692,6 +1692,7 @@ static void P_CheckBustableBlocks(player_t *player) if (node->m_sector->ffloors) { ffloor_t *rover; + fixed_t topheight, bottomheight; for (rover = node->m_sector->ffloors; rover; rover = rover->next) { @@ -1717,42 +1718,45 @@ static void P_CheckBustableBlocks(player_t *player) if (!(rover->flags & FF_SHATTER) && (rover->flags & FF_ONLYKNUX) && !(player->charability == CA_GLIDEANDCLIMB)) continue; + topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL); + bottomheight = P_GetFOFBottomZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL); + // Height checks if (rover->flags & FF_SHATTERBOTTOM) { - if (player->mo->z+player->mo->momz + player->mo->height < *rover->bottomheight) + if (player->mo->z+player->mo->momz + player->mo->height < bottomheight) continue; - if (player->mo->z+player->mo->height > *rover->bottomheight) + if (player->mo->z+player->mo->height > bottomheight) continue; } else if (rover->flags & FF_SPINBUST) { - if (player->mo->z+player->mo->momz > *rover->topheight) + if (player->mo->z+player->mo->momz > topheight) continue; - if (player->mo->z + player->mo->height < *rover->bottomheight) + if (player->mo->z + player->mo->height < bottomheight) continue; } else if (rover->flags & FF_SHATTER) { - if (player->mo->z + player->mo->momz > *rover->topheight) + if (player->mo->z + player->mo->momz > topheight) continue; - if (player->mo->z+player->mo->momz + player->mo->height < *rover->bottomheight) + if (player->mo->z+player->mo->momz + player->mo->height < bottomheight) continue; } else { - if (player->mo->z >= *rover->topheight) + if (player->mo->z >= topheight) continue; - if (player->mo->z + player->mo->height < *rover->bottomheight) + if (player->mo->z + player->mo->height < bottomheight) continue; } // Impede the player's fall a bit - if (((rover->flags & FF_SPINBUST) || (rover->flags & FF_SHATTER)) && player->mo->z >= *rover->topheight) + if (((rover->flags & FF_SPINBUST) || (rover->flags & FF_SHATTER)) && player->mo->z >= topheight) player->mo->momz >>= 1; else if (rover->flags & FF_SHATTER) { From a860c068d8852c531f1ae23a9fd8c53c2cdeb98b Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 2 Sep 2016 22:53:55 +0100 Subject: [PATCH 12/23] BONUS UNRELATED FIX: Fix FF_SHATTERBOTTOM FOFs acting like THZ goop when stood on --- src/p_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index d8c48fa4f..c4616db48 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1271,7 +1271,7 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) topheight = P_GetFOFTopZ(thing, newsubsec->sector, rover, x, y, NULL); bottomheight = P_GetFOFBottomZ(thing, newsubsec->sector, rover, x, y, NULL); - if (rover->flags & FF_GOOWATER && !(thing->flags & MF_NOGRAVITY)) + if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER) && !(thing->flags & MF_NOGRAVITY)) { // If you're inside goowater and slowing down fixed_t sinklevel = FixedMul(thing->info->height/6, thing->scale); From 6ff75d2aa1bd6f2aa32e8e5a65de2e7ce79525ec Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sat, 3 Sep 2016 21:37:52 +0100 Subject: [PATCH 13/23] Double negation becomes single negation, with handy comment! --- 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 68f4f40f6..eaef05aaa 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1323,7 +1323,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) if (mo->player->climbing || (mo->player->pflags & PF_NIGHTSMODE)) gravityadd = 0; - if (!!(mo->flags2 & MF2_OBJECTFLIP) != !!(mo->player->powers[pw_gravityboots])) + if (!(mo->flags2 & MF2_OBJECTFLIP) != !(mo->player->powers[pw_gravityboots])) // negated to turn numeric into bool - would be double negated, but not needed if both would be { gravityadd = -gravityadd; mo->eflags ^= MFE_VERTICALFLIP; From 5bb0b5684e822ed773fda46a1d1c6b6f61732df2 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sat, 3 Sep 2016 21:43:02 +0100 Subject: [PATCH 14/23] More irrelevant negation reduction, sorry. --- 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 eaef05aaa..6337730fb 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1328,7 +1328,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) gravityadd = -gravityadd; mo->eflags ^= MFE_VERTICALFLIP; } - if (!!(mo->eflags & MFE_VERTICALFLIP) != wasflip) + if (!(mo->eflags & MFE_VERTICALFLIP) == wasflip) P_PlayerFlip(mo); } else From 2d94256490d2c11fa91d0e9a05932cb508cc393b Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Sat, 3 Sep 2016 16:05:45 -0500 Subject: [PATCH 15/23] Shut the compiler up --- 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 6337730fb..0d7f88846 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1328,7 +1328,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) gravityadd = -gravityadd; mo->eflags ^= MFE_VERTICALFLIP; } - if (!(mo->eflags & MFE_VERTICALFLIP) == wasflip) + if (wasflip == !(mo->eflags & MFE_VERTICALFLIP)) // note!! == ! is not equivalent to != here - turns numeric into bool this way P_PlayerFlip(mo); } else From f1ab448442d9a8387634649de191c1be440b0cfa Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Sat, 3 Sep 2016 16:50:00 -0500 Subject: [PATCH 16/23] Readme rewrite --- README.md | 22 ++++++++ readme.txt | 155 ----------------------------------------------------- 2 files changed, 22 insertions(+), 155 deletions(-) create mode 100644 README.md delete mode 100644 readme.txt diff --git a/README.md b/README.md new file mode 100644 index 000000000..a357feea0 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +Sonic Robo Blast 2 +================== +[![Build status](https://ci.appveyor.com/api/projects/status/399d4hcw9yy7hg2y?svg=true)](https://ci.appveyor.com/project/STJr/srb2) [![Build status](https://travis-ci.org/STJr/SRB2.svg?branch=master)](https://travis-ci.org/STJr/SRB2) +================== + +[Sonic Robo Blast 2](https://srb2.org/) is a 3D Sonic the Hedgehog fangame based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/). + +## Dependencies +- NASM (x86 builds only) +- SDL2 (Linux/OS X only) +- SDL2-Mixer (Linux/OS X only) +- libupnp (Linux/OS X only) +- libgme (Linux/OS X only) + +Warning: 64-bit builds are not netgame compatible. Use at your own risk. + +## Compiling + +See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling) + +### Disclaimer +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. diff --git a/readme.txt b/readme.txt deleted file mode 100644 index c1898d491..000000000 --- a/readme.txt +++ /dev/null @@ -1,155 +0,0 @@ -Here it is! SRB2 v2.1.14 source code! -(why do we keep the version number up to date - when everything else in this file is hilariously old? - - Inuyasha) - - -Win32 with Visual C (6SP6+Processor Pack OR 7) -~~~ - -2 VC++ 6.0 project files are included: - -Win32/DirectX/FMOD -src\win32\wLegacy.dsw -You'll need FMOD to compile this version (www.fmod.org) -or -Win32/SDL/SDL_mixer -src\sdl\Win32SDL.dsp -You'll need SDL and SDL_mixer for this version (www.libsdl.org) - -Both needs NASM (http://sourceforge.net/projects/nasm) -For PNG screenshot, libPNG, and Zlib (from http://gnuwin32.sourceforge.net/) - -No warranty, support, etc. of any kind is offered, -just plain old as is. -Some bits of code are still really scary. -Go nuts! - - -Win32 with Dev-C++ (http://bloodshed.net/ free!) -~~~ -2 Dev-C++ project files are included: - -Win32/DirectX/FMOD -src\win32\SRB2.dev -or -Win32/SDL/SDL_mixer -src\sdl\Win32SDL.dev -You'll need SDL and SDL_mixer for this version (www.libsdl.org) -libPNG and Zlib (from http://gnuwin32.sourceforge.net/) -Note there are precompiled libpng.a and libz.a for Mingw - -you will need NASM for both SDL/SDL_mixer and DirectX/FMOD -and you need DirectX 6 (or up) Dev-Paks to compile DirectX version - -GNU/Linux -~~~ - -Dependencies: - SDL 1.2.7 or better (from libsdl.org) - SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org) - Nasm (use NOASM=1 if you don't have it or have an non-i386 system, I think) - libPNG 1.2.7 - Zlib 1.2.3 - The Xiph.org libogg and libvorbis libraries - The OpenGL headers (from Mesa, usually shipped with your X.org or XFree - installation, so you needn't worry, most likely) - GCC 3.x toolchain and binutils - GNU Make - -Build instructions: - -make -C src LINUX=1 - -Build instructions (64 bit): - -make -C src LINUX64=1 - -Build instructions to build for Wii Linux/SRB2Wii on a PowerPC system, -follow cross-compiling instructions for cross-compiling on a x86 system: - -make -C src LINUX=1 WIILINUX=1 - -Build instructions to build for Pandora (Linux) on a ARM system, -follow cross-compiling instructions for cross-compiling on a x86 system: - -make -C src PANDORA=1 - -Solaris -~~~ - -Dependencies: - SDL 1.2.5 or better (from libsdl.org) - SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org) - libPNG 1.2.7 - Zlib 1.2.3 - The Xiph.org libogg and libvorbis libraries - The OpenGL headers (from Mesa, usually shipped with your X.org or XFree - installation, so you needn't worry, most likely) - GCC 3.x toolchain and binutils - GNU Make - - You can get all these programs/libraries from the Companion CD (except SDL_mixer and OpenGL) - -Build instructions: - -gmake -C src SOLARIS=1 - -FreeBSD -~~~ - -Dependencies: - SDL 1.2.7 or better (from libsdl.org) - SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org) - Nasm (use NOASM=1 if you don't have it or have an non-i386 system, I think) - libPNG 1.2.7 - Zlib 1.2.3 - The Xiph.org libogg and libvorbis libraries - The OpenGL headers (from Mesa, usually shipped with your X.org or XFree - installation, so you needn't worry, most likely) - GCC 3.x toolchain and binutils - GNU Make - -Build instructions: - -gmake -C src FREEBSD=1 - -DJGPP/DOS -~~~ - -Dependencies: - Allegro 3.12 game programming library, (from - http://alleg.sourceforge.net/index.html) - Nasm (use NOASM=1 if you don't have it) - libsocket (from http://homepages.nildram.co.uk/~phekda/richdawe/lsck/) or - Watt-32 (from http://www.bgnett.no/~giva/) - GCC 3.x toolchain and binutils - GNU Make - -Build instructions: - -make -C src # to link with Watt-32, add WATTCP=1 - # for remote debugging over the COM port, add RDB=1 - -Notes: - use tools\djgpp\all313.diff to update Allegro to a "more usable" version ;) - Example: E:\djgpp\allegro>patch -p# < D:\SRB2Code\1.1\srb2\tools\djgpp\all313.diff - -Windows CE -~~~ - -Dependencies: - SDL 1.27 - -Build instructions: - -use src\SDL\WinCE\SRB2CE.vcw - -------------------------------------------------------------------------------- - -binaries will turn in up in bin/ - -note: read the src/makefile for more options - -- Sonic Team Junior -http://www.srb2.org From f9e01c2b652666d205f32a8c9f474b04f7f141f2 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 4 Sep 2016 20:12:59 +0100 Subject: [PATCH 17/23] Fixed up markdown so the build status isn't treated as a header anywhere --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a357feea0..b0841759d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -Sonic Robo Blast 2 -================== -[![Build status](https://ci.appveyor.com/api/projects/status/399d4hcw9yy7hg2y?svg=true)](https://ci.appveyor.com/project/STJr/srb2) [![Build status](https://travis-ci.org/STJr/SRB2.svg?branch=master)](https://travis-ci.org/STJr/SRB2) -================== +# Sonic Robo Blast 2 + +[![Build status](https://ci.appveyor.com/api/projects/status/399d4hcw9yy7hg2y?svg=true)](https://ci.appveyor.com/project/STJr/srb2) +[![Build status](https://travis-ci.org/STJr/SRB2.svg?branch=master)](https://travis-ci.org/STJr/SRB2) [Sonic Robo Blast 2](https://srb2.org/) is a 3D Sonic the Hedgehog fangame based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/). From 86ccecc6c13ab4727ccb540b0b1e05c0675dbcbd Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 4 Sep 2016 21:26:34 +0100 Subject: [PATCH 18/23] Let's be more specific here --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0841759d..4ee6ebecf 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ - libupnp (Linux/OS X only) - libgme (Linux/OS X only) -Warning: 64-bit builds are not netgame compatible. Use at your own risk. +Warning: 64-bit builds are not netgame compatible with 32-bit builds. Use at your own risk. ## Compiling From 0595325f4bf2b3ea7638eae8cecc8ee40c2dda50 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 4 Sep 2016 21:54:11 +0100 Subject: [PATCH 19/23] Make disclaimer H2 instead of H3 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4ee6ebecf..eb06156b4 100644 --- a/README.md +++ b/README.md @@ -18,5 +18,5 @@ Warning: 64-bit builds are not netgame compatible with 32-bit builds. Use at you See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling) -### Disclaimer +## Disclaimer 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. From 2798bd5c163b239eb7dd2eed40944b067eb3bc94 Mon Sep 17 00:00:00 2001 From: ilag11111 Date: Sun, 11 Sep 2016 10:40:49 -0700 Subject: [PATCH 20/23] Ensure demo files will save to srb2home, where SRB2 already looks for them. --- src/g_game.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index f891b0105..9ad8460d2 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -5579,7 +5579,10 @@ boolean G_CheckDemoStatus(void) WRITEUINT8(demo_p, DEMOMARKER); // add the demo end marker md5_buffer((char *)p+16, demo_p - (p+16), p); // make a checksum of everything after the checksum in the file. #endif - saved = FIL_WriteFile(demoname, demobuffer, demo_p - demobuffer); // finally output the file. + + char fulldemoname [128]; + sprintf(fulldemoname, "%s"PATHSEP"%s", srb2home, demoname); + saved = FIL_WriteFile(fulldemoname, demobuffer, demo_p - demobuffer); // finally output the file. free(demobuffer); demorecording = false; From 4abfe1e8f36f654b467f38b23debfcc8c156cbd0 Mon Sep 17 00:00:00 2001 From: ilag11111 Date: Sun, 11 Sep 2016 10:57:14 -0700 Subject: [PATCH 21/23] Fix MinGW/AppVeyor build. --- 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 9ad8460d2..08c6be101 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -5529,6 +5529,7 @@ void G_StopDemo(void) boolean G_CheckDemoStatus(void) { boolean saved; + char fulldemoname[128]; //Demo name with srb2home path if(ghosts) // ... ... ... ghosts = NULL; // :) @@ -5580,7 +5581,6 @@ boolean G_CheckDemoStatus(void) md5_buffer((char *)p+16, demo_p - (p+16), p); // make a checksum of everything after the checksum in the file. #endif - char fulldemoname [128]; sprintf(fulldemoname, "%s"PATHSEP"%s", srb2home, demoname); saved = FIL_WriteFile(fulldemoname, demobuffer, demo_p - demobuffer); // finally output the file. free(demobuffer); From 3b503f133640bde612862ec23310be06f9685a50 Mon Sep 17 00:00:00 2001 From: ilag11111 Date: Sun, 11 Sep 2016 14:59:24 -0700 Subject: [PATCH 22/23] Use function va to avoid having to delcare a new variable. Thanks MonsterIestyn. --- src/g_game.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 08c6be101..84db90132 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -5529,7 +5529,6 @@ void G_StopDemo(void) boolean G_CheckDemoStatus(void) { boolean saved; - char fulldemoname[128]; //Demo name with srb2home path if(ghosts) // ... ... ... ghosts = NULL; // :) @@ -5580,9 +5579,7 @@ boolean G_CheckDemoStatus(void) WRITEUINT8(demo_p, DEMOMARKER); // add the demo end marker md5_buffer((char *)p+16, demo_p - (p+16), p); // make a checksum of everything after the checksum in the file. #endif - - sprintf(fulldemoname, "%s"PATHSEP"%s", srb2home, demoname); - saved = FIL_WriteFile(fulldemoname, demobuffer, demo_p - demobuffer); // finally output the file. + saved = FIL_WriteFile(va(pandf, srb2home, demoname), demobuffer, demo_p - demobuffer); // finally output the file. free(demobuffer); demorecording = false; From 5f4f6fdac89e01a330bf821a9ec95dd3c74cc480 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Mon, 26 Sep 2016 18:35:13 +0100 Subject: [PATCH 23/23] Public remake of a merge request I shouldn't have put in Internal in the first place. --- src/m_misc.c | 2 ++ src/p_spec.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/m_misc.c b/src/m_misc.c index 457214e33..cfe73d88f 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -1675,6 +1675,7 @@ char *M_GetToken(const char *inputString) || stringToUse[startPos] == '\r' || stringToUse[startPos] == '\n' || stringToUse[startPos] == '\0' + || stringToUse[startPos] == '"' // we're treating this as whitespace because SLADE likes adding it for no good reason || inComment != 0) && startPos < stringLength) { @@ -1742,6 +1743,7 @@ char *M_GetToken(const char *inputString) && stringToUse[endPos] != ',' && stringToUse[endPos] != '{' && stringToUse[endPos] != '}' + && stringToUse[endPos] != '"' // see above && inComment == 0) && endPos < stringLength) { diff --git a/src/p_spec.c b/src/p_spec.c index 30b08ebb1..5dac8d34b 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -509,7 +509,7 @@ void P_ParseAnimationDefintion(SINT8 istexture, INT32 *i) animdefsToken = M_GetToken(NULL); if (animdefsToken == NULL) { - I_Error("Error parsing TEXTURES lump: Unexpected end of file where \"%s\"'s animation speed should be", animdefs[*i].startname); + I_Error("Error parsing ANIMDEFS lump: Unexpected end of file where \"%s\"'s animation speed should be", animdefs[*i].startname); } endPos = NULL; #ifndef AVOID_ERRNO @@ -523,7 +523,7 @@ void P_ParseAnimationDefintion(SINT8 istexture, INT32 *i) #endif || animSpeed < 0) // Number is not positive { - I_Error("Error parsing TEXTURES lump: Expected a positive integer for \"%s\"'s animation speed, got \"%s\"", animdefs[*i].startname, animdefsToken); + I_Error("Error parsing ANIMDEFS lump: Expected a positive integer for \"%s\"'s animation speed, got \"%s\"", animdefs[*i].startname, animdefsToken); } animdefs[*i].speed = animSpeed; Z_Free(animdefsToken);