Hi, I'm trying to have the camera switch from third person to third person shoulder when the user holds the right mouse button. here are my methods on the client and server :
Shared: > int buttonsChanged = m_afButtonPressed | m_afButtonReleased; > > if( buttonsChanged & IN_ZOOM ) > { > if( m_nButtons & IN_ZOOM ) > { > StartAiming(); > } > else if( m_SFRLocal.m_bAiming ) > { > StopAiming(); > m_nButtons &= ~IN_ZOOM; > } > } > Client: > void C_ASW_Player::StartAiming() > { > ASWInput()->CAM_ToThirdPersonShoulder(); > m_SFRLocal.m_fTimeNextAim = gpGlobals->curtime + 0.5f; > } > > void C_ASW_Player::StopAiming() > { > ASWInput()->CAM_ToThirdPerson(); > m_SFRLocal.m_fTimeNextAim = gpGlobals->curtime + 0.1f; > } > Server: void CASW_Player::StartAiming() > { > StartWalking(); > m_SFRLocal.m_bAiming = true; //local player data > m_SFRLocal.m_fTimeNextAim = gpGlobals->curtime + 0.5f; > } > > void CASW_Player::StopAiming() > { > StopWalking(); > m_SFRLocal.m_bAiming = false; //local player data > m_SFRLocal.m_fTimeNextAim = gpGlobals->curtime + 0.1f; > } > For some reasons the camera doesn't behave correctly and stays stuck in either third person or third person shoulder...
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders