Meanwhile in UpdateMove in player.cpp ... nothing strange is happening

Expanding and utilizing the engine via C++.
3 posts Page 1 of 1
Steve_Yorkshire
Posts: 294
Joined: Tue Feb 03, 2015 10:30 pm
 
  by Steve_Yorkshire » Fri Mar 06, 2015 8:34 pm
void Player::updateMove(const Move* move)
{
   delta.move = *move;

   // Is waterCoverage high enough to be 'swimming'?
   {//<---yorks uwotm8!?
      bool swimming = mWaterCoverage > 0.65f && canSwim();      

      if ( swimming != mSwimming )
      {
         if ( !isGhost() )
         {
            if ( swimming )
               mDataBlock->onStartSwim_callback( this );
            else
               mDataBlock->onStopSwim_callback( this );
         }

         mSwimming = swimming;
      }
   }//<---yorks uwotm8!?

//...
I think something might have been removed once but the brackets left in :lol:
Last edited by Steve_Yorkshire on Fri Mar 06, 2015 8:58 pm, edited 1 time in total.
Steve_Yorkshire
Posts: 294
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Fri Mar 06, 2015 8:56 pm
So I have been informed that this is actually a legit way of keeping "bool swimming" within an area and thus not exposed to the rest of the function. The case is solve-ed!

:oops:

rlranft
Posts: 298
Joined: Thu Feb 05, 2015 3:11 pm
 
by rlranft » Tue Apr 07, 2015 9:55 pm
Yeah, forced scoping...
3 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests