Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2009, 8:47:08 PM (16 years ago)
Author:
adrfried
Message:

some ggz things

Location:
code/branches/ggz/src/orxonox/gamestates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ggz/src/orxonox/gamestates/GSClient.cc

    r2171 r3000  
    2424 *   Co-authors:
    2525 *      Fabian 'x3n' Landau
     26 *      Adrian Friedli
    2627 *
    2728 */
     
    5354        Core::setIsClient(true);
    5455
     56#ifdef HAS_GGZ
     57        ggzClient = NULL;
     58        if (GGZClient::isActive()) {
     59            COUT(3) << "Initializing GGZ\n";
     60            ggzClient = new GGZClient;
     61        }
     62        else {
     63            COUT(3) << "Not using GGZ\n";
     64        }
     65#else  /* HAS_GGZ */
     66        COUT(3) << "GGZ support disabled\n";
     67#endif /* HAS_GGZ */
     68
    5569        this->client_ = new Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port"));
    5670
     
    6983        client_->closeConnection();
    7084
     85#ifdef HAS_GGZ
     86        if (ggzClient)
     87        {
     88            delete ggzClient;
     89        }
     90#endif /* HAS_GGZ */
     91
    7192        // destroy client
    7293        delete this->client_;
  • code/branches/ggz/src/orxonox/gamestates/GSClient.h

    r2171 r3000  
    2323 *      Reto Grieder
    2424 *   Co-authors:
    25  *      ...
     25 *      Adrian Friedli
    2626 *
    2727 */
     
    3434#include "GSLevel.h"
    3535#include "GSGraphics.h"
     36#ifdef HAS_GGZ
     37#include "GGZClient.h"
     38#endif /* HAS_GGZ */
    3639
    3740namespace orxonox
     
    5053
    5154        Client* client_;
     55#ifdef HAS_GGZ
     56        GGZClient* ggzClient;
     57#endif /* HAS_GGZ */
     58
    5259    };
    5360}
Note: See TracChangeset for help on using the changeset viewer.