Skip to content

Commit

Permalink
Fixed missing fog in domination sectors after warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
Evghenii committed Jul 22, 2023
1 parent 7c3570a commit 1676922
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/domination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,14 @@ void DOMINATION_Reset(void)
for(unsigned int j = 0;j < level.info->SectorInfo.Points[i]->Size();j++)
{
if(j < static_cast<unsigned> (numsectors))
{
sectors[(*level.info->SectorInfo.Points[i])[0]].SetFade(POINT_DEFAULT_R, POINT_DEFAULT_G, POINT_DEFAULT_B);

if ( NETWORK_GetState( ) == NETSTATE_SERVER )
{
SERVERCOMMANDS_SetSectorFade( (*level.info->SectorInfo.Points[i])[0] );
}
}
}
}
}
Expand Down
9 changes: 6 additions & 3 deletions src/g_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3370,9 +3370,6 @@ void GAME_ResetMap( bool bRunEnterScripts )
if ( !(level.flags & LEVEL_STARTLIGHTNING) )
P_ForceLightning( 2 );

// [BB] Reset special stuff for the current gamemode, like control point ownership in Domination.
GAMEMODE_ResetSpecalGamemodeStates();

// [BB] If a PowerTimeFreezer was in effect, the sound could be paused. Make sure that it is resumed.
S_ResumeSound( false );

Expand Down Expand Up @@ -3741,6 +3738,9 @@ void GAME_ResetMap( bool bRunEnterScripts )
SERVERCOMMANDS_SetMapSky( );
}

// [BB] Reset special stuff for the current gamemode, like control point ownership in Domination.
GAMEMODE_ResetSpecalGamemodeStates();

// Reset the number of monsters killed, items picked up, and found secrets on the level.
level.killed_monsters = 0;
level.found_items = 0;
Expand All @@ -3757,6 +3757,9 @@ void GAME_ResetMap( bool bRunEnterScripts )
// by the map and removed during the game, e.g. killed lost souls spawned by a pain
// elemental.
level.total_monsters = 0;

// [BB] Reset special stuff for the current gamemode, like control point ownership in Domination.
GAMEMODE_ResetSpecalGamemodeStates();

// Restart the map music.
S_ChangeMusic( level.Music.GetChars(), level.musicorder );
Expand Down

0 comments on commit 1676922

Please sign in to comment.