- Timestamp:
- Jun 18, 2009, 10:00:15 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pch/src/orxonox/objects/worldentities/PongBall.cc
r3186 r3192 50 50 this->batID_[0] = OBJECTID_UNKNOWN; 51 51 this->batID_[1] = OBJECTID_UNKNOWN; 52 this->relMercyOffset_ = 0.05 ;52 this->relMercyOffset_ = 0.05f; 53 53 54 54 this->registerVariables(); … … 103 103 if (position.x > this->fieldWidth_ / 2 && this->bat_[1]) 104 104 { 105 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);105 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 106 106 if (fabs(distance) <= 1) 107 107 { … … 123 123 if (position.x < -this->fieldWidth_ / 2 && this->bat_[0]) 124 124 { 125 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);125 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 126 126 if (fabs(distance) <= 1) 127 127 { … … 173 173 if (position.x > this->fieldWidth_ / 2 && this->bat_[1]) 174 174 { 175 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);175 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 176 176 if (fabs(distance) <= 1) 177 177 { … … 184 184 if (position.x < -this->fieldWidth_ / 2 && this->bat_[0]) 185 185 { 186 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);186 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 187 187 if (fabs(distance) <= 1) 188 188 {
Note: See TracChangeset
for help on using the changeset viewer.