mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-10 21:58:42 +02:00
Removing a magic number and collapsing two identical variables that hard-code the number of hands.
This commit is contained in:
parent
141c20f4ef
commit
e02c7bed18
3 changed files with 5 additions and 6 deletions
|
@ -311,7 +311,7 @@ bool Avatar::findSphereCollision(const glm::vec3& sphereCenter, float sphereRadi
|
|||
|
||||
const HandData* handData = getHandData();
|
||||
if (handData) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int i = 0; i < NUM_HANDS; i++) {
|
||||
const PalmData* palm = handData->getPalm(i);
|
||||
if (palm && palm->hasPaddle()) {
|
||||
// create a disk collision proxy where the hand is
|
||||
|
|
|
@ -59,7 +59,7 @@ Hand::Hand(Avatar* owningAvatar) :
|
|||
_throwSound(QUrl("https://dl.dropboxusercontent.com/u/1864924/hifi-sounds/throw.raw")),
|
||||
_catchSound(QUrl("https://dl.dropboxusercontent.com/u/1864924/hifi-sounds/catch.raw"))
|
||||
{
|
||||
for (int i = 0; i < MAX_HANDS; i++) {
|
||||
for (int i = 0; i < NUM_HANDS; i++) {
|
||||
_toyBallInHand[i] = false;
|
||||
_ballParticleEditHandles[i] = NULL;
|
||||
_whichBallColor[i] = 0;
|
||||
|
|
|
@ -104,10 +104,9 @@ private:
|
|||
|
||||
void simulateToyBall(PalmData& palm, const glm::vec3& fingerTipPosition, float deltaTime);
|
||||
|
||||
#define MAX_HANDS 2
|
||||
bool _toyBallInHand[MAX_HANDS];
|
||||
int _whichBallColor[MAX_HANDS];
|
||||
ParticleEditHandle* _ballParticleEditHandles[MAX_HANDS];
|
||||
bool _toyBallInHand[NUM_HANDS];
|
||||
int _whichBallColor[NUM_HANDS];
|
||||
ParticleEditHandle* _ballParticleEditHandles[NUM_HANDS];
|
||||
int _lastControllerButtons;
|
||||
|
||||
float _pitchUpdate;
|
||||
|
|
Loading…
Reference in a new issue