Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/base')
-rw-r--r--src/game/base/faction.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/base/faction.cc b/src/game/base/faction.cc
index 07c0a3a..2afa0b0 100644
--- a/src/game/base/faction.cc
+++ b/src/game/base/faction.cc
@@ -198,6 +198,20 @@ bool Faction::init()
}
}
}
+
+ // enforce reciprocal reputation
+ for (core::Info::Registry::iterator it = core::Info::registry().begin(); it != core::Info::registry().end(); it++) {
+ core::Info *info = (*it);
+
+ if (info->type() == faction_infotype) {
+ faction = static_cast<Faction *>(info);
+
+ for (core::Reputation::FactionReps::iterator rip = faction->reputation().factionreps().begin(); rip != faction->reputation().factionreps().end(); ++rip) {
+ Faction *otherfaction = Faction::find((*rip)->faction()->label());
+ otherfaction->reputation().set_reputation(faction, (*rip)->reputation());
+ }
+ }
+ }
con_debug << " " << inifile.name() << " " << count << " factions" << std::endl;