From 977a9a68d2465818a331643399a9ecc998d0cbb3 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 9 Nov 2013 15:22:44 +0000 Subject: Bumped network protocol to version 27, send player reputation and stats from server to client, send entity faction to clients, improved list_entity. --- src/core/reputation.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/core/reputation.h') 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 -- cgit v1.2.3