bool CPlayerStateJump::OnPrePhysicsUpdate( CPlayer& player, const bool isHeavyWeapon, const SActorFrameMovementParams &movement, float frameTime ) { if( !m_firstPrePhysicsUpdate ) { // if actor just got linked to a vehicle, abort jump/fall if (player.GetLinkedVehicle()) { SetJumpState(player, JState_None); if(player.m_stats.fallSpeed) { player.m_stats.fallSpeed = 0.f; } } switch( m_jumpState ) { case JState_Jump: UpdateJumping( player, isHeavyWeapon, movement, frameTime ); break; case JState_Falling: UpdateFalling( player, isHeavyWeapon, movement, frameTime ); break; } } m_firstPrePhysicsUpdate = false; NETINPUT_TRACE(player.GetEntityId(), (m_jumpState == JState_Jump) ); return( m_jumpState == JState_None ); }
void Breakable::Update() { LTFLOAT fTime = g_pLTServer->GetTime(); g_pLTServer->SetNextUpdate(m_hObject, 0.001f); // See if it is time to stop the breaking... if (!m_BreakTimer.Stopped()) { // Update the breaking... UpdateBreaking(); } else if (!m_bFalling) { m_bFalling = StopBreak(); } if (m_bFalling) { UpdateFalling(); } }