Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 6, 2009, 1:59:00 AM (16 years ago)
Author:
landauf
Message:

Merged gui branch back to trunk.

I did 2 small changes in IngameManager.cc on line 777 and 888 (yes, really), because const_reverse_iterator strangely doesn't work on MinGW.

Location:
code/trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/network/ChatListener.cc

    r2171 r2896  
    3030
    3131#include "core/CoreIncludes.h"
    32 #include "core/Core.h"
    3332
    3433namespace orxonox
  • code/trunk/src/network/Client.cc

    r2773 r2896  
    4545#include "Host.h"
    4646#include "synchronisable/Synchronisable.h"
     47#include "core/Clock.h"
    4748#include "core/CoreIncludes.h"
    4849#include "packet/Packet.h"
     
    138139   * @param time
    139140   */
    140   void Client::tick(float time){
     141  void Client::update(const Clock& time){
    141142//     COUT(3) << ".";
    142143    if(client_connection.isConnected() && isSynched_){
  • code/trunk/src/network/Client.h

    r2773 r2896  
    7676    //bool sendChat(packet::Chat *chat);
    7777
    78     void tick(float time);
     78    void update(const Clock& time);
    7979
    8080  private:
  • code/trunk/src/network/ClientConnectionListener.cc

    r2171 r2896  
     1/*
     2 *   ORXONOX - the hottest 3D action shooter ever to exist
     3 *                    > www.orxonox.net <
     4 *
     5 *
     6 *   License notice:
     7 *
     8 *   This program is free software; you can redistribute it and/or
     9 *   modify it under the terms of the GNU General Public License
     10 *   as published by the Free Software Foundation; either version 2
     11 *   of the License, or (at your option) any later version.
     12 *
     13 *   This program is distributed in the hope that it will be useful,
     14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 *   GNU General Public License for more details.
     17 *
     18 *   You should have received a copy of the GNU General Public License
     19 *   along with this program; if not, write to the Free Software
     20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     21 *
     22 *   Author:
     23 *      Oliver Scheuss
     24 *   Co-authors:
     25 *      ...
     26 *
     27 */
     28
    129#include "ClientConnectionListener.h"
    230#include "core/CoreIncludes.h"
    3 #include "core/Core.h"
     31#include "core/GameMode.h"
    432
    533namespace orxonox{
     
    1139
    1240  void ClientConnectionListener::getConnectedClients(){
    13     if(Core::showsGraphics())
     41    if(GameMode::showsGraphics())
    1442      this->clientConnected(0); //server client id
    1543    ClientInformation *client = ClientInformation::getBegin();
  • code/trunk/src/network/ConnectionManager.cc

    r2773 r2896  
    4848#include <boost/thread/recursive_mutex.hpp>
    4949
     50#include "util/Debug.h"
    5051#include "util/Math.h"
    5152#include "util/Sleep.h"
  • code/trunk/src/network/Server.cc

    r2773 r2896  
    5151#include "ClientInformation.h"
    5252#include "util/Sleep.h"
     53#include "core/Clock.h"
    5354#include "core/ConsoleCommand.h"
    5455#include "core/CoreIncludes.h"
     
    149150  * @param time time since last tick
    150151  */
    151   void Server::tick(float time) {
     152  void Server::update(const Clock& time) {
    152153    processQueue();
    153154    //this steers our network frequency
    154     timeSinceLastUpdate_+=time;
     155    timeSinceLastUpdate_+=time.getDeltaTime();
    155156    if(timeSinceLastUpdate_>=NETWORK_PERIOD){
    156157      timeSinceLastUpdate_ -= static_cast<unsigned int>( timeSinceLastUpdate_ / NETWORK_PERIOD ) * NETWORK_PERIOD;
  • code/trunk/src/network/Server.h

    r2662 r2896  
    5353  const int CLIENTID_SERVER = 0;
    5454  const unsigned int NETWORK_FREQUENCY = 25;
    55   const float NETWORK_PERIOD = 1./NETWORK_FREQUENCY;
     55  const float NETWORK_PERIOD = 1.f/NETWORK_FREQUENCY;
    5656
    5757  /**
     
    7171    bool processChat(const std::string& message, unsigned int playerID);
    7272    bool queuePacket(ENetPacket *packet, int clientID);
    73     void tick(float time);
     73    void update(const Clock& time);
    7474    unsigned int getPing(unsigned int clientID);
    7575    double getPacketLoss(unsigned int clientID);
  • code/trunk/src/network/TrafficControl.cc

    r2662 r2896  
    3030
    3131#include "synchronisable/Synchronisable.h"
     32#include "core/CoreIncludes.h"
    3233#include "core/ConfigValueIncludes.h"
    3334
  • code/trunk/src/network/packet/Gamestate.cc

    r2773 r2896  
    3434#include "../synchronisable/Synchronisable.h"
    3535#include "../TrafficControl.h"
    36 #include "core/Core.h"
     36#include "core/GameMode.h"
    3737#include "core/CoreIncludes.h"
    3838#include "core/Iterator.h"
     
    162162    if(!s)
    163163    {
    164       if (!Core::isMaster())
     164      if (!GameMode::isMaster())
    165165      {
    166166        Synchronisable::fabricate(mem, mode);
  • code/trunk/src/network/packet/Gamestate.h

    r2759 r2896  
    3535#include "Packet.h"
    3636#include "network/TrafficControl.h"
    37 #include "core/CoreIncludes.h"
     37#include <string.h>
    3838#include <map>
    3939#include <list>
     40#include <cassert>
    4041#ifndef NDEBUG
    4142#include "util/CRC32.h"
  • code/trunk/src/network/synchronisable/NetworkCallback.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • code/trunk/src/network/synchronisable/Synchronisable.cc

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • code/trunk/src/network/synchronisable/Synchronisable.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • code/trunk/src/network/synchronisable/SynchronisableVariable.cc

    r2710 r2896  
    3030#include <cstring>
    3131#include "util/Math.h"
     32#include "core/GameMode.h"
    3233
    3334
     
    3637uint8_t SynchronisableVariableBase::state_ = 0;
    3738
     39/*static*/ void SynchronisableVariableBase::setState()
     40{
     41  if ( state_ == 0x0 )
     42  {
     43    state_ = GameMode::isMaster() ? 0x1 : 0x2;  // set the appropriate mode here
     44  }
     45}
    3846
    3947
  • code/trunk/src/network/synchronisable/SynchronisableVariable.h

    r2710 r2896  
    3535#include <string>
    3636#include <cassert>
    37 #include "core/Core.h"
    38 #include "core/CoreIncludes.h"
     37#include "util/Math.h"
    3938#include "network/synchronisable/NetworkCallback.h"
    4039#include "network/synchronisable/NetworkCallbackManager.h"
     
    6362      virtual ~SynchronisableVariableBase() {}
    6463    protected:
     64      static void setState();
    6565      static uint8_t state_;
    6666  };
     
    110110      variable_( variable ), mode_( syncDirection ), callback_( cb )
    111111  {
    112     if ( state_ == 0x0 )
    113     {
    114       state_ = Core::isMaster() ? 0x1 : 0x2;  // set the appropriate mode here
    115     }
     112      setState();
    116113  }
    117114 
Note: See TracChangeset for help on using the changeset viewer.