- Timestamp:
- Nov 27, 2017, 4:38:50 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ScriptableController_HS17/src/orxonox/worldentities/pawns/Pawn.cc
r11176 r11606 50 50 #include "sound/WorldSound.h" 51 51 #include "core/object/ObjectListIterator.h" 52 #include "Level.h" 53 #include "scriptablecontroller/scriptable_controller.h" 52 54 53 55 #include "controllers/FormationController.h" … … 159 161 160 162 XMLPortParam ( RadarViewable, "radarname", setRadarName, getRadarName, xmlelement, mode ); 163 164 if(!this->id_.empty() && this->getLevel() != nullptr) 165 this->getLevel()->getScriptableController()->registerPawn(this->id_, this); 161 166 } 162 167 … … 281 286 { 282 287 // Health-damage cannot be absorbed by shields. 283 // Shield-damage only reduces shield health. 288 // Shield-damage only reduces shield health. 284 289 // Normal damage can be (partially) absorbed by shields. 285 290 … … 301 306 this->setHealth(this->health_ - (damage - shielddamage) - healthdamage); 302 307 } 308 this->getLevel()->getScriptableController()->pawnHit(this, originator, this->health_, this->shieldHealth_); 303 309 304 310 this->lastHitOriginator_ = originator; … … 401 407 } 402 408 } 409 410 this->getLevel()->getScriptableController()->pawnKilled(this); 403 411 } 404 412 void Pawn::goWithStyle() … … 624 632 { 625 633 // delete all debug models 626 for(Model* model : debugWeaponSlotModels_) 634 for(Model* model : debugWeaponSlotModels_) 627 635 { 628 636 model->destroy();
Note: See TracChangeset
for help on using the changeset viewer.