|
|
@ -667,21 +667,36 @@ R_DrawViewModel -- johnfitz -- gutted |
|
|
*/ |
|
|
*/ |
|
|
void R_DrawViewModel (void) |
|
|
void R_DrawViewModel (void) |
|
|
{ |
|
|
{ |
|
|
|
|
|
currententity = &cl.viewent; |
|
|
|
|
|
|
|
|
if (!r_drawviewmodel.value || !r_drawentities.value || chase_active.value) |
|
|
if (!r_drawviewmodel.value || !r_drawentities.value || chase_active.value) |
|
|
|
|
|
{ |
|
|
|
|
|
UQ_Game_RemoveEntity(currententity->num); |
|
|
return; |
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (cl.items & IT_INVISIBILITY || cl.stats[STAT_HEALTH] <= 0) |
|
|
if (cl.items & IT_INVISIBILITY || cl.stats[STAT_HEALTH] <= 0) |
|
|
|
|
|
{ |
|
|
|
|
|
UQ_Game_RemoveEntity(currententity->num); |
|
|
return; |
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
currententity = &cl.viewent; |
|
|
|
|
|
if (!currententity->model) |
|
|
if (!currententity->model) |
|
|
|
|
|
{ |
|
|
|
|
|
UQ_Game_RemoveEntity(currententity->num); |
|
|
return; |
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//johnfitz -- this fixes a crash |
|
|
//johnfitz -- this fixes a crash |
|
|
if (currententity->model->type != mod_alias) |
|
|
if (currententity->model->type != mod_alias) |
|
|
|
|
|
{ |
|
|
|
|
|
UQ_Game_RemoveEntity(currententity->num); |
|
|
return; |
|
|
return; |
|
|
|
|
|
} |
|
|
//johnfitz |
|
|
//johnfitz |
|
|
|
|
|
|
|
|
|
|
|
UQ_Game_SetEntityModel(currententity->num, currententity->model->name); |
|
|
|
|
|
|
|
|
// hack the depth range to prevent view model from poking into walls |
|
|
// hack the depth range to prevent view model from poking into walls |
|
|
glDepthRange (0, 0.3); |
|
|
glDepthRange (0, 0.3); |
|
|
R_DrawAliasModel (currententity); |
|
|
R_DrawAliasModel (currententity); |
|
|
|