Index: code/trunk/src/network/ClientInformation.cc
===================================================================
--- code/trunk/src/network/ClientInformation.cc	(revision 3280)
+++ code/trunk/src/network/ClientInformation.cc	(revision 3301)
@@ -166,5 +166,5 @@
 
   double ClientInformation::getPacketLoss(){
-    return ((double)this->peer_->packetLoss)/ENET_PEER_PACKET_LOSS_SCALE;
+    return static_cast<double>(this->peer_->packetLoss)/ENET_PEER_PACKET_LOSS_SCALE;
   }
 
@@ -173,5 +173,5 @@
       return gamestateID_;
     else
-      return (unsigned int)-1;
+      return static_cast<unsigned int>(-1);
   }
 
@@ -180,5 +180,5 @@
       return partialGamestateID_;
     else
-      return (unsigned int)-1;
+      return static_cast<unsigned int>(-1);
   }
 
@@ -197,5 +197,5 @@
 
   bool ClientInformation::removeClient(unsigned int clientID) {
-    if((unsigned int)clientID==CLIENTID_UNKNOWN)
+    if(clientID==CLIENTID_UNKNOWN)
       return false;
     ClientInformation *temp = head_;
Index: code/trunk/src/network/GamestateClient.h
===================================================================
--- code/trunk/src/network/GamestateClient.h	(revision 3280)
+++ code/trunk/src/network/GamestateClient.h	(revision 3301)
@@ -47,5 +47,5 @@
 #include "GamestateHandler.h"
 
-const unsigned int GAMESTATEID_INITIAL = (unsigned int)-1;
+const unsigned int GAMESTATEID_INITIAL = static_cast<unsigned int>(-1);
 
 namespace orxonox
Index: code/trunk/src/network/GamestateManager.cc
===================================================================
--- code/trunk/src/network/GamestateManager.cc	(revision 3280)
+++ code/trunk/src/network/GamestateManager.cc	(revision 3301)
@@ -174,5 +174,5 @@
     }
 
-    assert(curid==(unsigned int)GAMESTATEID_INITIAL || curid<gamestateID);
+    assert(curid==GAMESTATEID_INITIAL || curid<gamestateID);
     COUT(4) << "acking gamestate " << gamestateID << " for clientid: " << clientID << " curid: " << curid << std::endl;
     std::map<unsigned int, packet::Gamestate*>::iterator it;
Index: code/trunk/src/network/NetworkPrereqs.h
===================================================================
--- code/trunk/src/network/NetworkPrereqs.h	(revision 3280)
+++ code/trunk/src/network/NetworkPrereqs.h	(revision 3301)
@@ -61,7 +61,7 @@
 namespace orxonox
 {
-  static const unsigned int GAMESTATEID_INITIAL = (unsigned int)-1;
-  static const unsigned int CLIENTID_UNKNOWN    = (unsigned int)-2;
-  static const uint32_t     OBJECTID_UNKNOWN    = (uint32_t)(-1);
+  static const unsigned int GAMESTATEID_INITIAL = static_cast<unsigned int>(-1);
+  static const unsigned int CLIENTID_UNKNOWN    = static_cast<unsigned int>(-2);
+  static const uint32_t     OBJECTID_UNKNOWN    = static_cast<uint32_t>(-1);
 }
 
Index: code/trunk/src/network/TrafficControl.cc
===================================================================
--- code/trunk/src/network/TrafficControl.cc	(revision 3280)
+++ code/trunk/src/network/TrafficControl.cc	(revision 3301)
@@ -38,5 +38,5 @@
 namespace orxonox {
 
-  static const unsigned int SCHED_PRIORITY_OFFSET = (unsigned int)-1;
+  static const unsigned int SCHED_PRIORITY_OFFSET = static_cast<unsigned int>(-1);
 
   objInfo::objInfo(uint32_t ID, uint32_t creatorID, int32_t curGsID, int32_t diffGsID, uint32_t size, unsigned int prioperm, unsigned int priosched)
Index: code/trunk/src/network/packet/Chat.cc
===================================================================
--- code/trunk/src/network/packet/Chat.cc	(revision 3280)
+++ code/trunk/src/network/packet/Chat.cc	(revision 3301)
@@ -51,5 +51,5 @@
   *(unsigned int *)(data_ + _PLAYERID ) = playerID;
   *(unsigned int *)(data_ + _MESSAGELENGTH ) = messageLength_;
-  memcpy( data_+_MESSAGE, (void *)message.c_str(), messageLength_ );
+  memcpy( data_+_MESSAGE, static_cast<void*>(const_cast<char*>(message.c_str())), messageLength_ );
 }
 
Index: code/trunk/src/network/packet/Packet.cc
===================================================================
--- code/trunk/src/network/packet/Packet.cc	(revision 3280)
+++ code/trunk/src/network/packet/Packet.cc	(revision 3301)
@@ -143,5 +143,5 @@
       // Assures we don't create a packet and destroy it right after in another thread
       // without having a reference in the packetMap_
-      packetMap_[(size_t)(void*)enetPacket_] = this;
+      packetMap_[reinterpret_cast<size_t>(enetPacket_)] = this;
     }
   }
@@ -172,5 +172,5 @@
 Packet *Packet::createPacket(ENetPacket *packet, ENetPeer *peer){
   uint8_t *data = packet->data;
-  assert(ClientInformation::findClient(&peer->address)->getID() != (unsigned int)-2 || !Host::isServer());
+  assert(ClientInformation::findClient(&peer->address)->getID() != static_cast<unsigned int>(-2) || !Host::isServer());
   unsigned int clientID = ClientInformation::findClient(&peer->address)->getID();
   Packet *p = 0;
@@ -230,5 +230,5 @@
 void Packet::deletePacket(ENetPacket *enetPacket){
   // Get our Packet from a gloabal map with all Packets created in the send() method of Packet.
-  std::map<size_t, Packet*>::iterator it = packetMap_.find((size_t)enetPacket);
+  std::map<size_t, Packet*>::iterator it = packetMap_.find(reinterpret_cast<size_t>(enetPacket));
   assert(it != packetMap_.end());
   // Make sure we don't delete it again in the destructor
Index: code/trunk/src/network/synchronisable/Synchronisable.h
===================================================================
--- code/trunk/src/network/synchronisable/Synchronisable.h	(revision 3280)
+++ code/trunk/src/network/synchronisable/Synchronisable.h	(revision 3301)
@@ -44,5 +44,5 @@
 
 /*#define REGISTERDATA(varname, ...) \
-    registerVariable((void*)&varname, sizeof(varname), DATA, __VA_ARGS__)
+    registerVariable(static_cast<void*>(&varname), sizeof(varname), DATA, __VA_ARGS__)
 #define REGISTERSTRING(stringname, ...) \
     registerVariable(&stringname, stringname.length()+1, STRING, __VA_ARGS__)*/
Index: code/trunk/src/network/synchronisable/SynchronisableVariable.h
===================================================================
--- code/trunk/src/network/synchronisable/SynchronisableVariable.h	(revision 3280)
+++ code/trunk/src/network/synchronisable/SynchronisableVariable.h	(revision 3301)
@@ -36,4 +36,5 @@
 #include <cstring>
 #include "util/Serialise.h"
+#include "util/TemplateUtils.h"
 #include "core/GameMode.h"
 #include "network/synchronisable/NetworkCallbackManager.h"
@@ -78,5 +79,5 @@
       virtual inline void putData(uint8_t*& mem, uint8_t mode, bool forceCallback = false);
       virtual inline uint32_t getSize(uint8_t mode);
-      virtual inline void* getReference(){ return (void *)&this->variable_; }
+      virtual inline void* getReference(){ return static_cast<void*>(const_cast<typename TypeStripper<T>::RawType*>(&this->variable_)); }
     protected:
       
@@ -178,5 +179,5 @@
         {
           this->varReference_++;
-          memcpy((void*)&this->varBuffer_, &this->variable_, sizeof(this->variable_));
+          memcpy(static_cast<void*>(const_cast<typename TypeStripper<T>::RawType*>(&this->varBuffer_)), &this->variable_, sizeof(this->variable_));
         }
       }
@@ -211,5 +212,5 @@
           {
             mem += sizeof(varReference_);
-            memcpy((void*)&this->varBuffer_, &this->variable_, sizeof(T));
+            memcpy(static_cast<void*>(const_cast<typename TypeStripper<T>::RawType*>(&this->varBuffer_)), &this->variable_, sizeof(T));
             if ( this->callback_ != 0 )
               callback = true;
