mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Duke3d: make CON_GETFLORZOFSLOPE and CON_GETCEILZOFSLOPE TROR aware
This commit is contained in:
parent
e2d79b4682
commit
d9b8f58558
1 changed files with 6 additions and 8 deletions
|
@ -627,23 +627,21 @@ static inline void VM_FacePlayer(int const shift)
|
||||||
: getangle(vm.pPlayer->pos.x - vm.pSprite->x, vm.pPlayer->pos.y - vm.pSprite->y));
|
: getangle(vm.pPlayer->pos.x - vm.pSprite->x, vm.pPlayer->pos.y - vm.pSprite->y));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t VM_GetCeilZOfSlope(void)
|
static inline int32_t VM_GetCeilZOfSlope(void)
|
||||||
{
|
{
|
||||||
vec2_t const vect = vm.pSprite->pos.vec2;
|
vec2_t const vect = vm.pSprite->pos.vec2;
|
||||||
int const sectnum = vm.pSprite->sectnum;
|
int const sectnum = vm.pSprite->sectnum;
|
||||||
|
|
||||||
return yax_getceilzofslope(sectnum, vect);
|
return yax_getceilzofslope(sectnum, vect);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef EDUKE32_STANDALONE
|
#ifndef EDUKE32_STANDALONE
|
||||||
static int32_t VM_GetFlorZOfSlope(void)
|
static inline int32_t VM_GetFlorZOfSlope(void)
|
||||||
{
|
{
|
||||||
vec2_t const vect = vm.pSprite->pos.vec2;
|
vec2_t const vect = vm.pSprite->pos.vec2;
|
||||||
int const sectnum = vm.pSprite->sectnum;
|
int const sectnum = vm.pSprite->sectnum;
|
||||||
|
|
||||||
return yax_getflorzofslope(sectnum, vect);
|
return yax_getflorzofslope(sectnum, vect);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1063,7 +1061,7 @@ static void VM_Fall(int const spriteNum, spritetype * const pSprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sector[pSprite->sectnum].lotag == ST_1_ABOVE_WATER && actor[spriteNum].floorz == getcorrectflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y))
|
if (sector[pSprite->sectnum].lotag == ST_1_ABOVE_WATER && actor[spriteNum].floorz == yax_getflorzofslope(pSprite->sectnum, pSprite->pos.vec2))
|
||||||
{
|
{
|
||||||
pSprite->z = newZ + A_GetWaterZOffset(spriteNum);
|
pSprite->z = newZ + A_GetWaterZOffset(spriteNum);
|
||||||
return;
|
return;
|
||||||
|
@ -4726,7 +4724,7 @@ badindex:
|
||||||
|
|
||||||
VM_ASSERT((unsigned)v.sectNum < MAXSECTORS, "invalid sector %d\n", v.sectNum);
|
VM_ASSERT((unsigned)v.sectNum < MAXSECTORS, "invalid sector %d\n", v.sectNum);
|
||||||
|
|
||||||
Gv_SetVar(*insptr++, (VM_DECODE_INST(tw) == CON_GETFLORZOFSLOPE ? getflorzofslope : getceilzofslope)(v.sectNum, v.vect.x, v.vect.y));
|
Gv_SetVar(*insptr++, (VM_DECODE_INST(tw) == CON_GETFLORZOFSLOPE ? yax_getflorzofslope : yax_getceilzofslope)(v.sectNum, v.vect));
|
||||||
dispatch();
|
dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue