summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/message.cc
diff options
context:
space:
mode:
authorPekka Lampila <pekka.lampila@iki.fi>2014-02-24 11:46:07 +0200
committerPekka Lampila <pekka.lampila@iki.fi>2014-03-01 02:10:18 +0200
commit608f08d4e8de5b9ae7ad0da9390d7d6765bc4d2e (patch)
treec9632669c67e61d3a1186e0ef8239462ba14c15d /crawl-ref/source/message.cc
parent077b0fa31e1107516377c45ae541f874a6d4c99e (diff)
downloadcrawl-ref-608f08d4e8de5b9ae7ad0da9390d7d6765bc4d2e.tar.gz
crawl-ref-608f08d4e8de5b9ae7ad0da9390d7d6765bc4d2e.zip
Wrap more of message_store code within ifdef USE_TILE_WEB.
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r--crawl-ref/source/message.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index 0758e8a373..93628b2a90 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -635,17 +635,16 @@ class message_store
bool last_of_turn;
int temp; // number of temporary messages
+#ifdef USE_TILE_WEB
int unsent; // number of messages not yet sent to the webtiles client
int client_rollback;
-#ifdef USE_TILE_WEB
bool send_ignore_one;
#endif
public:
- message_store() : last_of_turn(false), temp(0),
- unsent(0), client_rollback(0)
+ message_store() : last_of_turn(false), temp(0)
#ifdef USE_TILE_WEB
- , send_ignore_one(false)
+ , unsent(0), client_rollback(0), send_ignore_one(false)
#endif
{}
@@ -685,7 +684,9 @@ public:
void roll_back()
{
+#ifdef USE_TILE_WEB
client_rollback = max(0, temp - unsent);
+#endif
msgs.roll_back(temp);
temp = 0;
}
@@ -704,7 +705,9 @@ public:
// writing out to the message window might
// in turn result in a recursive flush_prev.
prev_msg = message_item();
+#ifdef USE_TILE_WEB
unsent++;
+#endif
store_msg(msg);
if (last_of_turn)
{