Fix "remove all trees in scenario editor" being available in game.
This commit is contained in:
@@ -363,6 +363,8 @@ void PlaceTreesRandomly()
|
||||
*/
|
||||
void RemoveAllTrees()
|
||||
{
|
||||
if (_game_mode != GM_EDITOR) return;
|
||||
|
||||
for(uint i = 0; i < MapSizeX(); i++) {
|
||||
for(uint j = 0; j < MapSizeY(); j++) {
|
||||
TileIndex tile = TileXY(i, j);
|
||||
|
@@ -80,7 +80,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (widget != WID_BT_MANY_RANDOM) return;
|
||||
if (widget != WID_BT_MANY_RANDOM && widget != WID_BT_REMOVE_ALL) return;
|
||||
|
||||
if (_game_mode != GM_EDITOR) {
|
||||
size->width = 0;
|
||||
|
Reference in New Issue
Block a user