Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-09 15:22:44 +0000
committerStijn Buys <ingar@osirion.org>2013-11-09 15:22:44 +0000
commit977a9a68d2465818a331643399a9ecc998d0cbb3 (patch)
tree5e19904a95119ebc22cfffedcf4bd7b2094e4e31 /src/core/reputation.h
parentd0b6e591fbaf3db5fc9898e75913e57a3c32169a (diff)
Bumped network protocol to version 27,
send player reputation and stats from server to client, send entity faction to clients, improved list_entity.
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