- Timestamp:
- Oct 29, 2005, 4:58:49 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gtk_gui/gui_flags.cc
r5450 r5451 59 59 void GuiFlags::setTextFromFlags(Widget* widget) 60 60 { 61 if (widget == NULL)62 return;63 61 FlagInfo flagInfo; 64 62 flagInfo.shortFlags = this->shortFlags; -
trunk/src/world_entities/npc.cc
r5427 r5451 24 24 #include "list.h" 25 25 #include "stdlibincl.h" 26 #include "power_ups/turret_power_up.h" 26 27 27 28 using namespace std; … … 43 44 void NPC::collidesWith(WorldEntity* entity, const Vector& location) 44 45 { 45 if (entity->isA(CL_PROJECTILE) )46 if (entity->isA(CL_PROJECTILE) && entity != this->collider) 46 47 { 47 PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getName(), entity->getName(), location.x, location.y, location.z); 48 this->applyForce(Vector(0,0,0)-location*1000); 48 // PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getName(), entity->getName(), location.x, location.y, location.z); 49 // this->applyForce(Vector(0,0,0)-location*1000); 50 if ((float)rand()/RAND_MAX < .3) 51 { 52 WorldEntity* powerUp = new TurretPowerUp(); 53 powerUp->setAbsCoor(this->getAbsCoor()); 54 State::getWorldEntityList()->add(powerUp); 55 } 56 State::getWorldEntityList()->remove(this); 57 58 this->collider = entity; 49 59 } 50 60 else if (entity->isA(CL_PLAYER)) 51 61 this->applyForce(Vector(0,0,0)-location*100); 52 else 62 else if (entity->isA(CL_NPC)) 53 63 { 54 64 this->setVisibiliy(false); 55 State::getWorldEntityList()->remove(this);65 State::getWorldEntityList()->remove(this); 56 66 } 57 67 } -
trunk/src/world_entities/npc.h
r5257 r5451 25 25 Vector randomRotAxis; 26 26 27 ;27 WorldEntity* collider; 28 28 29 29 }; -
trunk/src/world_entities/weapons/test_bullet.cc
r5449 r5451 46 46 this->energyMax = 10; 47 47 this->remove(); 48 this->lifeSpan = 5;48 this->lifeSpan = 2; 49 49 50 50 this->emitter = new ParticleEmitter(Vector(0,1,0), M_2_PI, 100, 5);
Note: See TracChangeset
for help on using the changeset viewer.