diff --git a/src/game/client/c_basecombatweapon.cpp b/src/game/client/c_basecombatweapon.cpp index 30cb5744b0d..5a9d74f17a9 100644 --- a/src/game/client/c_basecombatweapon.cpp +++ b/src/game/client/c_basecombatweapon.cpp @@ -17,6 +17,10 @@ #include "toolframework/itoolframework.h" #include "toolframework_client.h" +extern bool g_bRenderingCameraView; + + + // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" @@ -53,6 +57,10 @@ void C_BaseCombatWeapon::SetDormant( bool bDormant ) BaseClass::SetDormant( bDormant ); } + + + + //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- @@ -60,6 +68,8 @@ void C_BaseCombatWeapon::NotifyShouldTransmit( ShouldTransmitState_t state ) { BaseClass::NotifyShouldTransmit(state); + + if (state == SHOULDTRANSMIT_END) { if (m_iState == WEAPON_IS_ACTIVE) @@ -132,6 +142,9 @@ void C_BaseCombatWeapon::OnDataChanged( DataUpdateType_t updateType ) { BaseClass::OnDataChanged(updateType); + + + CHandle< C_BaseCombatWeapon > handle = this; // If it's being carried by the *local* player, on the first update, @@ -142,6 +155,30 @@ void C_BaseCombatWeapon::OnDataChanged( DataUpdateType_t updateType ) // check if weapon is carried by local player bool bIsLocalPlayer = pPlayer && pPlayer == pOwner; + + + +if ( bIsLocalPlayer && !g_bRenderingCameraView ) +{ + int iWorldModel = GetWorldModelIndex(); + + if ( iWorldModel > 0 && GetModelIndex() != iWorldModel ) + { + SetModelIndex( iWorldModel ); + } + + if ( m_iState == WEAPON_IS_ACTIVE ) + { + RemoveEffects( EF_NODRAW ); + + + } +} + + + + + if ( bIsLocalPlayer && ShouldDrawLocalPlayerViewModel() ) // TODO: figure out the purpose of the ShouldDrawLocalPlayer() test. { // If I was just picked up, or created & immediately carried, add myself to this client's list of weapons @@ -160,15 +197,25 @@ void C_BaseCombatWeapon::OnDataChanged( DataUpdateType_t updateType ) } } } - else // weapon carried by other player or not at all +else // weapon carried by other player or not at all +{ + int overrideModelIndex; + + if ( g_bRenderingCameraView ) { - int overrideModelIndex = CalcOverrideModelIndex(); - if( overrideModelIndex != -1 && overrideModelIndex != GetModelIndex() ) - { - SetModelIndex( overrideModelIndex ); - } + overrideModelIndex = GetWorldModelIndex(); + } + else + { + overrideModelIndex = CalcOverrideModelIndex(); } + if( overrideModelIndex != -1 && overrideModelIndex != GetModelIndex() ) + { + SetModelIndex( overrideModelIndex ); + } +} + if ( updateType == DATA_UPDATE_CREATED ) { UpdateVisibility(); @@ -330,9 +377,18 @@ bool C_BaseCombatWeapon::IsCarriedByLocalPlayer( void ) // Purpose: Returns true if this client is carrying this weapon and is // using the view models //----------------------------------------------------------------------------- -bool C_BaseCombatWeapon::ShouldDrawUsingViewModel( void ) +bool C_BaseCombatWeapon::ShouldDrawUsingViewModel() { - return IsCarriedByLocalPlayer() && !C_BasePlayer::ShouldDrawLocalPlayer(); + + + // Camera stuff I added + if ( g_bRenderingCameraView && IsCarriedByLocalPlayer() ) + return ( m_iState == WEAPON_IS_ACTIVE ); + + if ( g_bRenderingCameraView ) + return false; + + return IsCarriedByLocalPlayer() && !C_BasePlayer::ShouldDrawLocalPlayer(); } @@ -341,7 +397,7 @@ bool C_BaseCombatWeapon::ShouldDrawUsingViewModel( void ) //----------------------------------------------------------------------------- bool C_BaseCombatWeapon::IsActiveByLocalPlayer( void ) { - if ( IsCarriedByLocalPlayer() ) + if ( IsCarriedByLocalPlayer() && !g_bRenderingCameraView ) { return (m_iState == WEAPON_IS_ACTIVE); } @@ -398,12 +454,29 @@ bool C_BaseCombatWeapon::GetShootPosition( Vector &vOrigin, QAngle &vAngles ) } +// Adds the weapon to the leaf system basically +void C_BaseCombatWeapon::JBMod_PrepareForCameraRender() +{ + JBMod_ForceWorldModelForSecondaryView(); + + RemoveFromLeafSystem(); + AddToLeafSystem( RENDER_GROUP_OPAQUE_ENTITY ); +} + + //----------------------------------------------------------------------------- // Purpose: // Output : Returns true on success, false on failure. //----------------------------------------------------------------------------- bool C_BaseCombatWeapon::ShouldDraw( void ) { + + + + + + + if ( m_iWorldModelIndex == 0 ) return false; @@ -423,28 +496,30 @@ bool C_BaseCombatWeapon::ShouldDraw( void ) C_BasePlayer *pLocalPlayer = C_BasePlayer::GetLocalPlayer(); - // carried by local player? - if ( pOwner == pLocalPlayer ) - { - // Only ever show the active weapon - if ( !bIsActive ) - return false; +if ( pOwner == pLocalPlayer ) +{ + + + if ( !bIsActive ) + return false; + + - if ( !pOwner->ShouldDraw() ) - { - // Our owner is invisible. - // This also tests whether the player is zoomed in, in which case you don't want to draw the weapon. - return false; - } - // 3rd person mode? - if ( !ShouldDrawLocalPlayerViewModel() ) - return true; - // don't draw active weapon if not in some kind of 3rd person mode, the viewmodel will do that + + + if ( g_bRenderingCameraView ) + return true; + + if ( !pOwner->ShouldDraw() ) return false; - } + if ( !ShouldDrawLocalPlayerViewModel() ) + return true; + + return false; +} // If it's a player, then only show active weapons if ( pOwner->IsPlayer() ) { @@ -470,6 +545,33 @@ bool C_BaseCombatWeapon::ShouldDrawPickup( void ) return true; } + + +// I probably should move this somewhere else in the file + +void C_BaseCombatWeapon::JBMod_ForceWorldModelForSecondaryView() +{ + if ( !IsCarriedByLocalPlayer() ) + return; + + if ( m_iState != WEAPON_IS_ACTIVE ) + return; + + int iWorldModel = GetWorldModelIndex(); + + if ( iWorldModel > 0 && GetModelIndex() != iWorldModel ) + { + SetModelIndex( iWorldModel ); + } + + RemoveEffects( EF_NODRAW ); +} + + + + + + //----------------------------------------------------------------------------- // Purpose: Render the weapon. Draw the Viewmodel if the weapon's being carried @@ -478,26 +580,23 @@ bool C_BaseCombatWeapon::ShouldDrawPickup( void ) int C_BaseCombatWeapon::DrawModel( int flags ) { VPROF_BUDGET( "C_BaseCombatWeapon::DrawModel", VPROF_BUDGETGROUP_MODEL_RENDERING ); + + + + if ( !m_bReadyToDraw ) return 0; if ( !IsVisible() ) return 0; - // check if local player chases owner of this weapon in first person - C_BasePlayer *localplayer = C_BasePlayer::GetLocalPlayer(); - if ( localplayer && localplayer->IsObserver() && GetOwner() ) - { - // don't draw weapon if chasing this guy as spectator - // we don't check that in ShouldDraw() since this may change - // without notification - - if ( localplayer->GetObserverMode() == OBS_MODE_IN_EYE && - localplayer->GetObserverTarget() == GetOwner() ) - return false; - } + +if ( ( g_bRenderingCameraView ) && IsCarriedByLocalPlayer() ) +{ + JBMod_PrepareForCameraRender(); +} return BaseClass::DrawModel( flags ); } @@ -510,17 +609,28 @@ int C_BaseCombatWeapon::DrawModel( int flags ) //----------------------------------------------------------------------------- int C_BaseCombatWeapon::CalcOverrideModelIndex() { - C_BasePlayer *localplayer = C_BasePlayer::GetLocalPlayer(); - if ( localplayer && - localplayer == GetOwner() && - ShouldDrawLocalPlayerViewModel() ) - { - return BaseClass::CalcOverrideModelIndex(); - } - else - { - return GetWorldModelIndex(); - } + C_BasePlayer *localplayer = C_BasePlayer::GetLocalPlayer(); + + + + + +if ( localplayer && + localplayer == GetOwner() && + ShouldDrawLocalPlayerViewModel() && + !g_bRenderingCameraView ) +{ + return BaseClass::CalcOverrideModelIndex(); +} + +if ( IsCarriedByLocalPlayer() && C_BasePlayer::ShouldDrawLocalPlayer() ) +{ + return GetWorldModelIndex(); +} + + + +return GetWorldModelIndex(); } bool C_BaseCombatWeapon::PredictionErrorShouldResetLatchedForAllPredictables( void ) diff --git a/src/game/client/jbmod/c_jbmod_player.cpp b/src/game/client/jbmod/c_jbmod_player.cpp index e73b6fa1645..4c775c63800 100644 --- a/src/game/client/jbmod/c_jbmod_player.cpp +++ b/src/game/client/jbmod/c_jbmod_player.cpp @@ -8,18 +8,27 @@ #include "vcollide_parse.h" #include "c_jbmod_player.h" #include "view.h" +#include "viewrender.h" #include "takedamageinfo.h" #include "jbmod_gamerules.h" #include "in_buttons.h" #include "iviewrender_beams.h" // flashlight beam #include "r_efx.h" #include "dlight.h" - +#include "input.h" // Don't alias here + + + + #if defined( CJBMod_Player ) #undef CJBMod_Player #endif +extern bool g_bRenderingCameraView; + +extern view_id_t CurrentViewID(); +extern bool IsCurrentViewAccessAllowed(); // misyl: Can be set to Msg if you want some info for debugging prediction #define MsgPredTest(...) #define MsgPredTest2(...) @@ -68,6 +77,9 @@ BEGIN_PREDICTION_DATA( C_JBMod_Player ) DEFINE_PRED_ARRAY( m_iAmmo, FIELD_INTEGER, MAX_AMMO_TYPES, FTYPEDESC_INSENDTABLE | FTYPEDESC_OVERRIDE | FTYPEDESC_NOERRORCHECK ), END_PREDICTION_DATA() + + + ConVar hl2_walkspeed( "hl2_walkspeed", "150", FCVAR_REPLICATED ); ConVar hl2_normspeed( "hl2_normspeed", "190", FCVAR_REPLICATED ); ConVar hl2_sprintspeed( "hl2_sprintspeed", "320", FCVAR_REPLICATED ); @@ -99,7 +111,7 @@ void SpawnBlood (Vector vecSpot, const Vector &vecDir, int bloodColor, float flD #endif CSuitPowerDevice SuitDeviceBreather( bits_SUIT_DEVICE_BREATHER, 6.7f ); // 100 units in 15 seconds (plus three padded seconds) -C_JBMod_Player::C_JBMod_Player() : m_PlayerAnimState( this ), m_iv_angEyeAngles( "C_JBMod_Player::m_iv_angEyeAngles" ) +C_JBMod_Player::C_JBMod_Player(): m_pAnimState( NULL ), m_iv_angEyeAngles( "C_JBMod_Player::m_iv_angEyeAngles" ) { m_iIDEntIndex = 0; m_iSpawnInterpCounterCache = 0; @@ -113,11 +125,27 @@ C_JBMod_Player::C_JBMod_Player() : m_PlayerAnimState( this ), m_iv_angEyeAngles( m_pFlashlightBeam = NULL; + +MultiPlayerMovementData_t movementData; +movementData.m_flWalkSpeed = HL2_WALK_SPEED; +movementData.m_flRunSpeed = HL2_NORM_SPEED; +movementData.m_flSprintSpeed = HL2_SPRINT_SPEED; +movementData.m_flBodyYawRate = 720.0f; + +m_pAnimState = new CMultiPlayerAnimState( this, movementData ); + + SuitPower_Initialize(); } C_JBMod_Player::~C_JBMod_Player( void ) { +if ( m_pAnimState ) + { + m_pAnimState->Release(); + m_pAnimState = NULL; + } + ReleaseFlashlight(); } @@ -326,15 +354,29 @@ void C_JBMod_Player::ClientThink( void ) //----------------------------------------------------------------------------- int C_JBMod_Player::DrawModel( int flags ) { - if ( !m_bReadyToDraw ) - return 0; - return BaseClass::DrawModel(flags); -} + return BaseClass::DrawModel( flags ); +} //----------------------------------------------------------------------------- // Should this object receive shadows? //----------------------------------------------------------------------------- + + +C_BaseAnimating *C_JBMod_Player::GetRenderedWeaponModel() +{ + + + if ( g_bRenderingCameraView ) + { + return GetActiveWeapon(); + } + + return BaseClass::GetRenderedWeaponModel(); +} + + + bool C_JBMod_Player::ShouldReceiveProjectedTextures( int flags ) { Assert( flags & SHADOW_FLAGS_PROJECTED_TEXTURE_TYPE_MASK ); @@ -578,12 +620,13 @@ void C_JBMod_Player::AddEntity( void ) { BaseClass::AddEntity(); - QAngle vTempAngles = GetLocalAngles(); - vTempAngles[PITCH] = m_angEyeAngles[PITCH]; +// QAngle vTempAngles = GetLocalAngles(); +// vTempAngles[PITCH] = m_angEyeAngles[PITCH]; - SetLocalAngles( vTempAngles ); +// SetLocalAngles( vTempAngles ); - m_PlayerAnimState.Update(); + if ( m_pAnimState ) +// m_pAnimState->Update( EyeAngles().y, EyeAngles().x ); // Zero out model pitch, blending takes care of all of it. SetLocalAnglesDim( X_INDEX, 0 ); @@ -674,34 +717,43 @@ ShadowType_t C_JBMod_Player::ShadowCastType( void ) const QAngle& C_JBMod_Player::GetRenderAngles() { - if ( IsRagdoll() ) - { - return vec3_angle; - } - else - { - return m_PlayerAnimState.GetRenderAngles(); - } +return BaseClass::GetRenderAngles(); } + + +// Modified this to make it work with my camera variable bool C_JBMod_Player::ShouldDraw( void ) { - // If we're dead, our ragdoll will be drawn for us instead. if ( !IsAlive() ) return false; -// if( GetTeamNumber() == TEAM_SPECTATOR ) -// return false; - - if( IsLocalPlayer() && IsRagdoll() ) - return true; - if ( IsRagdoll() ) return false; - return BaseClass::ShouldDraw(); + if ( IsLocalPlayer() ) + { + // Thirdperson always draw, should be okay + if ( input->CAM_IsThirdPerson() ) + return true; + + + if ( !GetViewModel() ) + return true; + + + return true; + } + +if ( g_bRenderingCameraView ) +{ + return true; } + + + return BaseClass::ShouldDraw(); +} void C_JBMod_Player::NotifyShouldTransmit( ShouldTransmitState_t state ) { if ( state == SHOULDTRANSMIT_END ) @@ -1244,4 +1296,4 @@ void C_JBMod_Player::PostThink( void ) { SetCollisionBounds( VEC_CROUCH_TRACE_MIN, VEC_CROUCH_TRACE_MAX ); } -} \ No newline at end of file +} diff --git a/src/game/client/jbmod/c_jbmod_player.h b/src/game/client/jbmod/c_jbmod_player.h index 8294b4c674c..301ec3a6124 100644 --- a/src/game/client/jbmod/c_jbmod_player.h +++ b/src/game/client/jbmod/c_jbmod_player.h @@ -67,6 +67,7 @@ class C_JBMod_Player : public C_BaseHLPlayer // Should this object cast shadows? virtual ShadowType_t ShadowCastType( void ); virtual C_BaseAnimating *BecomeRagdollOnClient(); + virtual C_BaseAnimating *GetRenderedWeaponModel(); virtual const QAngle& GetRenderAngles(); virtual bool ShouldDraw( void ); virtual void OnDataChanged( DataUpdateType_t type ); @@ -97,7 +98,7 @@ class C_JBMod_Player : public C_BaseHLPlayer bool SuitPower_RemoveDevice( const CSuitPowerDevice& device ); bool SuitPower_ShouldRecharge( void ); float SuitPower_GetCurrentPercentage( void ) { return m_HL2Local.m_flSuitPower; } - + CMultiPlayerAnimState *GetAnimState() { return m_pAnimState; } bool CanSprint( void ); void StartSprinting( void ); void StopSprinting( void ); @@ -122,7 +123,7 @@ class C_JBMod_Player : public C_BaseHLPlayer C_JBMod_Player( const C_JBMod_Player & ); - CPlayerAnimState m_PlayerAnimState; + CMultiPlayerAnimState *m_pAnimState; QAngle m_angEyeAngles; @@ -201,3 +202,4 @@ class C_JBModRagdoll : public C_BaseAnimatingOverlay }; #endif //JBMOD_PLAYER_H + diff --git a/src/game/client/viewrender.cpp b/src/game/client/viewrender.cpp index b4011e28d50..89f0cd5b2b2 100644 --- a/src/game/client/viewrender.cpp +++ b/src/game/client/viewrender.cpp @@ -186,6 +186,7 @@ static VMatrix g_matCurrentCamInverse; bool s_bCanAccessCurrentView = false; IntroData_t *g_pIntroData = NULL; static bool g_bRenderingView = false; // For debugging... +extern bool g_bRenderingCameraView; static int g_CurrentViewID = VIEW_NONE; bool g_bRenderingScreenshot = false; @@ -981,6 +982,8 @@ bool CViewRender::ShouldDrawViewModel( bool bDrawViewmodel ) if ( !r_drawviewmodel.GetBool() ) return false; + + if ( C_BasePlayer::ShouldDrawLocalPlayer() ) return false; @@ -1440,8 +1443,10 @@ void CViewRender::ViewDrawScene( bool bDrew3dSkybox, SkyboxVisibility_t nSkyboxV // render->DrawMaskEntities() // Here are the overlays... - - CGlowOverlay::DrawOverlays( viewRender.m_bCacheFullSceneState ); +if ( viewID != VIEW_MONITOR ) +{ + CGlowOverlay::DrawOverlays( viewRender.m_bCacheFullSceneState ); +} // issue the pixel visibility tests if ( IsMainView( CurrentViewID() ) ) @@ -1460,7 +1465,10 @@ void CViewRender::ViewDrawScene( bool bDrew3dSkybox, SkyboxVisibility_t nSkyboxV // Draw client side effects // NOTE: These are not sorted against the rest of the frame - clienteffects->DrawEffects( gpGlobals->frametime ); +if ( viewID != VIEW_MONITOR ) +{ + clienteffects->DrawEffects( gpGlobals->frametime ); +} // Mark the frame as locked down for client fx additions SetFXCreationAllowed( false ); @@ -3217,12 +3225,52 @@ bool CViewRender::DrawOneMonitor( ITexture *pRenderTarget, int cameraNum, C_Poin monitorView.m_bOrtho = false; monitorView.m_flAspectRatio = pCameraEnt->UseScreenAspectRatio() ? 0.0f : 1.0f; monitorView.m_bViewToProjectionOverride = false; - + extern bool g_bRenderingCameraView; // @MULTICORE (toml 8/11/2006): this should be a renderer.... - Frustum frustum; - render->Push3DView( monitorView, VIEW_CLEAR_DEPTH | VIEW_CLEAR_COLOR, pRenderTarget, (VPlane *)frustum ); - ViewDrawScene( false, SKYBOX_2DSKYBOX_VISIBLE, monitorView, 0, VIEW_MONITOR ); - render->PopView( frustum ); +Frustum frustum; +render->Push3DView( monitorView, VIEW_CLEAR_DEPTH | VIEW_CLEAR_COLOR, pRenderTarget, (VPlane *)frustum ); +{ + CMatRenderContextPtr pRenderContext( materials ); + pRenderContext->ClearColor4ub( 0, 0, 0, 255 ); + pRenderContext->ClearBuffers( true, true, true ); +} + +C_BasePlayer *pLocal = C_BasePlayer::GetLocalPlayer(); +bool bOldForceDraw = false; + +if ( pLocal ) +{ + bOldForceDraw = pLocal->m_Local.m_bForceLocalPlayerDraw; + pLocal->m_Local.m_bForceLocalPlayerDraw = true; +} + + + +bool bOldRenderingCameraView = g_bRenderingCameraView; +g_bRenderingCameraView = true; + + +if ( pLocal && pLocal->GetActiveWeapon() ) +{ + pLocal->GetActiveWeapon()->JBMod_PrepareForCameraRender(); +} + + +ViewDrawScene( false, SKYBOX_2DSKYBOX_VISIBLE, monitorView, 0, VIEW_MONITOR, false ); + +g_bRenderingCameraView = bOldRenderingCameraView; + +if ( pLocal ) +{ + pLocal->m_Local.m_bForceLocalPlayerDraw = bOldForceDraw; +} + +render->PopView( frustum ); + + + + + // Reset the world fog parameters. if ( fogEnabled ) @@ -3250,9 +3298,11 @@ void CViewRender::DrawMonitors( const CViewSetup &cameraView ) if ( !pCameraEnt ) return; + + + tmZone( TELEMETRY_LEVEL0, TMZF_NONE, "%s", __FUNCTION__ ); - g_bRenderingCameraView = true; // FIXME: this should check for the ability to do a render target maybe instead. // FIXME: shouldn't have to truck through all of the visible entities for this!!!! @@ -3959,7 +4009,9 @@ static inline void DrawOpaqueRenderable( IClientRenderable *pEnt, bool bTwoPass, { CMatRenderContextPtr pRenderContext( materials ); if( !materials->UsingFastClipping() ) //do NOT change the fast clip plane mid-scene, depth problems result. Regular user clip planes are fine though - pRenderContext->PushCustomClipPlane( pRenderClipPlane ); + { + // pRenderContext->PushCustomClipPlane( pRenderClipPlane ); + } else DrawClippedDepthBox( pEnt, pRenderClipPlane ); Assert( view->GetCurrentlyDrawingEntity() == NULL ); @@ -3967,7 +4019,9 @@ static inline void DrawOpaqueRenderable( IClientRenderable *pEnt, bool bTwoPass, pEnt->DrawModel( flags ); view->SetCurrentlyDrawingEntity( NULL ); if( pRenderClipPlane && !materials->UsingFastClipping() ) - pRenderContext->PopCustomClipPlane(); + { + // pRenderContext->PopCustomClipPlane(); + } } else { @@ -6258,6 +6312,15 @@ void CUnderWaterView::CRefractionView::Draw() //----------------------------------------------------------------------------- // Draws the scene when the view contains reflective glass //----------------------------------------------------------------------------- + + +void CViewRender::JBMod_DrawViewModelsForReflection( const CViewSetup &viewRender ) +{ + DrawViewModels( viewRender, true ); +} + + + void CReflectiveGlassView::Setup( const CViewSetup &viewRender, int nClearFlags, bool bDrawSkybox, const VisibleFogVolumeInfo_t &fogInfo, const WaterRenderInfo_t &waterInfo, const cplane_t &reflectionPlane ) { @@ -6323,12 +6386,51 @@ void CReflectiveGlassView::Draw() PIXEVENT( pRenderContext, "CReflectiveGlassView::Draw" ); // Disable occlusion visualization in reflection - bool bVisOcclusion = r_visocclusion.GetInt(); - r_visocclusion.SetValue( 0 ); - - BaseClass::Draw(); +bool bVisOcclusion = r_visocclusion.GetInt(); +r_visocclusion.SetValue( 0 ); - r_visocclusion.SetValue( bVisOcclusion ); + + +C_BasePlayer *pLocal = C_BasePlayer::GetLocalPlayer(); +bool bOldForceDraw = false; + +if ( pLocal ) +{ + bOldForceDraw = pLocal->m_Local.m_bForceLocalPlayerDraw; + pLocal->m_Local.m_bForceLocalPlayerDraw = true; + + if ( pLocal->GetActiveWeapon() ) + pLocal->GetActiveWeapon()->JBMod_PrepareForCameraRender(); +} + + + + +//bool bOldCameraView = g_bRenderingCameraView; +//bool bOldReflectionView = g_bRenderingReflectionView; + +//g_bRenderingCameraView = true; +//g_bRenderingReflectionView = true; + +BaseClass::Draw(); +if ( pLocal && pLocal->GetActiveWeapon() ) +{ + pLocal->GetActiveWeapon()->DrawModel( STUDIO_RENDER ); +} + + + +//g_bRenderingReflectionView = bOldReflectionView; +//g_bRenderingCameraView = bOldCameraView; + +if ( pLocal ) +{ + pLocal->m_Local.m_bForceLocalPlayerDraw = bOldForceDraw; +} + + + +r_visocclusion.SetValue( bVisOcclusion ); pRenderContext->ClearColor4ub( 0, 0, 0, 255 ); pRenderContext->Flush(); @@ -6396,3 +6498,4 @@ void CRefractiveGlassView::Draw() pRenderContext->ClearColor4ub( 0, 0, 0, 255 ); pRenderContext->Flush(); } + diff --git a/src/game/shared/jbmod/jbmod_gamerules.cpp b/src/game/shared/jbmod/jbmod_gamerules.cpp index 1690465cfa6..e69ef4406fc 100644 --- a/src/game/shared/jbmod/jbmod_gamerules.cpp +++ b/src/game/shared/jbmod/jbmod_gamerules.cpp @@ -855,6 +855,7 @@ void CJBModRules::ClientSettingsChanged( CBasePlayer *pPlayer ) Q_snprintf( szReturnString, sizeof( szReturnString ), "Please wait %d more seconds before trying to switch.\n", (int)(pHL2Player->GetNextModelChangeTime() - gpGlobals->curtime) ); ClientPrint( pHL2Player, HUD_PRINTTALK, szReturnString ); + pHL2Player->ScriptSetPlayerModel( szModelName ); return; }