Skip to content

Commit

Permalink
Set players to hostile with each other in the big map
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrettin committed Aug 21, 2016
1 parent 60f11a7 commit a00fe84
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/map/script_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@

#include "map.h"

//Wyrmgus start
#include "commands.h"
//Wyrmgus end
#include "iolib.h"
#include "script.h"
#include "tileset.h"
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit a00fe84

Please sign in to comment.