Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1279


Ignore:
Timestamp:
May 15, 2008, 11:42:50 AM (17 years ago)
Author:
scheusso
Message:

adapted boost threads in clientconnection
added trap to runscript (xset r, autorepeat)
had to change assff back to assf3 due to some network issues

Location:
code/branches/merge
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/merge/bin/levels/sample.oxw

    r1274 r1279  
    1111<!--Ambient colourvalue="1,1,1" /-->
    1212<Skybox src="Orxonox/StarSkyBox" />
    13 <SpaceShip camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assff.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
     13<SpaceShip camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assf3.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
    1414
    1515<NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
  • code/branches/merge/bin/run-script

    r790 r1279  
    2222        fi
    2323fi
     24trap "xset r" EXIT HUP INT TERM ABRT
    2425exec ./orxonox $@
  • code/branches/merge/src/network/ClientConnection.cc

    r1264 r1279  
    4242#include <iostream>
    4343// boost.thread library for multithreading support
    44 #include <boost/thread/thread.hpp>
    4544#include <boost/bind.hpp>
    4645
     
    5049namespace network
    5150{
    52   static boost::thread_group network_threads;
     51  //static boost::thread_group network_threads;
    5352
    5453  ClientConnection::ClientConnection(int port, std::string address) {
     
    9695
    9796  bool ClientConnection::createConnection() {
    98     network_threads.create_thread(boost::bind(boost::mem_fn(&ClientConnection::receiverThread), this));
     97    receiverThread_ = new boost::thread(boost::bind(&ClientConnection::receiverThread, this));
     98    //network_threads.create_thread(boost::bind(boost::mem_fn(&ClientConnection::receiverThread), this));
    9999    // wait 10 seconds for the connection to be established
    100100    return waitEstablished(10000);
     
    103103  bool ClientConnection::closeConnection() {
    104104    quit=true;
    105     network_threads.join_all();
     105    //network_threads.join_all();
     106    receiverThread_->join();
    106107    established=false;
    107108    return true;
     
    179180        continue;
    180181      }
     182      //receiverThread_->yield();
    181183    }
    182184    // now disconnect
  • code/branches/merge/src/network/ClientConnection.h

    r1264 r1279  
    4545#include <string>
    4646#include <enet/enet.h>
     47#include <boost/thread/thread.hpp>
    4748
    4849#include "PacketBuffer.h"
     
    9394    // clientlist
    9495    ENetPeer *server;
     96    boost::thread *receiverThread_;
    9597  };
    9698
Note: See TracChangeset for help on using the changeset viewer.