From a00fe845c976ceb9742b24cf3a0b343e22f44243 Mon Sep 17 00:00:00 2001 From: Andrettin Date: Sun, 21 Aug 2016 21:40:15 +0200 Subject: [PATCH] Set players to hostile with each other in the big map --- src/map/script_map.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/map/script_map.cpp b/src/map/script_map.cpp index 5852672b4..76e863ebb 100644 --- a/src/map/script_map.cpp +++ b/src/map/script_map.cpp @@ -37,6 +37,9 @@ #include "map.h" +//Wyrmgus start +#include "commands.h" +//Wyrmgus end #include "iolib.h" #include "script.h" #include "tileset.h" @@ -812,6 +815,14 @@ void ApplyMapTemplate(std::string map_template_ident, int template_start_x, int for (size_t i = 0; i < map_template->GeneratedResources.size(); ++i) { Map.GenerateResources(map_template->GeneratedResources[i].first, map_template->GeneratedResources[i].second, map_start_pos, map_end - Vec2i(1, 1)); } + + // set players to hostile with each other + for (int i = 0; i < PlayerMax - 1; ++i) { + for (int j = i + 1; j < PlayerMax - 1; ++j) { + CommandDiplomacy(i, DiplomacyEnemy, j); + CommandDiplomacy(j, DiplomacyEnemy, i); + } + } } //Wyrmgus end