mirror of
https://github.com/libretro/libretro-tyrquake.git
synced 2024-12-02 21:37:06 +00:00
client: fix nq temp entities
Broken since 293084b
"nq: handle visedicts similarly to qw".
Well, I did suspect stuff might get broken... now fixed!
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
b9ae1b70a5
commit
032bb52216
@ -124,7 +124,6 @@ CL_ClearState(void)
|
|||||||
memset(cl_entities, 0, sizeof(cl_entities));
|
memset(cl_entities, 0, sizeof(cl_entities));
|
||||||
memset(cl_dlights, 0, sizeof(cl_dlights));
|
memset(cl_dlights, 0, sizeof(cl_dlights));
|
||||||
memset(cl_lightstyle, 0, sizeof(cl_lightstyle));
|
memset(cl_lightstyle, 0, sizeof(cl_lightstyle));
|
||||||
memset(cl_temp_entities, 0, sizeof(cl_temp_entities));
|
|
||||||
memset(cl_beams, 0, sizeof(cl_beams));
|
memset(cl_beams, 0, sizeof(cl_beams));
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -660,7 +659,6 @@ CL_RelinkEntities(void)
|
|||||||
cl_numvisedicts++;
|
cl_numvisedicts++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
18
NQ/cl_tent.c
18
NQ/cl_tent.c
@ -32,8 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||||||
# include "model.h"
|
# include "model.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int num_temp_entities;
|
|
||||||
entity_t cl_temp_entities[MAX_TEMP_ENTITIES];
|
|
||||||
beam_t cl_beams[MAX_BEAMS];
|
beam_t cl_beams[MAX_BEAMS];
|
||||||
|
|
||||||
sfx_t *cl_sfx_wizhit;
|
sfx_t *cl_sfx_wizhit;
|
||||||
@ -266,21 +264,19 @@ CL_ParseTEnt(void)
|
|||||||
CL_NewTempEntity
|
CL_NewTempEntity
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
entity_t *
|
static entity_t *
|
||||||
CL_NewTempEntity(void)
|
CL_NewTempEntity(void)
|
||||||
{
|
{
|
||||||
entity_t *ent;
|
entity_t *ent;
|
||||||
|
|
||||||
if (cl_numvisedicts == MAX_VISEDICTS)
|
if (cl_numvisedicts == MAX_VISEDICTS)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (num_temp_entities == MAX_TEMP_ENTITIES)
|
|
||||||
return NULL;
|
ent = &cl_visedicts[cl_numvisedicts];
|
||||||
ent = &cl_temp_entities[num_temp_entities];
|
|
||||||
memset(ent, 0, sizeof(*ent));
|
|
||||||
num_temp_entities++;
|
|
||||||
cl_visedicts[cl_numvisedicts] = *ent;
|
|
||||||
cl_numvisedicts++;
|
cl_numvisedicts++;
|
||||||
|
|
||||||
|
memset(ent, 0, sizeof(*ent));
|
||||||
|
|
||||||
ent->colormap = vid.colormap;
|
ent->colormap = vid.colormap;
|
||||||
return ent;
|
return ent;
|
||||||
}
|
}
|
||||||
@ -302,8 +298,6 @@ CL_UpdateTEnts(void)
|
|||||||
float yaw, pitch;
|
float yaw, pitch;
|
||||||
float forward;
|
float forward;
|
||||||
|
|
||||||
num_temp_entities = 0;
|
|
||||||
|
|
||||||
// update lightning
|
// update lightning
|
||||||
for (i = 0, b = cl_beams; i < MAX_BEAMS; i++, b++) {
|
for (i = 0, b = cl_beams; i < MAX_BEAMS; i++, b++) {
|
||||||
if (!b->model || b->endtime < cl.time)
|
if (!b->model || b->endtime < cl.time)
|
||||||
@ -340,6 +334,7 @@ CL_UpdateTEnts(void)
|
|||||||
ent = CL_NewTempEntity();
|
ent = CL_NewTempEntity();
|
||||||
if (!ent)
|
if (!ent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
VectorCopy(org, ent->origin);
|
VectorCopy(org, ent->origin);
|
||||||
ent->model = b->model;
|
ent->model = b->model;
|
||||||
ent->angles[0] = pitch;
|
ent->angles[0] = pitch;
|
||||||
@ -351,5 +346,4 @@ CL_UpdateTEnts(void)
|
|||||||
d -= 30;
|
d -= 30;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user