Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9470 in orxonox.OLD for branches/proxy/src/world_entities


Ignore:
Timestamp:
Jul 25, 2006, 10:23:17 PM (18 years ago)
Author:
patrick
Message:

heavy permissions fight: no node was ever thought to be client and server at the same time, proxy server are hybrid nodes so there is need for a big framework extension.

  • made the obb creation saver
  • prevented segfaults in the aabb tree creation, this was very dangerous code
  • inserted handshake hack to make the handshake work.

No I will have to get the handshake right so the node works correctly

Location:
branches/proxy/src/world_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/world_entities/creatures/fps_player.cc

    r9452 r9470  
    287287  //dealing damage
    288288
    289   if ( State::isOnline() && (SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()))
     289  if ( State::isOnline() && (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/))
    290290  {
    291291    this->damageTicker -= time;
  • branches/proxy/src/world_entities/space_ships/space_ship.cc

    r9452 r9470  
    310310void SpaceShip::collidesWith(WorldEntity* entity, const Vector& location)
    311311{
    312   Playable::collidesWith(entity, location);
    313 
    314   if( entity->isA(CL_PROJECTILE) && entity != ref)
    315   {
    316     if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive())
    317     {
    318       //TODO handle this
    319     }
    320   }
    321   PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassCName(), entity->getClassCName(), location.x, location.y, location.z);
     312
    322313}
    323314
  • branches/proxy/src/world_entities/world_entity.cc

    r9406 r9470  
    257257bool WorldEntity::buildObbTree(int depth)
    258258{
    259   if (this->obbTree)
     259  if( this->obbTree != NULL)
     260  {
    260261    delete this->obbTree;
     262    this->obbTree = NULL;
     263  }
    261264
    262265  if (this->models[0] != NULL)
     
    280283    this->aabbNode = new AABBTreeNode();
    281284    this->aabbNode->spawnBVTree(this->models[0]);
     285  }
     286  else
     287  {
     288    PRINTF(1)("could not create aabb bounding box, because no model was loaded yet\n");
     289    this->aabbNode = NULL;
     290    return false;
    282291  }
    283292  return true;
Note: See TracChangeset for help on using the changeset viewer.