Browse Source

engine: client: fixed TriWorldToScreen behavior to match GoldSrc

pull/2/head
SNMetamorph 3 years ago committed by a1batross
parent
commit
9c85d114e7
  1. 11
      engine/client/cl_game.c

11
engine/client/cl_game.c

@ -3178,16 +3178,7 @@ convert world coordinates (x,y,z) into screen (x, y)
*/ */
int TriWorldToScreen( const float *world, float *screen ) int TriWorldToScreen( const float *world, float *screen )
{ {
int retval; return ref.dllFuncs.WorldToScreen( world, screen );
retval = ref.dllFuncs.WorldToScreen( world, screen );
screen[0] = 0.5f * screen[0] * (float)clgame.viewport[2];
screen[1] = -0.5f * screen[1] * (float)clgame.viewport[3];
screen[0] += 0.5f * (float)clgame.viewport[2];
screen[1] += 0.5f * (float)clgame.viewport[3];
return retval;
} }
/* /*

Loading…
Cancel
Save