Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9008 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Jul 2, 2006, 2:22:19 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the network bak to the trunk
merged with command:
svn merge -r8804:HEAD https://svn.orxonox.net/orxonox/branches/multi_player_map .

conflicts all resolved in favour of the branche

Location:
trunk/src/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/lib/collision_detection/bounding_volume.h

    r7711 r9008  
    3838    const int*          triangleIndexes;            //!< Array with the triangle indexes in modelInfo
    3939    int                 triangleIndexesLength;      //!< length of the indexes array
     40
     41    float               radius;                     //!< the radius of the box (longest axis)
    4042};
    4143
  • TabularUnified trunk/src/lib/collision_detection/obb_tree_node.cc

    r8776 r9008  
    364364    }
    365365  }
     366  this->bvElement->radius = longestAxis;
    366367  PRINTF(4)("\nLongest Axis is: Nr %i with a half-length of:%11.2f\n", longestAxisIndex, longestAxis);
    367368
     
    454455    return;
    455456
     457  float distanceMax = this->bvElement->radius + ((OBBTreeNode*)treeNode)->bvElement->radius;
     458  float distance = fabs((nodeA->getAbsCoor() - nodeB->getAbsCoor()).len());
     459
     460
     461//   if( distance < distanceMax)
     462//     PRINTF(0)(" %s (%s: group %i) vs %s (%s: group %i): distanceMax: %f, distance: %f\n", nodeA->getClassName(), nodeA->getName(), nodeA->getOMListNumber(), nodeB->getClassName(),  nodeB->getName(), nodeB->getOMListNumber(), distanceMax, distance);
     463
     464
    456465  PRINTF(4)("collideWith\n");
    457466  PRINTF(5)("Checking OBB %i vs %i: ", this->getIndex(), treeNode->getIndex());
     
    482491      if( this->overlapTest(this->nodeLeft->bvElement, treeNode->bvElement, nodeA, nodeB))
    483492      {
     493        bool bAdvance = false;
    484494        if( treeNode->nodeLeft != NULL)
    485495          this->nodeLeft->collideWith(treeNode->nodeLeft, nodeA, nodeB);
     496        else
     497          bAdvance = true;
     498
    486499        if( treeNode->nodeRight != NULL)
    487500          this->nodeLeft->collideWith(treeNode->nodeRight, nodeA, nodeB);
     501        else
     502          bAdvance = true;
     503
     504        if( bAdvance)
     505          this->nodeLeft->collideWith(treeNode, nodeA, nodeB);  // go down the other tree also
    488506      }
    489507    }
     
    494512      if( this->overlapTest(this->nodeRight->bvElement, treeNode->bvElement, nodeA, nodeB))
    495513      {
     514        bool bAdvance = false;
     515
    496516        if( treeNode->nodeLeft != NULL)
    497517          this->nodeRight->collideWith(treeNode->nodeLeft, nodeA, nodeB);
     518        else
     519          bAdvance = true;
     520
    498521        if( treeNode->nodeRight != NULL)
    499522          this->nodeRight->collideWith(treeNode->nodeRight, nodeA, nodeB);
     523        else
     524          bAdvance = true;
     525
     526        if( bAdvance)
     527          this->nodeRight->collideWith(treeNode, nodeA, nodeB);  // go down the other tree also
    500528      }
    501529    }
     
    516544        (treeNode->nodeRight == NULL && treeNode->nodeLeft == NULL)) )
    517545    {
     546//       PRINTF(0)("----------------------------------------------\n\n\n\n\n\n--------------------------------\n\n\n");
    518547      nodeA->registerCollision(nodeA, nodeB, (BoundingVolume*)this->bvElement, (BoundingVolume*)treeNode->bvElement);
    519548    }
  • TabularUnified trunk/src/lib/collision_reaction/cr_object_damage.cc

    r8779 r9008  
    5656  float damage = 0.0f;
    5757
    58   PRINTF(4)("Dealing damage - Handling collision: %s vs %s\n",
     58  PRINTF(0)("Dealing damage - Handling collision: %s vs %s\n",
    5959            collision->getEntityA()->getClassName(),
    6060            collision->getEntityB()->getClassName());
     
    6363  if( collision->isEntityACollide()) {
    6464    damage = collision->getEntityB()->getDamage();
    65     collision->getEntityA()->hit(damage);
     65    collision->getEntityA()->hit(damage, collision->getEntityB());
    6666  }
    6767  PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassName());
     
    6969  if( collision->isEntityBCollide()) {
    7070    damage = collision->getEntityA()->getDamage();
    71     collision->getEntityB()->hit(damage);
     71    collision->getEntityB()->hit(damage, collision->getEntityA());
    7272  }
    7373  PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassName());
  • TabularUnified trunk/src/lib/network/message_manager.h

    r8708 r9008  
    3232  MSGID_PREFEREDTEAM,
    3333  MSGID_CHANGENICKNAME,
    34   MSGID_CHATMESSAGE
     34  MSGID_CHATMESSAGE,
     35  MSGID_RESPAWN
    3536};
    3637
  • TabularUnified trunk/src/lib/network/network_game_manager.cc

    r8708 r9008  
    3939
    4040#include "network_game_manager.h"
     41
     42#include "multiplayer_team_deathmatch.h"
    4143
    4244
     
    118120  stats->setPlayableUniqueId( playable.getUniqueID() );
    119121  stats->setModelFileName( playableModel );
     122 
     123  if ( rules.isA( CL_MULTIPLAYER_TEAM_DEATHMATCH ) )
     124    dynamic_cast<MultiplayerTeamDeathmatch*>(&rules)->respawnPlayable( &playable, team, 0.0f );
    120125 
    121126  return true;
Note: See TracChangeset for help on using the changeset viewer.