diff --git a/r_local.h b/r_local.h index 1d482b77..209f4e26 100644 --- a/r_local.h +++ b/r_local.h @@ -640,8 +640,8 @@ void Mod_SpriteUnloadTextures( void *data ); void Mod_UnloadAliasModel( struct model_s *mod ); void Mod_AliasUnloadTextures( void *data ); void GL_SetRenderMode( int mode ); -//void R_RunViewmodelEvents( void ); -//void R_DrawViewModel( void ); +void R_RunViewmodelEvents( void ); +void R_DrawViewModel( void ); int R_GetSpriteTexture( const struct model_s *m_pSpriteModel, int frame ); void R_DecalShoot( int textureIndex, int entityIndex, int modelIndex, vec3_t pos, int flags, float scale ); void R_RemoveEfrags( struct cl_entity_s *ent ); @@ -1267,6 +1267,7 @@ extern aliastriangleparms_t aliastriangleparms; extern int r_aliasblendcolor; extern float aliasxscale, aliasyscale, aliasxcenter, aliasycenter; +extern float s_ziscale; void R_DrawTriangle( void ); //void R_DrawTriangle (finalvert_t *index0, finalvert_t *index1, finalvert_t *index2); diff --git a/r_main.c b/r_main.c index f3f0ad9d..3993f12a 100644 --- a/r_main.c +++ b/r_main.c @@ -1149,8 +1149,8 @@ void R_DrawEntitiesOnList( void ) // pglDisable( GL_BLEND ); // Trinity Render issues - //if( !RI.onlyClientDraw ) - //R_DrawViewModel(); + if( !RI.onlyClientDraw ) + R_DrawViewModel(); gEngfuncs.CL_ExtraUpdate(); //GL_CheckForErrors(); @@ -1766,8 +1766,8 @@ int R_RenderFrame( const ref_viewpass_t *rvp ) } tr.fCustomRendering = false; -// if( !RI.onlyClientDraw ) - // R_RunViewmodelEvents(); + if( !RI.onlyClientDraw ) + R_RunViewmodelEvents(); tr.realframecount++; // right called after viewmodel events R_RenderScene(); diff --git a/r_studio.c b/r_studio.c index f5284af8..22e25915 100644 --- a/r_studio.c +++ b/r_studio.c @@ -3477,7 +3477,7 @@ void R_DrawViewModel( void ) // adjust the depth range to prevent view model from poking into walls //pglDepthRange( gldepthmin, gldepthmin + 0.3f * ( gldepthmax - gldepthmin )); - /// TODO: ziscale + s_ziscale = (float)0x8000 * (float)0x10000 * 3.0; RI.currentmodel = RI.currententity->model; // backface culling for left-handed weapons @@ -3500,7 +3500,7 @@ void R_DrawViewModel( void ) // restore depth range //pglDepthRange( gldepthmin, gldepthmax ); - /// ziscale + s_ziscale = (float)0x8000 * (float)0x10000; // backface culling for left-handed weapons if( R_AllowFlipViewModel( RI.currententity ) || g_iBackFaceCull ) diff --git a/r_trialias.c b/r_trialias.c index fdd0778d..0233dda3 100644 --- a/r_trialias.c +++ b/r_trialias.c @@ -19,7 +19,7 @@ float aliastransform[3][4]; float aliasworldtransform[3][4]; float aliasoldworldtransform[3][4]; -static float s_ziscale; +float s_ziscale; static vec3_t s_alias_forward, s_alias_right, s_alias_up;