1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Cleaning logs.

This commit is contained in:
DjWarmonger
2014-09-10 19:09:48 +02:00
parent 228700b1a7
commit d9273b3b2a
3 changed files with 13 additions and 3 deletions

View File

@@ -4757,9 +4757,11 @@ void CGameHandler::handleTimeEvents()
while(gs->map->events.size() && gs->map->events.front().firstOccurence+1 == gs->day)
{
CMapEvent ev = gs->map->events.front();
for(int player = 0; player < PlayerColor::PLAYER_LIMIT_I; player++)
for (auto p : gs->players)
{
PlayerState *pinfo = gs->getPlayer(PlayerColor(player));
auto player = p.first.getNum();
auto pinfo = &p.second;
if( pinfo //player exists
&& (ev.players & 1<<player) //event is enabled to this player