mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- minor sprite[] stuff.
This commit is contained in:
parent
8f974dc1d8
commit
70cd4d9466
2 changed files with 19 additions and 21 deletions
|
@ -346,8 +346,8 @@ void fakePlayerProcess(PLAYER *pPlayer, InputPacket *pInput)
|
|||
{
|
||||
predict.at72 = 1;
|
||||
int nSector = predict.sectnum;
|
||||
int nLink = gLowerLink[nSector];
|
||||
if (nLink > 0 && (sprite[nLink].type == kMarkerLowGoo || sprite[nLink].type == kMarkerLowWater))
|
||||
auto nLink = getLowerLink(nSector);
|
||||
if (nLink && (nLink->s().type == kMarkerLowGoo || nLink->s().type == kMarkerLowWater))
|
||||
{
|
||||
if (getceilzofslope(nSector, predict.x, predict.y) > predict.viewz)
|
||||
predict.at72 = 0;
|
||||
|
@ -435,11 +435,11 @@ static void fakeMoveDude(spritetype *pSprite)
|
|||
if (pXSector->Depth)
|
||||
bDepth = 1;
|
||||
}
|
||||
int nUpperLink = gUpperLink[nSector];
|
||||
int nLowerLink = gLowerLink[nSector];
|
||||
if (nUpperLink >= 0 && (sprite[nUpperLink].type == kMarkerUpWater || sprite[nUpperLink].type == kMarkerUpGoo))
|
||||
auto nUpperLink = getUpperLink(nSector);
|
||||
auto nLowerLink = getLowerLink(nSector);
|
||||
if (nUpperLink >= 0 && (nUpperLink->s().type == kMarkerUpWater || nUpperLink->s().type == kMarkerUpGoo))
|
||||
bDepth = 1;
|
||||
if (nLowerLink >= 0 && (sprite[nLowerLink].type == kMarkerLowWater || sprite[nLowerLink].type == kMarkerLowGoo))
|
||||
if (nLowerLink >= 0 && (nLowerLink->s().type == kMarkerLowWater || nLowerLink->s().type == kMarkerLowGoo))
|
||||
bDepth = 1;
|
||||
if (pPlayer)
|
||||
wd += 16;
|
||||
|
|
|
@ -259,23 +259,21 @@ void PreloadCache()
|
|||
if (wall[i].overpicnum >= 0)
|
||||
tilePrecacheTile(wall[i].overpicnum, 0, wall[i].pal);
|
||||
}
|
||||
for (int i = 0; i < kMaxSprites; i++)
|
||||
BloodSpriteIterator it;
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
if (sprite[i].statnum < kMaxStatus)
|
||||
spritetype *pSprite = &actor->s();
|
||||
switch (pSprite->statnum)
|
||||
{
|
||||
spritetype *pSprite = &sprite[i];
|
||||
switch (pSprite->statnum)
|
||||
{
|
||||
case kStatDude:
|
||||
PrecacheDude(pSprite);
|
||||
break;
|
||||
case kStatThing:
|
||||
PrecacheThing(pSprite);
|
||||
break;
|
||||
default:
|
||||
tilePrecacheTile(pSprite->picnum, -1, pSprite->pal);
|
||||
break;
|
||||
}
|
||||
case kStatDude:
|
||||
PrecacheDude(pSprite);
|
||||
break;
|
||||
case kStatThing:
|
||||
PrecacheThing(pSprite);
|
||||
break;
|
||||
default:
|
||||
tilePrecacheTile(pSprite->picnum, -1, pSprite->pal);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue