Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/reputation.h')
-rw-r--r--src/core/reputation.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/reputation.h b/src/core/reputation.h
index 87d3ea9..d20a210 100644
--- a/src/core/reputation.h
+++ b/src/core/reputation.h
@@ -87,6 +87,11 @@ public:
void set_reputation(const Info *faction, const float reputation);
+ inline void set_dirty(const bool dirty = true)
+ {
+ reputation_dirty = dirty;
+ }
+
void clear();
void assign(const Reputation &other);
@@ -96,8 +101,25 @@ public:
return reputation_factionreps;
}
+ inline const bool dirty() const
+ {
+ return reputation_dirty;
+ }
+
+ /* ---- deserializers -------------------------------------- */
+
+ /// receive a server-to-client update from a stream
+ void receive_server_update(std::istream &is);
+
+ /* ---- serializers ---------------------------------------- */
+
+ /// serialize a server-to-client update on a stream
+ void serialize_server_update(std::ostream & os) const;
+
private:
FactionReps reputation_factionreps;
+
+ bool reputation_dirty;
};
} // namespace core