mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-03-14 04:01:06 +00:00
Fix for invisible gun and lightning. (cleanup after Endy)
This commit is contained in:
parent
a02481c08c
commit
e3d8266db8
2 changed files with 5 additions and 4 deletions
|
@ -720,16 +720,14 @@ R_DrawViewModel
|
||||||
*/
|
*/
|
||||||
void R_DrawViewModel (void)
|
void R_DrawViewModel (void)
|
||||||
{
|
{
|
||||||
|
currententity = &cl.viewent;
|
||||||
if (!r_drawviewmodel->value
|
if (!r_drawviewmodel->value
|
||||||
|| !Cam_DrawViewModel()
|
|| !Cam_DrawViewModel()
|
||||||
|| envmap
|
|| envmap
|
||||||
|| !r_drawentities->value
|
|| !r_drawentities->value
|
||||||
|| (cl.stats[STAT_ITEMS] & IT_INVISIBILITY)
|
|| (cl.stats[STAT_ITEMS] & IT_INVISIBILITY)
|
||||||
|| cl.stats[STAT_HEALTH] <= 0)
|
|| cl.stats[STAT_HEALTH] <= 0)
|
||||||
return;
|
|| !currententity->model)
|
||||||
|
|
||||||
currententity = &cl.viewent;
|
|
||||||
if (!currententity->model)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// hack the depth range to prevent view model from poking into walls
|
// hack the depth range to prevent view model from poking into walls
|
||||||
|
|
|
@ -741,6 +741,9 @@ void V_CalcRefdef (void)
|
||||||
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
||||||
view->frame = view_message->weaponframe;
|
view->frame = view_message->weaponframe;
|
||||||
view->colormap = vid.colormap;
|
view->colormap = vid.colormap;
|
||||||
|
// LordHavoc: make gun visible
|
||||||
|
view->alpha = 1;
|
||||||
|
view->colormod[0] = view->colormod[1] = view->colormod[2] = 1;
|
||||||
|
|
||||||
// set up the refresh position
|
// set up the refresh position
|
||||||
r_refdef.viewangles[PITCH] += cl.punchangle;
|
r_refdef.viewangles[PITCH] += cl.punchangle;
|
||||||
|
|
Loading…
Reference in a new issue