3 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef ENVIRONMENT_HEADER
21 #define ENVIRONMENT_HEADER
24 This class is the game's environment.
29 - The current time in the game, etc.
33 #include "common_irrlicht.h"
41 // Environment will delete the map passed to the constructor
42 Environment(Map *map, std::ostream &dout);
45 This can do anything to the environment, such as removing
47 Also updates Map's timers.
54 Environment deallocates players after use.
56 void addPlayer(Player *player);
57 void removePlayer(u16 peer_id);
59 LocalPlayer * getLocalPlayer();
61 Player * getPlayer(u16 peer_id);
62 core::list<Player*> getPlayers();
63 void printPlayers(std::ostream &o);
66 void updateMeshes(v3s16 blockpos);
67 void expireMeshes(bool only_daynight_diffed);
69 void setDayNightRatio(u32 r);
70 u32 getDayNightRatio();
74 core::list<Player*> m_players;
75 // Debug output goes here