~ubuntu-branches/ubuntu/trusty/manaplus/trusty-proposed

« back to all changes in this revision

Viewing changes to src/net/tmwa/playerhandler.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-07-11 10:09:41 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20130711100941-f0rwuvcwgl8ulqo8
Tags: 1.3.7.7.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
    if (!whoIsOnline)
223
223
        return;
224
224
 
 
225
    BLOCK_START("PlayerHandler::processOnlineList")
225
226
    const int size = msg.readInt16() - 4;
226
227
    std::vector<OnlinePlayer*> arr;
227
228
 
229
230
    {
230
231
        if (whoIsOnline)
231
232
            whoIsOnline->loadList(arr);
 
233
        BLOCK_END("PlayerHandler::processOnlineList")
232
234
        return;
233
235
    }
234
236
 
235
237
    char *const start = reinterpret_cast<char*>(msg.readBytes(size));
236
238
    if (!start)
 
239
    {
 
240
        BLOCK_END("PlayerHandler::processOnlineList")
237
241
        return;
 
242
    }
238
243
 
239
244
    const char *buf = start;
240
245
 
278
283
    if (whoIsOnline)
279
284
        whoIsOnline->loadList(arr);
280
285
    delete [] start;
 
286
    BLOCK_END("PlayerHandler::processOnlineList")
281
287
}
282
288
 
283
289
void PlayerHandler::updateStatus(const uint8_t status) const