mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 06:41:59 +00:00
- Blood: Add interpolated weapon QAVs to WeaponInit()
and WeaponPrecache()
functions.
This commit is contained in:
parent
726edc199e
commit
2fbfa82fe8
1 changed files with 23 additions and 11 deletions
|
@ -228,23 +228,35 @@ void SpawnShellEject(PLAYER *pPlayer, int a2, int a3)
|
|||
|
||||
void WeaponInit(void)
|
||||
{
|
||||
for (int i = 0; i < kQAVEnd; i++)
|
||||
auto doInit = [](const int base)
|
||||
{
|
||||
auto pQAV = getQAV(i);
|
||||
if (!pQAV)
|
||||
I_Error("Could not load QAV %d\n", i);
|
||||
pQAV->nSprite = -1;
|
||||
}
|
||||
for (int i = base; i < (kQAVEnd + base); i++)
|
||||
{
|
||||
auto pQAV = getQAV(i);
|
||||
if (!pQAV)
|
||||
I_Error("Could not load QAV %d\n", i);
|
||||
pQAV->nSprite = -1;
|
||||
}
|
||||
};
|
||||
|
||||
doInit(0);
|
||||
doInit(10000);
|
||||
}
|
||||
|
||||
void WeaponPrecache()
|
||||
{
|
||||
for (int i = 0; i < kQAVEnd; i++)
|
||||
auto doPrecache = [](const int base)
|
||||
{
|
||||
auto pQAV = getQAV(i);
|
||||
if (pQAV)
|
||||
pQAV->Precache();
|
||||
}
|
||||
for (int i = base; i < (kQAVEnd + base); i++)
|
||||
{
|
||||
auto pQAV = getQAV(i);
|
||||
if (pQAV)
|
||||
pQAV->Precache();
|
||||
}
|
||||
};
|
||||
|
||||
doPrecache(0);
|
||||
doPrecache(10000);
|
||||
}
|
||||
|
||||
void WeaponDraw(PLAYER *pPlayer, int shade, double xpos, double ypos, int palnum)
|
||||
|
|
Loading…
Reference in a new issue