Changeset 849 – HoverRace

Changeset 849

Show
Ignore:
Timestamp:
02/04/10 15:17:57 (7 months ago)
Author:
ryan
Message:

Eliminate precision ambiguity

Location:
trunk/engine
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/engine/MainCharacter/MainCharacter.cpp

    r558 r849  
    280280    } 
    281281    // if mGameOpts now outlaw basic craft, we must update 
    282     while(!(lReturnValue->mGameOpts & ((int) pow(2, 3 - ((lReturnValue->mHoverModel + 4) % 4))))) 
     282    while(!(lReturnValue->mGameOpts & ((int) pow(2.0f, 3.0f - ((lReturnValue->mHoverModel + 4) % 4))))) 
    283283        lReturnValue->mHoverModel++; 
    284284 
     
    406406                 
    407407                // ensure we are using an allowed craft 
    408                 while(!(mGameOpts & ((int) pow(2, 3 - ((mHoverModel + 4) % 4))))) 
     408                while(!(mGameOpts & ((int) pow(2.0f, 3.0f - ((mHoverModel + 4) % 4))))) 
    409409                    mHoverModel++; 
    410410            } 
     
    414414 
    415415                // ensure we are using an allowed craft 
    416                 while(!(mGameOpts & ((int) pow(2, 3 - ((mHoverModel + 4) % 4))))) 
     416                while(!(mGameOpts & ((int) pow(2.0f, 3.0f - ((mHoverModel + 4) % 4))))) 
    417417                    mHoverModel--; 
    418418            } 
  • trunk/engine/VideoServices/3DViewport.cpp

    r504 r849  
    137137            static_cast<MR_Int32>( 
    138138                1024 * MR_BACK_Y_RES * mPlanVW / 
    139                 (sqrt(pow(mPlanDist, 2) + pow((lCounter - mXRes / 2) * mPlanHW / (mXRes / 2), 2)) * (mYRes / 2)) 
     139                (sqrt(pow(mPlanDist, 2.0f) + pow((lCounter - mXRes / 2) * mPlanHW / (mXRes / 2), 2.0f)) * (mYRes / 2)) 
    140140                ); 
    141141    }