Changeset 1626 for code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.cc
- Timestamp:
- Jun 26, 2008, 4:05:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.cc
r1625 r1626 53 53 { 54 54 float v = ship->getVelocity().length(); 55 float vmax = ship->getMaxSpeed(); 56 this->setValue(v/vmax); 55 float value = v / ship->getMaxSpeed(); 56 if (value != this->getValue()) 57 this->setValue(value); 57 58 } 58 59 }
Note: See TracChangeset
for help on using the changeset viewer.