Browse Source

ref_soft: fixed R_WorldToScreen behavior to match GoldSrc

pull/2/head
SNMetamorph 3 years ago committed by a1batross
parent
commit
5402e1a259
  1. 2
      ref_soft/r_main.c
  2. 12
      ref_soft/r_triapi.c

2
ref_soft/r_main.c

@ -253,8 +253,6 @@ int R_WorldToScreen( const vec3_t point, vec3_t screen )
if( w < 0.001f ) if( w < 0.001f )
{ {
screen[0] *= 100000;
screen[1] *= 100000;
behind = true; behind = true;
} }
else else

12
ref_soft/r_triapi.c

@ -356,17 +356,7 @@ convert world coordinates (x,y,z) into screen (x, y)
*/ */
int GAME_EXPORT TriWorldToScreen( const float *world, float *screen ) int GAME_EXPORT TriWorldToScreen( const float *world, float *screen )
{ {
int retval; return R_WorldToScreen( world, screen );
retval = R_WorldToScreen( world, screen );
screen[0] = 0.5f * screen[0] * (float)RI.viewport[2];
screen[1] = -0.5f * screen[1] * (float)RI.viewport[3];
screen[0] += 0.5f * (float)RI.viewport[2];
screen[1] += 0.5f * (float)RI.viewport[3];
return retval;
} }
/* /*

Loading…
Cancel
Save