Changeset 9371 in orxonox.OLD for branches/proxy/src/world_entities
- Timestamp:
- Jul 20, 2006, 11:08:16 PM (19 years ago)
- Location:
- branches/proxy/src/world_entities
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/world_entities/creatures/fps_player.cc
r9347 r9371 299 299 if ( victim ) 300 300 { 301 PRINTF(0)("FIRE: hit %s\n", victim->getClass Name());301 PRINTF(0)("FIRE: hit %s\n", victim->getClassCName()); 302 302 victim->hit( 20, this ); 303 303 } -
branches/proxy/src/world_entities/playable.cc
r9347 r9371 148 148 if (weapon != NULL) 149 149 PRINTF(2)("Unable to add Weapon (%s::%s) to %s::%s\n", 150 weapon->getClass Name(), weapon->getName(), this->getClassName(), this->getName());150 weapon->getClassCName(), weapon->getCName(), this->getClassCName(), this->getCName()); 151 151 else 152 152 PRINTF(2)("No weapon defined\n"); -
branches/proxy/src/world_entities/power_ups/power_up.cc
r9357 r9371 85 85 if (this->pickupBuffer != NULL) 86 86 { 87 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", pickupSound.c_str(), this->get Name());87 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", pickupSound.c_str(), this->getCName()); 88 88 } 89 89 else 90 90 { 91 PRINTF(2)("Failed to load sound %s to pickup %s.\n.", pickupSound.c_str(), this->get Name());91 PRINTF(2)("Failed to load sound %s to pickup %s.\n.", pickupSound.c_str(), this->getCName()); 92 92 } 93 93 } … … 106 106 if (this->respawnBuffer != NULL) 107 107 { 108 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", respawnSound.c_str(), this->get Name());108 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", respawnSound.c_str(), this->getCName()); 109 109 } 110 110 else 111 111 { 112 PRINTF(2)("Failed to load sound %s to respawn %s.\n.", respawnSound.c_str(), this->get Name());112 PRINTF(2)("Failed to load sound %s to respawn %s.\n.", respawnSound.c_str(), this->getCName()); 113 113 } 114 114 } -
branches/proxy/src/world_entities/projectiles/projectile.cc
r9235 r9371 75 75 if (this->explosionBuffer != NULL) 76 76 { 77 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", explosionSound.c_str(), this->get Name());77 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", explosionSound.c_str(), this->getCName()); 78 78 } 79 79 else 80 80 { 81 PRINTF(2)("Failed to load sound %s to explosion %s.\n.", explosionSound.c_str(), this->get Name());81 PRINTF(2)("Failed to load sound %s to explosion %s.\n.", explosionSound.c_str(), this->getCName()); 82 82 } 83 83 } … … 97 97 if (this->engineBuffer != NULL) 98 98 { 99 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", engineSound.c_str(), this->get Name());99 PRINTF(4)("Loaded sound %s to Pickup: %s.\n", engineSound.c_str(), this->getCName()); 100 100 } 101 101 else 102 102 { 103 PRINTF(2)("Failed to load sound %s to engine %s.\n.", engineSound.c_str(), this->get Name());103 PRINTF(2)("Failed to load sound %s to engine %s.\n.", engineSound.c_str(), this->getCName()); 104 104 } 105 105 } -
branches/proxy/src/world_entities/script_trigger.cc
r9298 r9371 63 63 addToScript = false; 64 64 this->activeOnCreation = false; 65 65 66 66 if(root != NULL) 67 67 { 68 68 69 69 loadParams(root); 70 70 71 71 if(addToScript && scriptIsOk) 72 72 { 73 73 script->addObject( "ScriptTrigger", this->getName()); 74 74 } 75 76 } 77 75 76 } 77 78 78 } 79 79 80 80 /** 81 81 * Deletes the ScriptTrigger. 82 * 82 * 83 83 */ 84 84 ScriptTrigger::~ScriptTrigger() … … 147 147 else 148 148 { 149 PRINTF(2)("Target %s for %s::%s does not Exist\n", target.c_str(), this->getClass Name(), this->getName());149 PRINTF(2)("Target %s for %s::%s does not Exist\n", target.c_str(), this->getClassCName(), this->getCName()); 150 150 } 151 151 } … … 153 153 /** 154 154 * Sets the parent of the trigger. 155 * @param parent The parrent. 155 * @param parent The parrent. 156 156 */ 157 157 void ScriptTrigger::setTriggerParent(const std::string& parent) … … 166 166 else 167 167 { 168 PRINTF(2)("Parent %s for %s::%s does not Exist\n", parent.c_str(), this->getClass Name(), this->getName());168 PRINTF(2)("Parent %s for %s::%s does not Exist\n", parent.c_str(), this->getClassCName(), this->getCName()); 169 169 } 170 170 } … … 179 179 return; 180 180 } 181 181 182 182 if(triggerRemains && scriptCalled) 183 183 { … … 185 185 return; 186 186 } 187 187 188 188 if( !invert && this->distance(target) < radius) 189 189 { … … 191 191 scriptCalled = true; 192 192 return; 193 193 194 194 } 195 195 else if( invert && this->distance(target) > radius) 196 196 { 197 executeAction(timestep); 197 executeAction(timestep); 198 198 scriptCalled = true; 199 199 return; … … 207 207 void ScriptTrigger::executeAction(float timestep) 208 208 { 209 209 210 210 if(scriptIsOk) 211 211 { … … 213 213 if(!(script->selectFunction(this->functionName,returnCount)) ) 214 214 PRINT(1)("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str()); 215 215 216 216 script->pushParam( timestep, this->functionName); 217 217 218 218 if( !(script->executeFunction()) ) 219 219 PRINT(1)("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str()); 220 220 221 221 scriptFinished = script->getReturnedBool(); 222 222 } 223 224 223 224 225 225 } 226 226 … … 268 268 float retf = script->getReturnedFloat(); 269 269 printf("main returned %f\n",retf); 270 270 271 271 272 272 printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState())); -
branches/proxy/src/world_entities/space_ships/space_ship.cc
r9357 r9371 319 319 } 320 320 } 321 PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClass Name(), entity->getClassName(), location.x, location.y, location.z);321 PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassCName(), entity->getClassCName(), location.x, location.y, location.z); 322 322 } 323 323 -
branches/proxy/src/world_entities/space_ships/spacecraft_2d.cc
r9298 r9371 324 324 325 325 default: 326 PRINTF(2)("Playmode %s Not Implemented in %s\n", Playable::playmodeToString(this->getPlaymode()).c_str(), this->getClass Name());326 PRINTF(2)("Playmode %s Not Implemented in %s\n", Playable::playmodeToString(this->getPlaymode()).c_str(), this->getClassCName()); 327 327 } 328 328 } … … 474 474 475 475 default: 476 PRINTF(2)("Playmode %s Not Implemented in %s\n", Playable::playmodeToString(this->getPlaymode()).c_str(), this->getClass Name());476 PRINTF(2)("Playmode %s Not Implemented in %s\n", Playable::playmodeToString(this->getPlaymode()).c_str(), this->getClassCName()); 477 477 } 478 478 } -
branches/proxy/src/world_entities/spawning_point.cc
r9365 r9371 123 123 return; 124 124 125 PRINTF(0)("Spawningpoint spawns Entity (%s)\n", entity->getClass Name());125 PRINTF(0)("Spawningpoint spawns Entity (%s)\n", entity->getClassCName()); 126 126 127 127 … … 203 203 void SpawningPoint::sendRespawnMessage( int uniqueId ) 204 204 { 205 #warning this by e array is not beendeleted according to valginrd205 #warning this byte array is not being deleted according to valginrd 206 206 byte * buf = new byte[2*INTSIZE]; 207 207 -
branches/proxy/src/world_entities/weapons/aiming_system.cc
r9357 r9371 101 101 } 102 102 103 PRINTF(0)("entity: %s\n", nearestEntity->getClass Name());103 PRINTF(0)("entity: %s\n", nearestEntity->getClassCName()); 104 104 return nearestEntity; 105 105 } -
branches/proxy/src/world_entities/weapons/weapon.cc
r9357 r9371 199 199 else 200 200 { 201 PRINTF(1)("Projectile %s does not exist for weapon %s\n", projectile.c_str(), this->get Name());201 PRINTF(1)("Projectile %s does not exist for weapon %s\n", projectile.c_str(), this->getCName()); 202 202 } 203 203 } … … 213 213 projectileFactory->prepare(count); 214 214 else 215 PRINTF(2)("unable to create %d projectile for Weapon %s (%s)\n", count, this->getName(), this->getClassName());215 PRINTF(2)("unable to create %d projectile for Weapon %s::%s\n", count, this->getClassCName(), this->getCName()); 216 216 } 217 217 … … 234 234 else 235 235 { 236 PRINTF(2)("No projectile defined for Weapon %s(%s) can't return any\n", this->get Name(), this->getClassName());236 PRINTF(2)("No projectile defined for Weapon %s(%s) can't return any\n", this->getCName(), this->getClassCName()); 237 237 return NULL; 238 238 } … … 442 442 this->updateWidgets(); 443 443 // activate 444 PRINTF(4)("Activating the Weapon %s\n", this->get Name());444 PRINTF(4)("Activating the Weapon %s\n", this->getCName()); 445 445 this->activate(); 446 446 // setting up for next action … … 458 458 // if (this->currentState != WS_INACTIVE) 459 459 { 460 PRINTF(4)("Deactivating the Weapon %s\n", this->get Name());460 PRINTF(4)("Deactivating the Weapon %s\n", this->getCName()); 461 461 // play Sound 462 462 if (this->soundBuffers[WA_DEACTIVATE] != NULL) … … 527 527 bool Weapon::reloadW() 528 528 { 529 PRINTF(4)("Reloading Weapon %s\n", this->get Name());529 PRINTF(4)("Reloading Weapon %s\n", this->getCName()); 530 530 if (this->ammoContainer.get() != NULL && 531 531 unlikely(this->energy + this->ammoContainer->getStoredEnergy() < this->minCharge)) … … 632 632 void Weapon::debug() const 633 633 { 634 PRINT(0)("Weapon-Debug %s, state: %s (duration: %fs), nextAction: %s\n", this->get Name(), Weapon::stateToChar(this->currentState), this->stateDuration, Weapon::actionToChar(requestedAction));634 PRINT(0)("Weapon-Debug %s, state: %s (duration: %fs), nextAction: %s\n", this->getCName(), Weapon::stateToChar(this->currentState), this->stateDuration, Weapon::actionToChar(requestedAction)); 635 635 PRINT(0)("Energy: max: %f; current: %f; chargeMin: %f, chargeMax %f\n", 636 636 this->energyMax, this->energy, this->minCharge, this->maxCharge); -
branches/proxy/src/world_entities/weapons/weapon_manager.cc
r8844 r9371 83 83 // NAMING 84 84 char* tmpName; 85 if ( this->getName())86 { 87 tmpName = new char[ strlen(this->getName()) + 10];88 sprintf(tmpName, "%s_slot%d", this->get Name(), i);85 if (!this->getName().empty()) 86 { 87 tmpName = new char[this->getName().size() + 10]; 88 sprintf(tmpName, "%s_slot%d", this->getCName(), i); 89 89 } 90 90 else … … 265 265 if (configID > 0 && slotID > 0 && this->configs[configID][slotID] != NULL) 266 266 { 267 PRINTF(3)("Weapon-slot %d/%d of %s already poulated, remove weapon (%s::%s) first\n", configID, slotID, this->get Name(), weapon->getClassName(), weapon->getName());267 PRINTF(3)("Weapon-slot %d/%d of %s already poulated, remove weapon (%s::%s) first\n", configID, slotID, this->getCName(), weapon->getClassCName(), weapon->getCName()); 268 268 return false; 269 269 } … … 302 302 weapon->setDefaultTarget(this->crosshair); 303 303 } 304 PRINTF(3)("Added a new Weapon (%s::%s) to the WeaponManager: config %i/ slot %i\n", weapon->getClass Name(), weapon->getName(), configID, slotID);304 PRINTF(3)("Added a new Weapon (%s::%s) to the WeaponManager: config %i/ slot %i\n", weapon->getClassCName(), weapon->getCName(), configID, slotID); 305 305 return true; 306 306 } … … 555 555 { 556 556 if (this->configs[i][j] != NULL) 557 PRINT(3)("Slot %d loaded a %s\n", j, this->configs[i][j]->getClass Name());558 } 559 } 560 } 557 PRINT(3)("Slot %d loaded a %s\n", j, this->configs[i][j]->getClassCName()); 558 } 559 } 560 } -
branches/proxy/src/world_entities/world_entity.cc
r9235 r9371 414 414 bool WorldEntity::registerCollision(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB) 415 415 { 416 PRINTF(5)("registering collision of type: %s vs %s\n", entityA->getClass Name(), entityB->getClassName());416 PRINTF(5)("registering collision of type: %s vs %s\n", entityA->getClassCName(), entityB->getClassCName()); 417 417 // is there any handler listening? 418 418 if( !this->bReactive) … … 518 518 void WorldEntity::collidesWithGround(const Vector& location) 519 519 { 520 PRINTF(0)("BSP_GROUND: %s collides \n", this->getClass Name() );520 PRINTF(0)("BSP_GROUND: %s collides \n", this->getClassCName() ); 521 521 } 522 522 … … 676 676 if (this->health > this->healthMax) 677 677 { 678 PRINTF(3)("new maxHealth is bigger as the old health. Did you really intend to do this for (%s::%s)\n", this->getClass Name(), this->getName());678 PRINTF(3)("new maxHealth is bigger as the old health. Did you really intend to do this for (%s::%s)\n", this->getClassCName(), this->getCName()); 679 679 this->health = this->healthMax; 680 680 } … … 699 699 } 700 700 else 701 PRINTF(3)("Allready created the HealthWidget for %s::%s\n", this->getClass Name(), this->getName());701 PRINTF(3)("Allready created the HealthWidget for %s::%s\n", this->getClassCName(), this->getCName()); 702 702 } 703 703 … … 745 745 this->decreaseHealth(damage); 746 746 747 PRINTF(5)("Hit me: %s now only %f/%f health\n", this->getClassName(), this->getHealth(), this->getHealthMax());747 PRINTF(5)("Hit me: %s::%s now only %f/%f health\n", this->getClassCName(), this->getCName(), this->getHealth(), this->getHealthMax()); 748 748 749 749 if( this->getHealth() > 0) … … 811 811 void WorldEntity::debugEntity() const 812 812 { 813 PRINT(0)("WorldEntity %s::%s (DEBUG)\n", this->getClass Name(), this->getName());813 PRINT(0)("WorldEntity %s::%s (DEBUG)\n", this->getClassCName(), this->getCName()); 814 814 this->debugNode(); 815 815 PRINT(0)("List: %s ; ModelCount %d - ", ObjectManager::OMListToString(this->objectListNumber) , this->models.size()); … … 817 817 { 818 818 if (models[i] != NULL) 819 PRINT(0)(" : %d:%s", i, this->models[i]->get Name());819 PRINT(0)(" : %d:%s", i, this->models[i]->getCName()); 820 820 } 821 821 PRINT(0)("\n");
Note: See TracChangeset
for help on using the changeset viewer.