mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-18 15:11:51 +00:00
polymer: fix animations that loop to frame 0
With VBOs enabled, the virtual pointer to the geometry of frame 0 of a model is always NULL. This was confusing the polymer code responsible for deciding whether to enable smooth animations or not, which meant that any animation that would loop to frame 0 would do it as if animation interpolation was disabled, which looks very choppy. git-svn-id: https://svn.eduke32.com/eduke32@2443 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
95cbdbd1be
commit
cdafeef732
1 changed files with 2 additions and 2 deletions
|
@ -4387,7 +4387,7 @@ static void polymer_getscratchmaterial(_prmaterial* material)
|
|||
|
||||
// PR_BIT_ANIM_INTERPOLATION
|
||||
material->frameprogress = 0.0f;
|
||||
material->nextframedata = NULL;
|
||||
material->nextframedata = (float*)-1;
|
||||
// PR_BIT_NORMAL_MAP
|
||||
material->normalmap = 0;
|
||||
material->normalbias[0] = material->normalbias[1] = 0.0f;
|
||||
|
@ -4523,7 +4523,7 @@ static int32_t polymer_bindmaterial(_prmaterial material, int16_t* lights,
|
|||
// --------- bit validation
|
||||
|
||||
// PR_BIT_ANIM_INTERPOLATION
|
||||
if (material.nextframedata)
|
||||
if (material.nextframedata != ((float*)-1))
|
||||
programbits |= prprogrambits[PR_BIT_ANIM_INTERPOLATION].bit;
|
||||
|
||||
// PR_BIT_LIGHTING_PASS
|
||||
|
|
Loading…
Reference in a new issue