Changeset 12278 for code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
- Timestamp:
- Apr 4, 2019, 4:17:26 PM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt
r12269 r12278 6 6 BallGun/BallProjectile.cc 7 7 OrxoBlox.cc 8 8 OrxoBloxWall.cc 9 9 OrxoBloxBall.cc 10 10 OrxoBloxBat.cc -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12277 r12278 278 278 } 279 279 280 /*void OrxoBlox::createStonewall(void){ 281 this->futureWall_ = new OrxoBolxWall(this->center_->getContext()); 282 283 284 285 }*/ 286 280 287 /** 281 288 @brief -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc
r12212 r12278 170 170 // Calculate the distance (in z-direction) between the ball and the center of the bat, weighted by half of the effective length of the bat (with additional 10%) 171 171 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 172 173 172 174 if (fabs(distance) <= 1) // If the bat is there to parry. 173 175 { … … 183 185 this->fireEvent(); 184 186 } 187 185 188 // If the left player scores. 186 189 else if (GameMode::isMaster() && position.x > this->fieldWidth_ / 2 * (1 + this->relMercyOffset_)) 187 190 { 191 ChatManager::message("You suck!!"); 188 192 defScoreSound_->play();//play score sound 189 193 if (this->getGametype() && this->bat_[0]) 190 194 { 195 ChatManager::message("You suck!!"); 196 197 191 198 this->getGametype()->playerScored(this->bat_[0]->getPlayer()); 192 199 return; 193 200 } 194 201 } 202 203 204 205 206 195 207 } 196 208 // If the left boundary has been crossed. … … 218 230 if (this->getGametype() && this->bat_[1]) 219 231 { 232 ChatManager::message("You suck!!"); 233 220 234 this->getGametype()->playerScored(this->bat_[1]->getPlayer()); 221 235 return;
Note: See TracChangeset
for help on using the changeset viewer.