diff --git a/src/d_clisrv.c b/src/d_clisrv.c index e38ecc29..97e6f500 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2495,9 +2495,9 @@ static void CL_RemovePlayer(INT32 playernum) LUA_InvalidatePlayer(&players[playernum]); #endif - if (G_TagGametype()) //Check if you still have a game. Location flexible. =P + /*if (G_TagGametype()) //Check if you still have a game. Location flexible. =P P_CheckSurvivors(); - else if (G_BattleGametype()) // SRB2Kart + else*/ if (G_BattleGametype()) // SRB2Kart K_CheckBumpers(); else if (G_RaceGametype()) P_CheckRacers(); diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 48c1835b..f4f13ed8 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -918,19 +918,19 @@ void D_RegisterClientCommands(void) COM_AddCommand("noclip", Command_CheatNoClip_f); COM_AddCommand("god", Command_CheatGod_f); COM_AddCommand("notarget", Command_CheatNoTarget_f); - COM_AddCommand("getallemeralds", Command_Getallemeralds_f); + /*COM_AddCommand("getallemeralds", Command_Getallemeralds_f); COM_AddCommand("resetemeralds", Command_Resetemeralds_f); COM_AddCommand("setrings", Command_Setrings_f); COM_AddCommand("setlives", Command_Setlives_f); - COM_AddCommand("setcontinues", Command_Setcontinues_f); + COM_AddCommand("setcontinues", Command_Setcontinues_f);*/ COM_AddCommand("devmode", Command_Devmode_f); COM_AddCommand("savecheckpoint", Command_Savecheckpoint_f); COM_AddCommand("scale", Command_Scale_f); COM_AddCommand("gravflip", Command_Gravflip_f); COM_AddCommand("hurtme", Command_Hurtme_f); - COM_AddCommand("jumptoaxis", Command_JumpToAxis_f); + /*COM_AddCommand("jumptoaxis", Command_JumpToAxis_f); COM_AddCommand("charability", Command_Charability_f); - COM_AddCommand("charspeed", Command_Charspeed_f); + COM_AddCommand("charspeed", Command_Charspeed_f);*/ COM_AddCommand("teleport", Command_Teleport_f); COM_AddCommand("rteleport", Command_RTeleport_f); COM_AddCommand("skynum", Command_Skynum_f); @@ -3363,9 +3363,9 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum) } // In tag, check to see if you still have a game. - if (G_TagGametype()) + /*if (G_TagGametype()) P_CheckSurvivors(); - else if (G_BattleGametype()) + else*/ if (G_BattleGametype()) K_CheckBumpers(); // SRB2Kart else if (G_RaceGametype()) P_CheckRacers(); // also SRB2Kart diff --git a/src/doomdef.h b/src/doomdef.h index c051a58b..0d98c31e 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -546,6 +546,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch; /// SRB2Kart: Camera always has noclip. /// \note Kind of problematic. If we decide to keep this on, we'll need serious map changes. -//#define NOCLIPCAM +#define NOCLIPCAM #endif // __DOOMDEF__ diff --git a/src/g_game.c b/src/g_game.c index b5ba6f06..e085f59a 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2554,15 +2554,15 @@ void G_PlayerReborn(INT32 player) p->maxlink = 0; // If NiGHTS, find lowest mare to start with. - p->mare = P_FindLowestMare(); + p->mare = 0; /*P_FindLowestMare(); CONS_Debug(DBG_NIGHTS, M_GetText("Current mare is %d\n"), p->mare); if (p->mare == 255) - p->mare = 0; + p->mare = 0;*/ // Check to make sure their color didn't change somehow... - if (G_GametypeHasTeams()) + /*if (G_GametypeHasTeams()) { if (p->ctfteam == 1 && p->skincolor != skincolor_redteam) { @@ -2586,7 +2586,7 @@ void G_PlayerReborn(INT32 player) else if (p == &players[fourthdisplayplayer]) CV_SetValue(&cv_playercolor4, skincolor_blueteam); } - } + }*/ } // @@ -2967,8 +2967,6 @@ void G_DoReborn(INT32 playernum) P_LoadThingsOnly(); - P_ClearStarPost(player->starpostnum); - // Do a wipe wipegamestate = -1; diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 54362762..420efa17 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2813,11 +2813,14 @@ static void HWR_AddLine(seg_t * line) SLOPEPARAMS( gr_backsector->c_slope, backc1, backc2, gr_backsector->ceilingheight) #undef SLOPEPARAMS - // Closed door. - if ((backc1 <= frontf1 && backc2 <= frontf2) - || (backf1 >= frontc1 && backf2 >= frontc2)) + if (viewsector != gr_backsector && viewsector != gr_frontsector) { - goto clipsolid; + // Closed door. + if ((backc1 <= frontf1 && backc2 <= frontf2) + || (backf1 >= frontc1 && backf2 >= frontc2)) + { + goto clipsolid; + } } // Window. @@ -2830,10 +2833,13 @@ static void HWR_AddLine(seg_t * line) else #endif { - // Closed door. - if (gr_backsector->ceilingheight <= gr_frontsector->floorheight || - gr_backsector->floorheight >= gr_frontsector->ceilingheight) - goto clipsolid; + if (viewsector != gr_backsector && viewsector != gr_frontsector) + { + // Closed door. + if (gr_backsector->ceilingheight <= gr_frontsector->floorheight || + gr_backsector->floorheight >= gr_frontsector->ceilingheight) + goto clipsolid; + } // Window. if (gr_backsector->ceilingheight != gr_frontsector->ceilingheight || diff --git a/src/m_cheat.c b/src/m_cheat.c index 99b96d99..e57a85ae 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -377,7 +377,7 @@ void Command_Hurtme_f(void) } // Moves the NiGHTS player to another axis within the current mare -void Command_JumpToAxis_f(void) +/*void Command_JumpToAxis_f(void) { REQUIRE_DEVMODE; REQUIRE_INLEVEL; @@ -438,7 +438,7 @@ void Command_Charspeed_f(void) players[consoleplayer].actionspd = atoi(COM_Argv(2))< : set character speed\n")); -} +}*/ void Command_RTeleport_f(void) { @@ -683,7 +683,7 @@ void Command_Savecheckpoint_f(void) } // Like M_GetAllEmeralds() but for console devmode junkies. -void Command_Getallemeralds_f(void) +/*void Command_Getallemeralds_f(void) { REQUIRE_SINGLEPLAYER; REQUIRE_NOULTIMATE; @@ -702,7 +702,7 @@ void Command_Resetemeralds_f(void) emeralds = 0; CONS_Printf(M_GetText("Emeralds reset to zero.\n")); -} +}*/ void Command_Devmode_f(void) { @@ -730,7 +730,7 @@ void Command_Devmode_f(void) G_SetGameModified(multiplayer); } -void Command_Setrings_f(void) +/*void Command_Setrings_f(void) { REQUIRE_INLEVEL; REQUIRE_SINGLEPLAYER; @@ -785,7 +785,7 @@ void Command_Setcontinues_f(void) G_SetGameModified(multiplayer); } -} +}*/ // // OBJECTPLACE (and related variables) diff --git a/src/m_cheat.h b/src/m_cheat.h index 951c7a16..3b5a1d0f 100644 --- a/src/m_cheat.h +++ b/src/m_cheat.h @@ -48,18 +48,18 @@ void Command_CheatNoClip_f(void); void Command_CheatGod_f(void); void Command_CheatNoTarget_f(void); void Command_Savecheckpoint_f(void); -void Command_Getallemeralds_f(void); +/*void Command_Getallemeralds_f(void); void Command_Resetemeralds_f(void); void Command_Setrings_f(void); void Command_Setlives_f(void); -void Command_Setcontinues_f(void); +void Command_Setcontinues_f(void);*/ void Command_Devmode_f(void); void Command_Scale_f(void); void Command_Gravflip_f(void); void Command_Hurtme_f(void); -void Command_JumpToAxis_f(void); +/*void Command_JumpToAxis_f(void); void Command_Charability_f(void); -void Command_Charspeed_f(void); +void Command_Charspeed_f(void);*/ void Command_Teleport_f(void); void Command_RTeleport_f(void); void Command_Skynum_f(void); diff --git a/src/p_enemy.c b/src/p_enemy.c index 7cdc354d..001b9e54 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -3913,15 +3913,25 @@ void A_ThrownRing(mobj_t *actor) //{ SRB2kart - A_GRENADERING static mobj_t *grenade; +static fixed_t explodedist; static inline boolean PIT_GrenadeRing(mobj_t *thing) { if (!grenade) - return true; + return false; if (thing->type != MT_PLAYER) // Don't explode for anything but an actual player. return true; + if (!(thing->flags & MF_SHOOTABLE)) + { + // didn't do any damage + return true; + } + + if (netgame && thing->player && thing->player->spectator) + return true; + if (thing == grenade->target && grenade->threshold != 0) // Don't blow up at your owner. return true; @@ -3935,22 +3945,13 @@ static inline boolean PIT_GrenadeRing(mobj_t *thing) return true; // see if it went over / under - if (grenade->z - grenade->info->painchance > thing->z + thing->height) + if (grenade->z - explodedist > thing->z + thing->height) return true; // overhead - if (grenade->z + grenade->height + grenade->info->painchance < thing->z) + if (grenade->z + grenade->height + explodedist < thing->z) return true; // underneath - if (netgame && thing->player && thing->player->spectator) - return true; - - if (!(thing->flags & MF_SHOOTABLE)) - { - // didn't do any damage - return true; - } - if (P_AproxDistance(P_AproxDistance(thing->x - grenade->x, thing->y - grenade->y), - thing->z - grenade->z) > grenade->info->painchance) + thing->z - grenade->z) > explodedist) return true; // Too far away // Explode! @@ -3961,7 +3962,11 @@ static inline boolean PIT_GrenadeRing(mobj_t *thing) void A_GrenadeRing(mobj_t *actor) { INT32 bx, by, xl, xh, yl, yh; - const fixed_t explodedist = actor->info->painchance; + explodedist = FixedMul(actor->info->painchance, mapheaderinfo[gamemap-1]->mobj_scale); +#ifdef HAVE_BLUA + if (LUA_CallAction("A_GrenadeRing", actor)) + return; +#endif if (leveltime % 35 == 0) S_StartSound(actor, actor->info->activesound); @@ -3978,6 +3983,80 @@ void A_GrenadeRing(mobj_t *actor) for (bx = xl; bx <= xh; bx++) P_BlockThingsIterator(bx, by, PIT_GrenadeRing); } + +static inline boolean PIT_MineExplode(mobj_t *thing) +{ + if (!grenade || P_MobjWasRemoved(grenade)) + return false; // There's the possibility these can chain react onto themselves after they've already died if there are enough all in one spot + + if (thing == grenade || thing->type == MT_MINEEXPLOSIONSOUND) // Don't explode yourself! Endless loop! + return true; + + if (!(thing->flags & MF_SHOOTABLE) || (thing->flags & MF_SCENERY)) + return true; + + if (netgame && thing->player && thing->player->spectator) + return true; + + if (G_BattleGametype() && grenade->target && grenade->target->player && grenade->target->player->kartstuff[k_bumper] <= 0 && thing == grenade->target) + return true; + + // see if it went over / under + if (grenade->z - explodedist > thing->z + thing->height) + return true; // overhead + if (grenade->z + grenade->height + explodedist < thing->z) + return true; // underneath + + if (P_AproxDistance(P_AproxDistance(thing->x - grenade->x, thing->y - grenade->y), + thing->z - grenade->z) > explodedist) + return true; // Too far away + + grenade->flags2 |= MF2_DEBRIS; + + if (thing->player) // Looks like we're going to have to need a seperate function for this too + K_ExplodePlayer(thing->player, grenade->target); + else + P_DamageMobj(thing, grenade, grenade->target, 1); + + return true; +} + +void A_MineExplode(mobj_t *actor) +{ + INT32 bx, by, xl, xh, yl, yh; + explodedist = FixedMul(actor->info->painchance, mapheaderinfo[gamemap-1]->mobj_scale); + INT32 d; + INT32 locvar1 = var1; + mobjtype_t type; +#ifdef HAVE_BLUA + if (LUA_CallAction("A_MineExplode", actor)) + return; +#endif + + type = (mobjtype_t)locvar1; + + // Use blockmap to check for nearby shootables + yh = (unsigned)(actor->y + explodedist - bmaporgy)>>MAPBLOCKSHIFT; + yl = (unsigned)(actor->y - explodedist - bmaporgy)>>MAPBLOCKSHIFT; + xh = (unsigned)(actor->x + explodedist - bmaporgx)>>MAPBLOCKSHIFT; + xl = (unsigned)(actor->x - explodedist - bmaporgx)>>MAPBLOCKSHIFT; + + grenade = actor; + + for (by = yl; by <= yh; by++) + for (bx = xl; bx <= xh; bx++) + P_BlockThingsIterator(bx, by, PIT_MineExplode); + + for (d = 0; d < 16; d++) + K_SpawnKartExplosion(actor->x, actor->y, actor->z, explodedist + 32*mapheaderinfo[gamemap-1]->mobj_scale, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64 + + if (actor->target && actor->target->player) + K_SpawnMineExplosion(actor, actor->target->player->skincolor); + else + K_SpawnMineExplosion(actor, SKINCOLOR_RED); + + P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND); +} //} // Function: A_SetSolidSteam @@ -8240,6 +8319,7 @@ void A_JawzExplode(mobj_t *actor) return; } +/* old A_MineExplode - see elsewhere in the file void A_MineExplode(mobj_t *actor) { mobj_t *mo2; @@ -8247,12 +8327,14 @@ void A_MineExplode(mobj_t *actor) INT32 d; INT32 locvar1 = var1; mobjtype_t type; + fixed_t range; #ifdef HAVE_BLUA if (LUA_CallAction("A_MineExplode", actor)) return; #endif type = (mobjtype_t)locvar1; + range = FixedMul(actor->info->painchance, mapheaderinfo[gamemap-1]->mobj_scale); for (th = thinkercap.next; th != &thinkercap; th = th->next) { @@ -8267,27 +8349,25 @@ void A_MineExplode(mobj_t *actor) if (mo2 == actor || mo2->type == MT_MINEEXPLOSIONSOUND) // Don't explode yourself! Endless loop! continue; + if (!(mo2->flags & MF_SHOOTABLE) || (mo2->flags & MF_SCENERY)) + continue; + if (G_BattleGametype() && actor->target && actor->target->player && actor->target->player->kartstuff[k_bumper] <= 0 && mo2 == actor->target) continue; - if (P_AproxDistance(P_AproxDistance(mo2->x - actor->x, mo2->y - actor->y), mo2->z - actor->z) > actor->info->painchance) + if (P_AproxDistance(P_AproxDistance(mo2->x - actor->x, mo2->y - actor->y), mo2->z - actor->z) > range) continue; - if ((mo2->flags & MF_SHOOTABLE) && !(mo2->flags & MF_SCENERY)) - { - actor->flags2 |= MF2_DEBRIS; + actor->flags2 |= MF2_DEBRIS; - if (mo2->player) // Looks like we're going to have to need a seperate function for this too - K_ExplodePlayer(mo2->player, actor->target); - else - P_DamageMobj(mo2, actor, actor->target, 1); - - continue; - } + if (mo2->player) // Looks like we're going to have to need a seperate function for this too + K_ExplodePlayer(mo2->player, actor->target); + else + P_DamageMobj(mo2, actor, actor->target, 1); } for (d = 0; d < 16; d++) - K_SpawnKartExplosion(actor->x, actor->y, actor->z, actor->info->painchance + 32*FRACUNIT, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64 + K_SpawnKartExplosion(actor->x, actor->y, actor->z, range + 32*mapheaderinfo[gamemap-1]->mobj_scale, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64 if (actor->target && actor->target->player) K_SpawnMineExplosion(actor, actor->target->player->skincolor); @@ -8297,7 +8377,7 @@ void A_MineExplode(mobj_t *actor) P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND); return; -} +}*/ void A_BallhogExplode(mobj_t *actor) { diff --git a/src/p_inter.c b/src/p_inter.c index 5ca9a104..95785252 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -96,55 +96,6 @@ void P_RampConstant(const BasicFF_t *FFInfo, INT32 Start, INT32 End) // GET STUFF // -/** Makes sure all previous starposts are cleared. - * For instance, hitting starpost 5 will clear starposts 1 through 4, even if - * you didn't touch them. This is how the classic games work, although it can - * lead to bizarre situations on levels that allow you to make a circuit. - * - * \param postnum The number of the starpost just touched. - */ -void P_ClearStarPost(INT32 postnum) -{ - thinker_t *th; - mobj_t *mo2; - - // scan the thinkers - for (th = thinkercap.next; th != &thinkercap; th = th->next) - { - if (th->function.acp1 != (actionf_p1)P_MobjThinker) - continue; - - mo2 = (mobj_t *)th; - - if (mo2->type == MT_STARPOST && mo2->health <= postnum) - P_SetMobjState(mo2, mo2->info->seestate); - } - return; -} - -// -// P_ResetStarposts -// -// Resets all starposts back to their spawn state, used on A_Mixup and some other things. -// -void P_ResetStarposts(void) -{ - // Search through all the thinkers. - thinker_t *th; - mobj_t *post; - - for (th = thinkercap.next; th != &thinkercap; th = th->next) - { - if (th->function.acp1 != (actionf_p1)P_MobjThinker) - continue; - - post = (mobj_t *)th; - - if (post->type == MT_STARPOST) - P_SetMobjState(post, post->info->spawnstate); - } -} - // // P_CanPickupItem // @@ -299,14 +250,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (heightcheck) { - if (special->type == MT_FLINGEMERALD) // little hack here... + /*if (special->type == MT_FLINGEMERALD) // little hack here... { // flingemerald sprites are low to the ground, so extend collision radius down some. if (toucher->z > (special->z + special->height)) return; if (special->z - special->height > (toucher->z + toucher->height)) return; } - else + else*/ { if (toucher->momz < 0) { if (toucher->z + toucher->momz > special->z + special->height) @@ -341,7 +292,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (special->flags & MF_BOSS) { - if (special->type == MT_BLACKEGGMAN) + /*if (special->type == MT_BLACKEGGMAN) { P_DamageMobj(toucher, special, special, 1); // ouch return; @@ -357,7 +308,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) toucher->momy = -toucher->momy; P_DamageMobj(special, toucher, toucher, 1); } - /* else if (((toucher->z < special->z && !(toucher->eflags & MFE_VERTICALFLIP)) || (toucher->z + toucher->height > special->z + special->height && (toucher->eflags & MFE_VERTICALFLIP))) && player->charability == CA_FLY @@ -368,8 +318,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) P_DamageMobj(special, toucher, toucher, 1); } - */ // SRB2kart - Removed: No more fly states - else + // SRB2kart - Removed: No more fly states + else*/ P_DamageMobj(toucher, special, special, 1); return; @@ -379,7 +329,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) //////////////////////////////////////////////////////// /////ENEMIES!!////////////////////////////////////////// //////////////////////////////////////////////////////// - if (special->type == MT_GSNAPPER && !(((player->pflags & PF_NIGHTSMODE) && (player->pflags & PF_DRILLING)) + /*if (special->type == MT_GSNAPPER && !(((player->pflags & PF_NIGHTSMODE) && (player->pflags & PF_DRILLING)) || player->powers[pw_invulnerability] || player->powers[pw_super]) && toucher->z < special->z + special->height && toucher->z + toucher->height > special->z) { @@ -401,7 +351,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) P_DamageMobj(special, toucher, toucher, 1); } - /* else if (((toucher->z < special->z && !(toucher->eflags & MFE_VERTICALFLIP)) || (toucher->z + toucher->height > special->z + special->height && (toucher->eflags & MFE_VERTICALFLIP))) // Flame is bad at logic - JTE && player->charability == CA_FLY @@ -413,8 +362,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) P_DamageMobj(special, toucher, toucher, 1); } - */ // SRB2kart - Removed: No more fly states - else + // SRB2kart - Removed: No more fly states + else*/ P_DamageMobj(toucher, special, special, 1); return; @@ -851,7 +800,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) // ********************************** // // NiGHTS gameplay items and powerups // // ********************************** // - case MT_NIGHTSDRONE: + /*case MT_NIGHTSDRONE: if (player->bot) return; if (player->exiting) @@ -1042,7 +991,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) // Clear text player->texttimer = 0; - return; + return;*/ case MT_NIGHTSBUMPER: // Don't trigger if the stage is ended/failed if (player->exiting) @@ -1110,7 +1059,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) } } return; - case MT_NIGHTSSUPERLOOP: + /*case MT_NIGHTSSUPERLOOP: if (player->bot || !(player->pflags & PF_NIGHTSMODE)) return; if (!G_IsSpecialStage(gamemap)) @@ -1243,7 +1192,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) HU_SetCEchoDuration(4); HU_DoCEcho(M_GetText("\\\\\\\\\\\\\\\\Link Freeze")); } - break; + break;*/ case MT_NIGHTSWING: if (G_IsSpecialStage(gamemap) && useNightsSS) { // Pseudo-ring. @@ -1395,35 +1344,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) player->starpostangle = special->angle; player->starpostnum = special->health; player->starpostcount++; - P_ClearStarPost(special->health); - // Find all starposts in the level with this value. - { - thinker_t *th; - mobj_t *mo2; - - for (th = thinkercap.next; th != &thinkercap; th = th->next) - { - if (th->function.acp1 != (actionf_p1)P_MobjThinker) - continue; - - mo2 = (mobj_t *)th; - - if (mo2 == special) - continue; - - if (mo2->type == MT_STARPOST && mo2->health == special->health) - { - if (!(netgame && circuitmap && player != &players[consoleplayer])) - P_SetMobjState(mo2, mo2->info->painstate); - } - } - } - - S_StartSound(toucher, special->info->painsound); - - if (!(netgame && circuitmap && player != &players[consoleplayer])) - P_SetMobjState(special, special->info->painstate); + //S_StartSound(toucher, special->info->painsound); return; case MT_FAKEMOBILE: @@ -1922,7 +1844,7 @@ void P_CheckTimeLimit(void) //Tagmode round end but only on the tic before the //XD_EXITLEVEL packet is received by all players. - if (G_TagGametype()) + /*if (G_TagGametype()) { if (leveltime == (timelimitintics + 1)) { @@ -1939,7 +1861,7 @@ void P_CheckTimeLimit(void) } //Optional tie-breaker for Match/CTF - else if (cv_overtime.value) + else*/ if (cv_overtime.value) { INT32 playerarray[MAXPLAYERS]; INT32 tempplayer = 0; @@ -2072,7 +1994,7 @@ void P_CheckPointLimit(void) /*Checks for untagged remaining players in both tag derivitave modes. *If no untagged players remain, end the round. *Also serves as error checking if the only IT player leaves.*/ -void P_CheckSurvivors(void) +/*void P_CheckSurvivors(void) { INT32 i; INT32 survivors = 0; @@ -2152,7 +2074,7 @@ void P_CheckSurvivors(void) if (server) SendNetXCmd(XD_EXITLEVEL, NULL, 0); } -} +}*/ // Checks whether or not to end a race netgame. boolean P_CheckRacers(void) @@ -2452,7 +2374,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source) localaiming4 = 0; //tag deaths handled differently in suicide cases. Don't count spectators! - if (G_TagGametype() + /*if (G_TagGametype() && !(target->player->pflags & PF_TAGIT) && (!source || !source->player) && !(target->player->spectator)) { // if you accidentally die before you run out of time to hide, ignore it. @@ -2486,7 +2408,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source) } } } - else if (G_BattleGametype()) + else*/ if (G_BattleGametype()) K_CheckBumpers(); target->player->kartstuff[k_pogospring] = 0; @@ -2849,7 +2771,7 @@ static inline boolean P_TagDamage(mobj_t *target, mobj_t *inflictor, mobj_t *sou } // The tag occurs so long as you aren't shooting another tagger with friendlyfire on. - if (source->player->pflags & PF_TAGIT && !(player->pflags & PF_TAGIT)) + /*if (source->player->pflags & PF_TAGIT && !(player->pflags & PF_TAGIT)) { P_AddPlayerScore(source->player, 1); //award points to tagger. P_HitDeathMessages(player, inflictor, source); @@ -2867,7 +2789,7 @@ static inline boolean P_TagDamage(mobj_t *target, mobj_t *inflictor, mobj_t *sou //checks if tagger has tagged all players, if so, end round early. P_CheckSurvivors(); - } + }*/ P_DoPlayerPain(player, source, inflictor); diff --git a/src/p_local.h b/src/p_local.h index 51676a2c..5fd37248 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -172,7 +172,7 @@ void P_PlayerThink(player_t *player); void P_PlayerAfterThink(player_t *player); void P_DoPlayerExit(player_t *player); void P_DoTimeOver(player_t *player); -void P_NightserizePlayer(player_t *player, INT32 ptime); +//void P_NightserizePlayer(player_t *player, INT32 ptime); void P_InstaThrust(mobj_t *mo, angle_t angle, fixed_t move); fixed_t P_ReturnThrustX(mobj_t *mo, angle_t angle, fixed_t move); @@ -185,12 +185,12 @@ void P_HomingAttack(mobj_t *source, mobj_t *enemy); /// \todo doesn't belong in //boolean P_SuperReady(player_t *player); void P_DoJump(player_t *player, boolean soundandstate); boolean P_AnalogMove(player_t *player); -boolean P_TransferToNextMare(player_t *player); -UINT8 P_FindLowestMare(void); +/*boolean P_TransferToNextMare(player_t *player); +UINT8 P_FindLowestMare(void);*/ UINT8 P_FindLowestLap(void); UINT8 P_FindHighestLap(void); void P_FindEmerald(void); -void P_TransferToAxis(player_t *player, INT32 axisnum); +//void P_TransferToAxis(player_t *player, INT32 axisnum); boolean P_PlayerMoving(INT32 pnum); void P_SpawnThokMobj(player_t *player); void P_SpawnSpinMobj(player_t *player, mobjtype_t type); @@ -231,7 +231,7 @@ boolean P_MobjWasRemoved(mobj_t *th); void P_RemoveSavegameMobj(mobj_t *th); boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state); boolean P_SetMobjState(mobj_t *mobj, statenum_t state); -void P_RunShields(void); +//void P_RunShields(void); void P_RunOverlays(void); void P_RunShadows(void); void P_MobjThinker(mobj_t *mobj); @@ -406,12 +406,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck); void P_PlayerFlagBurst(player_t *player, boolean toss); void P_CheckTimeLimit(void); void P_CheckPointLimit(void); -void P_CheckSurvivors(void); +//void P_CheckSurvivors(void); boolean P_CheckRacers(void); -void P_ClearStarPost(INT32 postnum); -void P_ResetStarposts(void); - boolean P_CanPickupItem(player_t *player, UINT8 weapon); void P_DoNightsScore(player_t *player); diff --git a/src/p_map.c b/src/p_map.c index f6f6b9b5..468a5c67 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -469,7 +469,7 @@ static boolean PIT_CheckThing(mobj_t *thing) #endif // Metal Sonic destroys tiny baby objects. - if (tmthing->type == MT_METALSONIC_RACE + /*if (tmthing->type == MT_METALSONIC_RACE && (thing->flags & (MF_MISSILE|MF_ENEMY|MF_BOSS) || thing->type == MT_SPIKE)) { if ((thing->flags & (MF_ENEMY|MF_BOSS)) && (thing->health <= 0 || !(thing->flags & MF_SHOOTABLE))) @@ -495,7 +495,7 @@ static boolean PIT_CheckThing(mobj_t *thing) P_KillMobj(thing, tmthing, tmthing); } return true; - } + }*/ if (!(thing->flags & (MF_SOLID|MF_SPECIAL|MF_PAIN|MF_SHOOTABLE)) || (thing->flags & MF_NOCLIPTHING)) return true; @@ -647,9 +647,9 @@ static boolean PIT_CheckThing(mobj_t *thing) // check for skulls slamming into things if (tmthing->flags2 & MF2_SKULLFLY) { - if (tmthing->type == MT_EGGMOBILE) // Don't make Eggman stop! + /*if (tmthing->type == MT_EGGMOBILE) // Don't make Eggman stop! return true; // Let him RUN YOU RIGHT OVER. >:3 - else + else*/ { // see if it went over / under if (tmthing->z > thing->z + thing->height) @@ -1133,7 +1133,7 @@ static boolean PIT_CheckThing(mobj_t *thing) return true; // Missiles ignore Brak's helper. - if (thing->type == MT_BLACKEGGMAN_HELPER) + /*if (thing->type == MT_BLACKEGGMAN_HELPER) return true; // Hurting Brak @@ -1144,9 +1144,9 @@ static boolean PIT_CheckThing(mobj_t *thing) if (!(thing->state >= &states[S_BLACKEGG_PAIN1] && thing->state <= &states[S_BLACKEGG_PAIN35])) P_SetMobjState(thing, thing->info->painstate); return false; - } + }*/ - if (!(thing->flags & MF_SHOOTABLE) && !(thing->type == MT_EGGSHIELD)) + if (!(thing->flags & MF_SHOOTABLE)/* && !(thing->type == MT_EGGSHIELD)*/) { // didn't do any damage return !(thing->flags & MF_SOLID); @@ -1157,7 +1157,7 @@ static boolean PIT_CheckThing(mobj_t *thing) && thing->player->pflags & PF_CARRIED && thing->tracer == tmthing->target) return true; // Don't give rings to your carry player by accident. - if (thing->type == MT_EGGSHIELD) + /*if (thing->type == MT_EGGSHIELD) { fixed_t touchx, touchy; angle_t angle; @@ -1183,14 +1183,14 @@ static boolean PIT_CheckThing(mobj_t *thing) P_KillMobj(thing, tmthing, tmthing); return false; } - } + }*/ if (tmthing->type == MT_SHELL && tmthing->threshold > TICRATE) return true; // damage / explode if (tmthing->flags & MF_ENEMY) // An actual ENEMY! (Like the deton, for example) P_DamageMobj(thing, tmthing, tmthing, 1); - else if (tmthing->type == MT_BLACKEGGMAN_MISSILE && thing->player + /*else if (tmthing->type == MT_BLACKEGGMAN_MISSILE && thing->player && (thing->player->pflags & PF_JUMPED) && !thing->player->powers[pw_flashing] && thing->tracer != tmthing @@ -1230,16 +1230,13 @@ static boolean PIT_CheckThing(mobj_t *thing) tmthing->x = thing->x; tmthing->y = thing->y; P_SetThingPosition(tmthing); - } + }*/ else P_DamageMobj(thing, tmthing, tmthing->target, 1); // don't traverse any more - if (tmthing->type == MT_SHELL) - return true; - else - return false; + return (tmthing->type == MT_SHELL); } if (thing->flags & MF_PUSHABLE && (tmthing->player || tmthing->flags & MF_PUSHABLE) @@ -1303,7 +1300,7 @@ static boolean PIT_CheckThing(mobj_t *thing) } // Respawn rings and items - if ((tmthing->type == MT_NIGHTSDRONE || thing->type == MT_NIGHTSDRONE) + /*if ((tmthing->type == MT_NIGHTSDRONE || thing->type == MT_NIGHTSDRONE) && (tmthing->player || thing->player)) { mobj_t *droneobj = (tmthing->type == MT_NIGHTSDRONE) ? tmthing : thing; @@ -1323,7 +1320,7 @@ static boolean PIT_CheckThing(mobj_t *thing) } droneobj->extravalue1 = pl->anotherflyangle; droneobj->extravalue2 = (INT32)leveltime + TICRATE; - } + }*/ // check for special pickup if (thing->flags & MF_SPECIAL && tmthing->player && thing->type != MT_POKEY) @@ -1394,7 +1391,7 @@ static boolean PIT_CheckThing(mobj_t *thing) else if (thing->scale > tmthing->scale + (FRACUNIT/8)) K_SquishPlayer(tmthing->player, thing); - // SRB2kart - Starpower! + // SRB2kart - Invincibility! if (tmthing->player->kartstuff[k_invincibilitytimer] && !thing->player->kartstuff[k_invincibilitytimer]) P_DamageMobj(thing, tmthing, tmthing, 1); else if (thing->player->kartstuff[k_invincibilitytimer] && !tmthing->player->kartstuff[k_invincibilitytimer]) @@ -1440,7 +1437,7 @@ static boolean PIT_CheckThing(mobj_t *thing) if (thing->player) { // Doesn't matter what gravity player's following! Just do your stuff in YOUR direction only - if (tmthing->eflags & MFE_VERTICALFLIP + /*if (tmthing->eflags & MFE_VERTICALFLIP && (tmthing->z + tmthing->height + tmthing->momz < thing->z || tmthing->z + tmthing->height + tmthing->momz >= thing->z + thing->height)) ; @@ -1462,7 +1459,7 @@ static boolean PIT_CheckThing(mobj_t *thing) // The tmthing->target allows the pusher of the object // to get the point if he topples it on an opponent. } - } + }*/ if (tmthing->type == MT_FAN || tmthing->type == MT_STEAM) P_DoFanAndGasJet(tmthing, thing); @@ -1585,9 +1582,9 @@ static boolean PIT_CheckThing(mobj_t *thing) ; // Fix a few nasty spring-jumping bugs that happen sometimes. // Monitors are not treated as solid to players who are jumping, spinning or gliding, // unless it's a CTF team monitor and you're on the wrong team - else if (thing->flags & MF_MONITOR && tmthing->player && tmthing->player->pflags & (PF_JUMPED|PF_SPINNING|PF_GLIDING) + /*else if (thing->flags & MF_MONITOR && tmthing->player && tmthing->player->pflags & (PF_JUMPED|PF_SPINNING|PF_GLIDING) && !((thing->type == MT_REDRINGBOX && tmthing->player->ctfteam != 1) || (thing->type == MT_BLUERINGBOX && tmthing->player->ctfteam != 2))) - ; + ;*/ // z checking at last // Treat noclip things as non-solid! else if ((thing->flags & (MF_SOLID|MF_NOCLIP)) == MF_SOLID diff --git a/src/p_mobj.c b/src/p_mobj.c index 2441547e..536ecb74 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -495,7 +495,7 @@ boolean P_WeaponOrPanel(mobjtype_t type) // // Power Stone emerald management // -void P_EmeraldManager(void) +/*void P_EmeraldManager(void) { thinker_t *think; mobj_t *mo; @@ -664,7 +664,7 @@ void P_EmeraldManager(void) break; } } -} +}*/ // // P_ExplodeMissile @@ -6059,7 +6059,7 @@ static void P_NightsItemChase(mobj_t *thing) P_Attract(thing, thing->tracer, true); } -static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield) +/*static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield) { if (!thing->target || thing->target->health <= 0 || !thing->target->player || (thing->target->player->powers[pw_shield] & SH_NOSTACK) == SH_NONE || thing->target->player->powers[pw_super] @@ -6175,7 +6175,7 @@ static boolean P_AddShield(mobj_t *thing) P_SetTarget(&shields[numshields++], thing); return true; -} +}*/ void P_RunOverlays(void) { @@ -6609,8 +6609,8 @@ void P_MobjThinker(mobj_t *mobj) P_RemoveMobj(mobj); return; } - else - P_AddOverlay(mobj); + + P_AddOverlay(mobj); break; case MT_SHADOW: if (!mobj->target) @@ -6618,10 +6618,10 @@ void P_MobjThinker(mobj_t *mobj) P_RemoveMobj(mobj); return; } - else - P_AddShadow(mobj); + + P_AddShadow(mobj); break; - case MT_BLACKORB: + /*case MT_BLACKORB: case MT_WHITEORB: case MT_GREENORB: case MT_YELLOWORB: @@ -6629,7 +6629,7 @@ void P_MobjThinker(mobj_t *mobj) case MT_PITYORB: if (!P_AddShield(mobj)) return; - break; + break;*/ //{ SRB2kart mobs case MT_ORBINAUT_SHIELD: // Kart orbit/trail items case MT_JAWZ_SHIELD: diff --git a/src/p_setup.c b/src/p_setup.c index e705a3f0..78a59711 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2865,7 +2865,6 @@ boolean P_SetupLevel(boolean skipprecip) if (players[i].starposttime) { G_SpawnPlayer(i, true); - P_ClearStarPost(players[i].starpostnum); } else G_SpawnPlayer(i, false); diff --git a/src/p_spec.c b/src/p_spec.c index ab47fec3..143efd90 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1707,16 +1707,16 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller if (actor && actor->player && triggerline->flags & ML_EFFECT4) { - if (maptol & TOL_NIGHTS) + /*if (maptol & TOL_NIGHTS) lap = actor->player->mare; - else + else*/ lap = actor->player->laps; } else { - if (maptol & TOL_NIGHTS) + /*if (maptol & TOL_NIGHTS) lap = P_FindLowestMare(); - else + else*/ lap = P_FindLowestLap(); } @@ -4252,7 +4252,6 @@ DoneSection2: // //player->starpostangle = player->starposttime = player->starpostnum = 0; //player->starpostx = player->starposty = player->starpostz = 0; - P_ResetStarposts(); // Play the starpost sound for 'consistency' // S_StartSound(player->mo, sfx_strpst); diff --git a/src/p_telept.c b/src/p_telept.c index 69573640..89a28ddc 100644 --- a/src/p_telept.c +++ b/src/p_telept.c @@ -96,10 +96,6 @@ void P_MixUp(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, thing->player->starpostangle = starpostangle; thing->player->starpostnum = starpostnum; - // Reset map starposts for the player's new info. - P_ResetStarposts(); - P_ClearStarPost(starpostnum); - P_ResetPlayer(thing->player); P_SetPlayerMobjState(thing, S_KART_STND1); // SRB2kart - was S_PLAY_STND diff --git a/src/p_tick.c b/src/p_tick.c index c9c32433..23e74874 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -310,7 +310,7 @@ static inline void P_RunThinkers(void) // // Determine if the teams are unbalanced, and if so, move a player to the other team. // -static void P_DoAutobalanceTeams(void) +/*static void P_DoAutobalanceTeams(void) { changeteam_union NetPacket; UINT16 usvalue; @@ -562,7 +562,7 @@ static inline void P_DoCTFStuff(void) if (cv_teamscramble.value && server) P_DoTeamscrambling(); } -} +}*/ // // P_Ticker @@ -612,11 +612,11 @@ void P_Ticker(boolean run) if (!demoplayback) // Don't increment if a demo is playing. totalplaytime++; - if (!useNightsSS && G_IsSpecialStage(gamemap)) + /*if (!useNightsSS && G_IsSpecialStage(gamemap)) P_DoSpecialStageStuff(); if (runemeraldmanager) - P_EmeraldManager(); // Power stone mode + P_EmeraldManager(); // Power stone mode*/ if (run) { @@ -633,7 +633,7 @@ void P_Ticker(boolean run) } // Run shield positioning - P_RunShields(); + //P_RunShields(); P_RunOverlays(); P_RunShadows(); @@ -648,11 +648,11 @@ void P_Ticker(boolean run) leveltime++; timeinmap++; - if (G_TagGametype()) + /*if (G_TagGametype()) P_DoTagStuff(); if (G_GametypeHasTeams()) - P_DoCTFStuff(); + P_DoCTFStuff();*/ if (run) { @@ -803,7 +803,7 @@ void P_PreTicker(INT32 frames) #endif // Run shield positioning - P_RunShields(); + //P_RunShields(); P_RunOverlays(); P_UpdateSpecials(); diff --git a/src/p_user.c b/src/p_user.c index 3620a4d0..be021f55 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -344,7 +344,7 @@ void P_ResetScore(player_t *player) // // Returns the lowest open mare available // -UINT8 P_FindLowestMare(void) +/*UINT8 P_FindLowestMare(void) { thinker_t *th; mobj_t *mo2; @@ -375,7 +375,7 @@ UINT8 P_FindLowestMare(void) CONS_Debug(DBG_NIGHTS, "Lowest mare found: %d\n", mare); return mare; -} +}*/ // // P_FindLowestLap @@ -438,7 +438,7 @@ UINT8 P_FindHighestLap(void) // (Finds the lowest mare # for capsules that have not been destroyed). // Returns true if successful, false if there is no other mare. // -boolean P_TransferToNextMare(player_t *player) +/*boolean P_TransferToNextMare(player_t *player) { thinker_t *th; mobj_t *mo2; @@ -759,7 +759,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime) if (G_IsSpecialStage(gamemap)) { for (i = 0; i < MAXPLAYERS; i++) - if (playeringame[i]/* && players[i].pflags & PF_NIGHTSMODE*/) + if (playeringame[i]) total_rings += players[i].health-1; } @@ -782,10 +782,6 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime) P_AddPlayerScore(&players[i], (players[i].health - 1) * 50); } - // Add score to leaderboards now - /*if (!(netgame||multiplayer) && P_IsLocalPlayer(&players[i])) - G_AddTempNightsRecords(players[i].marescore, leveltime - player->marebegunat, players[i].mare + 1);*/ - // transfer scores anyway players[i].mo->health = players[i].health = 1; @@ -803,10 +799,6 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime) player->textvar = 4; // Score and grades player->finishedrings = (INT16)(player->health - 1); - // Add score to temp leaderboards - /*if (!(netgame||multiplayer) && P_IsLocalPlayer(player)) - G_AddTempNightsRecords(player->marescore, leveltime - player->marebegunat, (UINT8)(oldmare + 1));*/ - // Starting a new mare, transfer scores player->marebegunat = leveltime; @@ -824,7 +816,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime) } player->pflags |= PF_NIGHTSMODE; -} +}*/ // // P_PlayerInPain @@ -4559,7 +4551,7 @@ INT32 P_GetPlayerControlDirection(player_t *player) } // Control scheme for 2d levels. -static void P_2dMovement(player_t *player) +/*static void P_2dMovement(player_t *player) { ticcmd_t *cmd; INT32 topspeed, acceleration, thrustfactor; @@ -4736,7 +4728,7 @@ static void P_2dMovement(player_t *player) else if (player->rmomx > -topspeed && cmd->sidemove < 0) P_Thrust(player->mo, movepushangle, movepushforward); } -} +}*/ //#define OLD_MOVEMENT_CODE 1 static void P_3dMovement(player_t *player) @@ -5027,7 +5019,7 @@ static void P_SpectatorMovement(player_t *player) // graphical indicator // for building/debugging // NiGHTS levels! -static void P_ShootLine(mobj_t *source, mobj_t *dest, fixed_t height) +/*static void P_ShootLine(mobj_t *source, mobj_t *dest, fixed_t height) { mobj_t *mo; INT32 i; @@ -5601,16 +5593,6 @@ static void P_DoNiGHTSCapsule(player_t *player) UINT8 em = P_GetNextEmerald(); tic_t lowest_time; - /*for (i = 0; i < MAXPLAYERS; i++) - { - if (!playeringame[i] || players[i].spectator || !players[i].mo || !players[i].mo->tracer) - continue; - - emmo = P_SpawnMobj(players[i].mo->x, players[i].mo->y, players[i].mo->z + players[i].mo->info->height, MT_GOTEMERALD); - P_SetTarget(&emmo->target, players[i].mo); - P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em); - }*/ - if (player->mo->tracer) { // Only give it to ONE person, and THAT player has to get to the goal! @@ -5706,7 +5688,7 @@ static void P_NiGHTSMovement(player_t *player) boolean capsule = false; // NiGHTS special stages have a pseudo-shared timer, so check if ANYONE is feeding the capsule. for (i = 0; i < MAXPLAYERS; i++) - if (playeringame[i] /*&& players[i].pflags & PF_NIGHTSMODE*/ + if (playeringame[i] && (players[i].capsule && players[i].capsule->reactiontime)) capsule = true; if (!capsule @@ -6261,7 +6243,7 @@ static void P_NiGHTSMovement(player_t *player) if (objectplacing) OP_NightsObjectplace(player); -} +}*/ // May be used in future for CTF #if 0 @@ -6480,7 +6462,7 @@ void P_ElementalFireTrail(player_t *player) static void P_MovePlayer(player_t *player) { ticcmd_t *cmd; - INT32 i; + //INT32 i; fixed_t runspd; @@ -6555,7 +6537,7 @@ static void P_MovePlayer(player_t *player) } // Locate the capsule for this mare. - else if (maptol & TOL_NIGHTS) + /*else if (maptol & TOL_NIGHTS) { if (!player->capsule && !player->bonustime) { @@ -6608,15 +6590,15 @@ static void P_MovePlayer(player_t *player) P_DamageMobj(player->mo, NULL, NULL, 1); player->pflags &= ~PF_NIGHTSFALL; } - } + }*/ ////////////////////// // MOVEMENT CODE // ////////////////////// - if (twodlevel || player->mo->flags2 & MF2_TWOD) // 2d-level, so special control applies. + /*if (twodlevel || player->mo->flags2 & MF2_TWOD) // 2d-level, so special control applies. P_2dMovement(player); - else + else*/ { if (!player->climbing && (!P_AnalogMove(player))) player->mo->angle = (cmd->angleturn<<16 /* not FRACBITS */); @@ -9465,8 +9447,8 @@ void P_PlayerThink(player_t *player) player->losstime--; // Flash player after being hit. - if (!(player->pflags & PF_NIGHTSMODE - || player->kartstuff[k_hyudorotimer] // SRB2kart - fixes Hyudoro not flashing when it should. + if (!(//player->pflags & PF_NIGHTSMODE || + player->kartstuff[k_hyudorotimer] // SRB2kart - fixes Hyudoro not flashing when it should. || player->kartstuff[k_growshrinktimer] > 0 // Grow doesn't flash either. || player->kartstuff[k_respawn] // Respawn timer (for drop dash effect) || (G_BattleGametype() && player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer]) @@ -9478,13 +9460,13 @@ void P_PlayerThink(player_t *player) else player->mo->flags2 &= ~MF2_DONTDRAW; } - else if (player->mo->tracer) + /*else if (player->mo->tracer) { if (player->powers[pw_flashing] & 1) player->mo->tracer->flags2 |= MF2_DONTDRAW; else player->mo->tracer->flags2 &= ~MF2_DONTDRAW; - } + }*/ player->pflags &= ~PF_SLIDING; diff --git a/src/r_bsp.c b/src/r_bsp.c index 82a7624b..c06c48dd 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -222,30 +222,6 @@ void R_PortalClearClipSegs(INT32 start, INT32 end) newend = solidsegs + 2; } - -// R_DoorClosed -// -// This function is used to fix the automap bug which -// showed lines behind closed doors simply because the door had a dropoff. -// -// It assumes that Doom has already ruled out a door being closed because -// of front-back closure (e.g. front floor is taller than back ceiling). -static INT32 R_DoorClosed(void) -{ - return - - // if door is closed because back is shut: - backsector->ceilingheight <= backsector->floorheight - - // preserve a kind of transparent door/lift special effect: - && (backsector->ceilingheight >= frontsector->ceilingheight || curline->sidedef->toptexture) - - && (backsector->floorheight <= frontsector->floorheight || curline->sidedef->bottomtexture) - - // properly render skies (consider door "open" if both ceilings are sky): - && (backsector->ceilingpic != skyflatnum || frontsector->ceilingpic != skyflatnum); -} - // // If player's view height is underneath fake floor, lower the // drawn ceiling to be just under the floor height, and replace @@ -502,21 +478,24 @@ static void R_AddLine(seg_t *line) SLOPEPARAMS( backsector->f_slope, backf1, backf2, backsector->floorheight) SLOPEPARAMS( backsector->c_slope, backc1, backc2, backsector->ceilingheight) #undef SLOPEPARAMS - if ((backc1 <= frontf1 && backc2 <= frontf2) - || (backf1 >= frontc1 && backf2 >= frontc2)) + if (viewsector != backsector && viewsector != frontsector) { - goto clipsolid; + if ((backc1 <= frontf1 && backc2 <= frontf2) + || (backf1 >= frontc1 && backf2 >= frontc2)) + { + goto clipsolid; + } + + // Check for automap fix. Store in doorclosed for r_segs.c + doorclosed = (backc1 <= backf1 && backc2 <= backf2 + && ((backc1 >= frontc1 && backc2 >= frontc2) || curline->sidedef->toptexture) + && ((backf1 <= frontf1 && backf2 >= frontf2) || curline->sidedef->bottomtexture) + && (backsector->ceilingpic != skyflatnum || frontsector->ceilingpic != skyflatnum)); + + if (doorclosed) + goto clipsolid; } - // Check for automap fix. Store in doorclosed for r_segs.c - doorclosed = (backc1 <= backf1 && backc2 <= backf2 - && ((backc1 >= frontc1 && backc2 >= frontc2) || curline->sidedef->toptexture) - && ((backf1 <= frontf1 && backf2 >= frontf2) || curline->sidedef->bottomtexture) - && (backsector->ceilingpic != skyflatnum || frontsector->ceilingpic != skyflatnum)); - - if (doorclosed) - goto clipsolid; - // Window. if (backc1 != frontc1 || backc2 != frontc2 || backf1 != frontf1 || backf2 != frontf2) @@ -527,16 +506,23 @@ static void R_AddLine(seg_t *line) else #endif { - if (backsector->ceilingheight <= frontsector->floorheight - || backsector->floorheight >= frontsector->ceilingheight) + if (viewsector != backsector && viewsector != frontsector) { - goto clipsolid; - } + if (backsector->ceilingheight <= frontsector->floorheight + || backsector->floorheight >= frontsector->ceilingheight) + { + goto clipsolid; + } - // Check for automap fix. Store in doorclosed for r_segs.c - doorclosed = R_DoorClosed(); - if (doorclosed) - goto clipsolid; + // Check for automap fix. Store in doorclosed for r_segs.c + doorclosed = (backsector->ceilingheight <= backsector->floorheight + && (backsector->ceilingheight >= frontsector->ceilingheight || curline->sidedef->toptexture) + && (backsector->floorheight <= frontsector->floorheight || curline->sidedef->bottomtexture) + && (backsector->ceilingpic != skyflatnum || frontsector->ceilingpic != skyflatnum)); + + if (doorclosed) + goto clipsolid; + } // Window. if (backsector->ceilingheight != frontsector->ceilingheight diff --git a/src/r_segs.c b/src/r_segs.c index 11287f16..231a84f7 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -1365,7 +1365,7 @@ static void R_RenderSegLoop (void) if (bottom >= floorclip[rw_x]) bottom = floorclip[rw_x]-1; - if (top <= bottom) + if (top <= bottom && ceilingplane) { ceilingplane->top[rw_x] = (INT16)top; ceilingplane->bottom[rw_x] = (INT16)bottom; @@ -2113,52 +2113,55 @@ void R_StoreWallRange(INT32 start, INT32 stop) // ds_p->sprtopclip = screenheightarray; } -#ifdef ESLOPE - if (worldhigh <= worldbottom && worldhighslope <= worldbottomslope) -#else - if (worldhigh <= worldbottom) -#endif - { - ds_p->sprbottomclip = negonearray; - ds_p->bsilheight = INT32_MAX; - ds_p->silhouette |= SIL_BOTTOM; - } - -#ifdef ESLOPE - if (worldlow >= worldtop && worldlowslope >= worldtopslope) -#else - if (worldlow >= worldtop) -#endif - { - ds_p->sprtopclip = screenheightarray; - ds_p->tsilheight = INT32_MIN; - ds_p->silhouette |= SIL_TOP; - } - - //SoM: 3/25/2000: This code fixes an automap bug that didn't check - // frontsector->ceiling and backsector->floor to see if a door was closed. - // Without the following code, sprites get displayed behind closed doors. + if (viewsector != frontsector && viewsector != backsector) { #ifdef ESLOPE - if (doorclosed || (worldhigh <= worldbottom && worldhighslope <= worldbottomslope)) + if (worldhigh <= worldbottom && worldhighslope <= worldbottomslope) #else - if (doorclosed || backsector->ceilingheight <= frontsector->floorheight) + if (worldhigh <= worldbottom) #endif { ds_p->sprbottomclip = negonearray; ds_p->bsilheight = INT32_MAX; ds_p->silhouette |= SIL_BOTTOM; } + #ifdef ESLOPE - if (doorclosed || (worldlow >= worldtop && worldlowslope >= worldtopslope)) + if (worldlow >= worldtop && worldlowslope >= worldtopslope) #else - if (doorclosed || backsector->floorheight >= frontsector->ceilingheight) + if (worldlow >= worldtop) #endif - { // killough 1/17/98, 2/8/98 + { ds_p->sprtopclip = screenheightarray; ds_p->tsilheight = INT32_MIN; ds_p->silhouette |= SIL_TOP; } + + //SoM: 3/25/2000: This code fixes an automap bug that didn't check + // frontsector->ceiling and backsector->floor to see if a door was closed. + // Without the following code, sprites get displayed behind closed doors. + { +#ifdef ESLOPE + if (doorclosed || (worldhigh <= worldbottom && worldhighslope <= worldbottomslope)) +#else + if (doorclosed || backsector->ceilingheight <= frontsector->floorheight) +#endif + { + ds_p->sprbottomclip = negonearray; + ds_p->bsilheight = INT32_MAX; + ds_p->silhouette |= SIL_BOTTOM; + } +#ifdef ESLOPE + if (doorclosed || (worldlow >= worldtop && worldlowslope >= worldtopslope)) +#else + if (doorclosed || backsector->floorheight >= frontsector->ceilingheight) +#endif + { // killough 1/17/98, 2/8/98 + ds_p->sprtopclip = screenheightarray; + ds_p->tsilheight = INT32_MIN; + ds_p->silhouette |= SIL_TOP; + } + } } if (worldlow != worldbottom diff --git a/src/y_inter.c b/src/y_inter.c index 46e15e39..5d7456dd 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -560,13 +560,13 @@ void Y_Ticker(void) // Team scramble code for team match and CTF. // Don't do this if we're going to automatically scramble teams next round. - if (G_GametypeHasTeams() && cv_teamscramble.value && !cv_scrambleonchange.value && server) + /*if (G_GametypeHasTeams() && cv_teamscramble.value && !cv_scrambleonchange.value && server) { // If we run out of time in intermission, the beauty is that // the P_Ticker() team scramble code will pick it up. if ((intertic % (TICRATE/7)) == 0) P_DoTeamscrambling(); - } + }*/ // multiplayer uses timer (based on cv_inttime) if (timer)