mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-22 11:51:21 +00:00
Merge pull request #11 from shpuld/fix/flame-mdl-crashing-custom-maps
This commit is contained in:
commit
52ad56f8c2
3 changed files with 6 additions and 6 deletions
|
@ -1014,7 +1014,7 @@ void GL_DrawAliasFrame (aliashdr_t *paliashdr, int posenum)
|
|||
int numcommands = order[0];
|
||||
order++;
|
||||
|
||||
qboolean isStatic = paliashdr->numframes <= 1 ? qtrue : qfalse;
|
||||
qboolean isStatic = paliashdr->numposes <= 1 ? qtrue : qfalse;
|
||||
|
||||
struct vertex
|
||||
{
|
||||
|
@ -1687,7 +1687,7 @@ void R_DrawZombieLimb (entity_t *e,int which)
|
|||
IgnoreInterpolatioFrame(e, paliashdr);
|
||||
|
||||
// Make sure we never try to do blended frame on models with just single frame
|
||||
if (r_i_model_animation.value && paliashdr->numframes > 1)
|
||||
if (r_i_model_animation.value && paliashdr->numposes > 1)
|
||||
{
|
||||
R_SetupAliasBlendedFrame (e->frame, paliashdr, e);
|
||||
}
|
||||
|
|
|
@ -358,7 +358,7 @@ static void BuildTris (void)
|
|||
|
||||
commands[numcommands++] = st.i;
|
||||
|
||||
if (pheader->numframes <= 1) {
|
||||
if (pheader->numposes <= 1) {
|
||||
xyz_union pos;
|
||||
pos.xyz[0] = poseverts[0][k].v[0];
|
||||
pos.xyz[1] = poseverts[0][k].v[1];
|
||||
|
@ -447,7 +447,7 @@ void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
|
|||
memcpy (cmds, commands, numcommands * sizeof(int));
|
||||
|
||||
// Only allocate this for animated models, static models have their vert coords in the command buffer for speed
|
||||
if (paliashdr->numframes > 1)
|
||||
if (paliashdr->numposes > 1)
|
||||
{
|
||||
verts = static_cast<trivertx_t*>(Hunk_Alloc (paliashdr->numposes * paliashdr->poseverts
|
||||
* sizeof(trivertx_t)));
|
||||
|
|
|
@ -1945,8 +1945,8 @@ void *Mod_LoadAliasGroup (void * pin, maliasframedesc_t *frame)
|
|||
{
|
||||
poseverts[posenum] = (trivertx_t *)((daliasframe_t *)ptemp + 1);
|
||||
|
||||
for (i = 0; i < pheader->numverts; i++) {
|
||||
utrivertx_t * unsigned_vert = (utrivertx_t*)&(poseverts[posenum][i]);
|
||||
for (int j = 0; j < pheader->numverts; j++) {
|
||||
utrivertx_t * unsigned_vert = (utrivertx_t*)&(poseverts[posenum][j]);
|
||||
poseverts[posenum][i].v[0] = unsigned_vert->v[0] - 128;
|
||||
poseverts[posenum][i].v[1] = unsigned_vert->v[1] - 128;
|
||||
poseverts[posenum][i].v[2] = unsigned_vert->v[2] - 128;
|
||||
|
|
Loading…
Reference in a new issue