Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6054 in orxonox.OLD for trunk/src/world_entities/npcs/npc_test.cc


Ignore:
Timestamp:
Dec 11, 2005, 6:23:42 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: multiple new Reparenting modes in PNode.
Testing the stuff in GuidedMissile
Projectile has a PNode as reference not as pointer
some minor weapon changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npcs/npc_test.cc

    r6004 r6054  
    5858
    5959
    60 void NPC2::collidesWith(WorldEntity* entity, const Vector& location)
    61 {
    62   if (entity->isA(CL_PROJECTILE))
    63   {
    64     PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getName(), entity->getName(), location.x, location.y, location.z);
    65     this->applyForce(Vector(0,0,0)-location*1000);
    66   }
    67   else if (entity->isA(CL_PLAYER))
    68     this->applyForce(Vector(0,0,0)-location*100);
    69   else
    70   {
    71     this->setVisibiliy(false);
    72    State::getWorldEntityList()->remove(this);
    73   }
    74 }
    75 
    7660
    7761/**
Note: See TracChangeset for help on using the changeset viewer.