From fdbd18c50e6693cc885befda56fbafb1fc91f1b8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 6 Jan 2008 10:05:24 +0000 Subject: [PATCH] - Added teamgame fix for menu by Karate Chris. - Added GZDoom's Sector_Outside sector type which forces outside fog regardless of ceiling texture. SVN r670 (trunk) --- docs/rh-log.txt | 5 +++++ src/d_netinfo.cpp | 2 +- src/m_menu.cpp | 8 ++++++-- src/p_lnspec.h | 1 + src/p_setup.cpp | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 0460e76ab..643482bc3 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +January 6, 2008 (Changes by Graf Zahl) +- Added teamgame fix for menu by Karate Chris. +- Added GZDoom's Sector_Outside sector type which forces outside fog + regardless of ceiling texture. + January 6, 2008 - Fixed: Since the minimum size for a texture is 2x2, FBarShader can't use a one-dimensional texture. diff --git a/src/d_netinfo.cpp b/src/d_netinfo.cpp index 7f519df22..8d8ea4a73 100644 --- a/src/d_netinfo.cpp +++ b/src/d_netinfo.cpp @@ -300,7 +300,7 @@ static void UpdateTeam (int pnum, int team, bool update) int oldteam; - if (team < 0) + if (!TEAMINFO_IsValidTeam (team)) { team = TEAM_None; } diff --git a/src/m_menu.cpp b/src/m_menu.cpp index 692d72b40..c5d30d18b 100644 --- a/src/m_menu.cpp +++ b/src/m_menu.cpp @@ -2585,7 +2585,7 @@ static void M_ChangePlayerTeam (int choice) { team = TEAM_None; } - else if (!TEAMINFO_IsValidTeam (team)) + else if (team == TEAM_None) { team = teams.Size () - 1; } @@ -2596,7 +2596,11 @@ static void M_ChangePlayerTeam (int choice) } else { - if (!TEAMINFO_IsValidTeam (team)) + if (team == teams.Size () - 1) + { + team = TEAM_None; + } + else if (team == TEAM_None) { team = 0; } diff --git a/src/p_lnspec.h b/src/p_lnspec.h index 3382f6fd8..347f69172 100644 --- a/src/p_lnspec.h +++ b/src/p_lnspec.h @@ -353,6 +353,7 @@ typedef enum { dDamage_LavaWimpy = 82, dDamage_LavaHefty = 83, dScroll_EastLavaDamage = 84, + Sector_Outside = 87, // And here are some for Strife sLight_Strobe_Hurt = 104, diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 4cde527b9..8e9141337 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1084,7 +1084,7 @@ void P_LoadSectors (MapData * map) // [RH] Sectors default to white light with the default fade. // If they are outside (have a sky ceiling), they use the outside fog. - if (level.outsidefog != 0xff000000 && ss->ceilingpic == skyflatnum) + if (level.outsidefog != 0xff000000 && (ss->ceilingpic == skyflatnum || (ss->special&0xff) == Sector_Outside)) { if (fogMap == NULL) fogMap = GetSpecialLights (PalEntry (255,255,255), level.outsidefog, 0);