stoneharry

Untitled

Apr 9th, 2013
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1.     //player is swimming and not flagged as in the water
  2.     if(movement_info.flags & MOVEFLAG_SWIMMING && !(_player->m_UnderwaterState & UNDERWATERSTATE_SWIMMING))
  3.     {
  4.         if( ( _player->GetZoneId() == 46 ) && !(_player->m_UnderwaterState & UNDERWATERSTATE_LAVA) && (_player->GetPositionZ() > 125))
  5.             _player->m_UnderwaterState |= UNDERWATERSTATE_LAVA;
  6.  
  7.         _player->RemoveAurasByInterruptFlag(AURA_INTERRUPT_ON_ENTER_WATER);
  8.  
  9.         // get water level only if it was not set before
  10.         if(!pSession->m_bIsWLevelSet)
  11.         {
  12.             // water level is somewhere below the nose of the character when entering water
  13.             pSession->m_wLevel = movement_info.z + _player->m_noseLevel * 0.95f;
  14.             pSession->m_bIsWLevelSet = true;
  15.         }
  16.  
  17.         _player->m_UnderwaterState |= UNDERWATERSTATE_SWIMMING;
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment