mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-26 05:41:24 +00:00
Restore ZHack in R_DrawEntitiesOnList
This commit is contained in:
parent
98bdccecc8
commit
d703ed6427
1 changed files with 23 additions and 2 deletions
|
@ -2281,9 +2281,9 @@ void R_DrawAliasModel (entity_t *e)
|
|||
if(doZHack && specChar == '#')
|
||||
{
|
||||
if(clmodel->name[strlen(clmodel->name) - 6] == 'c')
|
||||
paliashdr = (aliashdr_t *) Mod_Extradata(Mod_FindName("progs/ai/zcfull.mdl"));
|
||||
paliashdr = (aliashdr_t *) Mod_Extradata(Mod_FindName("models/ai/zcfull.mdl"));
|
||||
else
|
||||
paliashdr = (aliashdr_t *) Mod_Extradata(Mod_FindName("progs/ai/zfull.mdl"));
|
||||
paliashdr = (aliashdr_t *) Mod_Extradata(Mod_FindName("models/ai/zfull.mdl"));
|
||||
}
|
||||
else
|
||||
paliashdr = (aliashdr_t *)Mod_Extradata (e->model);
|
||||
|
@ -4072,6 +4072,9 @@ void R_RenderScene (void)
|
|||
// drawentitiesonlist
|
||||
if (r_drawentities.value) {
|
||||
|
||||
int zHackCount;
|
||||
doZHack = 0;
|
||||
|
||||
// draw sprites seperately, because of alpha blending
|
||||
for (i=0 ; i<cl_numvisedicts ; i++)
|
||||
{
|
||||
|
@ -4089,6 +4092,23 @@ void R_RenderScene (void)
|
|||
|
||||
specChar = currententity->model->name[strlen(currententity->model->name)-5];
|
||||
|
||||
if(specChar == '(' || specChar == '^')//skip heads and arms: it's faster to do this than a strcmp...
|
||||
{
|
||||
continue;
|
||||
}
|
||||
doZHack = 0;
|
||||
if(specChar == '#')
|
||||
{
|
||||
if(zHackCount > 5 || ((currententity->z_head != 0) && (currententity->z_larm != 0) && (currententity->z_rarm != 0)))
|
||||
{
|
||||
doZHack = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
zHackCount ++;//drawing zombie piece by piece.
|
||||
}
|
||||
}
|
||||
|
||||
switch (currententity->model->type) {
|
||||
case mod_alias:
|
||||
if (qmb_initialized && SetFlameModelState() == -1) continue;
|
||||
|
@ -4120,6 +4140,7 @@ void R_RenderScene (void)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
doZHack = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue