mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-29 15:11:54 +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(doZHack && specChar == '#')
|
||||||
{
|
{
|
||||||
if(clmodel->name[strlen(clmodel->name) - 6] == 'c')
|
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
|
else
|
||||||
paliashdr = (aliashdr_t *) Mod_Extradata(Mod_FindName("progs/ai/zfull.mdl"));
|
paliashdr = (aliashdr_t *) Mod_Extradata(Mod_FindName("models/ai/zfull.mdl"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
paliashdr = (aliashdr_t *)Mod_Extradata (e->model);
|
paliashdr = (aliashdr_t *)Mod_Extradata (e->model);
|
||||||
|
@ -4072,6 +4072,9 @@ void R_RenderScene (void)
|
||||||
// drawentitiesonlist
|
// drawentitiesonlist
|
||||||
if (r_drawentities.value) {
|
if (r_drawentities.value) {
|
||||||
|
|
||||||
|
int zHackCount;
|
||||||
|
doZHack = 0;
|
||||||
|
|
||||||
// draw sprites seperately, because of alpha blending
|
// draw sprites seperately, because of alpha blending
|
||||||
for (i=0 ; i<cl_numvisedicts ; i++)
|
for (i=0 ; i<cl_numvisedicts ; i++)
|
||||||
{
|
{
|
||||||
|
@ -4089,6 +4092,23 @@ void R_RenderScene (void)
|
||||||
|
|
||||||
specChar = currententity->model->name[strlen(currententity->model->name)-5];
|
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) {
|
switch (currententity->model->type) {
|
||||||
case mod_alias:
|
case mod_alias:
|
||||||
if (qmb_initialized && SetFlameModelState() == -1) continue;
|
if (qmb_initialized && SetFlameModelState() == -1) continue;
|
||||||
|
@ -4120,6 +4140,7 @@ void R_RenderScene (void)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
doZHack = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue