Changeset 3685 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Mar 30, 2005, 11:04:39 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/defs/debug.h
r3683 r3685 58 58 // DEFINE MODULES \\ 59 59 #define DEBUG_MODULE_ORXONOX 0 60 #define DEBUG_MODULE_WORLD 260 #define DEBUG_MODULE_WORLD 3 61 61 #define DEBUG_MODULE_PNODE 0 62 62 #define DEBUG_MODULE_WORLD_ENTITY 0 63 63 #define DEBUG_MODULE_COMMAND_NODE 0 64 64 #define DEBUG_MODULE_GRAPHICS 0 65 #define DEBUG_MODULE_LOAD 165 #define DEBUG_MODULE_LOAD 0 66 66 67 67 #define DEBUG_MODULE_IMPORTER 0 -
orxonox/trunk/src/garbage_collector.cc
r3670 r3685 39 39 this->setClassName ("GarbageCollection"); 40 40 this->time = 0; 41 this->delay = 3.0f; /* clean up all 5.0 seconds */41 this->delay = 1.5f; /* clean up all 5.0 seconds */ 42 42 } 43 43 -
orxonox/trunk/src/world_entities/player.cc
r3683 r3685 156 156 void Player::tick (float time) 157 157 { 158 /* link tick to weapon */ 159 this->activeWeapon->tick(time); 158 160 // player controlled movement 159 161 this->move(time); -
orxonox/trunk/src/world_entities/projectile.cc
r3683 r3685 37 37 this->flightDirection = NULL; 38 38 this->currentLifeTime = 0.0f; 39 this->ttl = 1.0f;39 this->ttl = 0.75f; /* sec */ 40 40 this->speed = 2.0f; 41 41 } … … 89 89 void Projectile::setSpeed(float speed) 90 90 { 91 this->speed = speed * 5;92 printf("Projectile::setting speed to: %f\n", this->speed);91 this->speed = speed * 3; 92 PRINTF(4)("Projectile::setting speed to: %f\n", this->speed); 93 93 } 94 94 … … 99 99 void Projectile::tick (float time) 100 100 { 101 this->speed = this->weapon->getSpeed() * 5;101 this->speed = this->weapon->getSpeed() * 3; 102 102 this->shiftCoor(*this->flightDirection * this->speed * time); 103 printf("current speed is: %f\n", this->speed);103 //printf("current speed is: %f\n", this->speed); 104 104 105 105 this->currentLifeTime += time; 106 if( this->ttl > this->currentLifeTime) 107 this->finalize(); 106 if( this->ttl < this->currentLifeTime) 107 { 108 PRINTF(5)("FINALIZE=============================================================\n"); 109 PRINTF(5)("current life time is: %f/%f\n", this->currentLifeTime, this->ttl); 110 PRINTF(5)("FINALIZE=============================================================\n"); 111 this->finalize(); 112 } 108 113 } 109 114 -
orxonox/trunk/src/world_entities/test_gun.cc
r3683 r3685 42 42 : Weapon (parent, coordinate, direction) 43 43 { 44 this->idleTime = 0.2f; 44 45 } 45 46 … … 83 84 void TestGun::fire() 84 85 { 85 //printf("TestGun::fire() - firing weapon now ---------------------------\n"); 86 if( this->localTime < this->idleTime) 87 return; 88 86 89 Projectile* pj = new Projectile(this); 87 90 … … 96 99 pj->setSpeed(this->getSpeed()); 97 100 98 99 100 101 this->worldEntities->add(pj); 102 this->localTime = 0; 101 103 } 102 104 … … 128 130 */ 129 131 void TestGun::tick (float time) 130 {} 132 { 133 this->localTime += time; 134 } 131 135 132 136 -
orxonox/trunk/src/world_entities/weapon.cc
r3677 r3685 154 154 */ 155 155 void Weapon::setWeaponIdleTime(float time) 156 {} 156 { 157 this->idleTime = time; 158 } 157 159 158 160 /** … … 164 166 */ 165 167 float Weapon::getWeaponIdleTime(void) 166 {} 168 { 169 return this->idleTime; 170 } 167 171 168 172 /** … … 174 178 */ 175 179 bool Weapon::hasWeaponIdleTimeElapsed(void) 176 {} 180 { 181 return (this->localTime>this->idleTime)?true:false; 182 } 177 183 178 184 -
orxonox/trunk/src/world_entities/weapon.h
r3646 r3685 71 71 protected: 72 72 tList<WorldEntity>* worldEntities; 73 float localTime; 74 float idleTime; 75 float slowDownFactor; 73 76 74 77 private: 75 78 bool enabled; 76 float localTime;77 float slowDownFactor;78 79 Projectile* projectile; 79 80 //WeaponSound sound;
Note: See TracChangeset
for help on using the changeset viewer.