- Timestamp:
- Jan 31, 2011, 11:36:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai/src/orxonox/controllers/ArtificialController.cc
r7841 r7842 52 52 SetConsoleCommand("ArtificialController", "passivebehaviour", &ArtificialController::passivebehaviour); 53 53 SetConsoleCommand("ArtificialController", "formationsize", &ArtificialController::formationsize); 54 SetConsoleCommand("ArtificialController", " botlevel", &ArtificialController::setBotLevel);54 SetConsoleCommand("ArtificialController", "setbotlevel", &ArtificialController::setAllBotLevel); 55 55 56 56 … … 88 88 this->bSetupWorked = false; 89 89 this->numberOfWeapons = 0; 90 this->botlevel_ = 1 0.0f;90 this->botlevel_ = 1.0f; 91 91 } 92 92 … … 1069 1069 void ArtificialController::setBotLevel(float level) 1070 1070 { 1071 if (level < 1)1072 this->botlevel_ = 1;1073 else if (level > 1 0)1074 this->botlevel_ = 1 0;1071 if (level < 0.0f) 1072 this->botlevel_ = 0.0f; 1073 else if (level > 1.0f) 1074 this->botlevel_ = 1.0f; 1075 1075 else 1076 1076 this->botlevel_ = level; 1077 1077 } 1078 1079 void ArtificialController::setAllBotLevel(float level) 1080 { 1081 for (ObjectList<ArtificialController>::iterator it = ObjectList<ArtificialController>::begin(); it != ObjectList<ArtificialController>::end(); ++it) 1082 it->setBotLevel(level); 1083 } 1084 1078 1085 }
Note: See TracChangeset
for help on using the changeset viewer.