mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- spr.yvel is gone in Exhumed
This commit is contained in:
parent
490d4d3555
commit
45d95ec053
10 changed files with 26 additions and 26 deletions
|
@ -119,7 +119,7 @@ void AIFishLimb::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
auto coll = movesprite(pActor, pActor->int_xvel() << 8, pActor->spr.yvel << 8, pActor->int_zvel(), 2560, -2560, CLIPMASK1);
|
||||
auto coll = movesprite(pActor, pActor->int_xvel() << 8, pActor->int_yvel() << 8, pActor->int_zvel(), 2560, -2560, CLIPMASK1);
|
||||
if (coll.type != kHitNone)
|
||||
{
|
||||
pActor->clear_xvel();
|
||||
|
@ -415,7 +415,7 @@ void AIFish::Tick(RunListEvent* ev)
|
|||
auto pSector =pActor->sector();
|
||||
|
||||
// loc_2EF54
|
||||
Collision coll = movesprite(pActor, pActor->int_xvel() << 13, pActor->spr.yvel << 13, pActor->int_zvel() << 2, 0, 0, CLIPMASK0);
|
||||
Collision coll = movesprite(pActor, pActor->int_xvel() << 13, pActor->int_yvel() << 13, pActor->int_zvel() << 2, 0, 0, CLIPMASK0);
|
||||
|
||||
if (!(pActor->sector()->Flag & kSectUnderwater))
|
||||
{
|
||||
|
|
|
@ -73,7 +73,7 @@ void AILavaDudeLimb::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->spr.shade += 3;
|
||||
|
||||
auto coll = movesprite(pActor, pActor->int_xvel() << 12, pActor->spr.yvel << 12, pActor->int_zvel(), 2560, -2560, CLIPMASK1);
|
||||
auto coll = movesprite(pActor, pActor->int_xvel() << 12, pActor->int_yvel() << 12, pActor->int_zvel(), 2560, -2560, CLIPMASK1);
|
||||
|
||||
if (coll.type || pActor->spr.shade > 100)
|
||||
{
|
||||
|
@ -280,7 +280,7 @@ void AILavaDude::Tick(RunListEvent* ev)
|
|||
auto pos = pActor->spr.pos;
|
||||
auto pSector =pActor->sector();
|
||||
|
||||
auto coll = movesprite(pActor, pActor->int_xvel() << 8, pActor->spr.yvel << 8, 0, 0, 0, CLIPMASK0);
|
||||
auto coll = movesprite(pActor, pActor->int_xvel() << 8, pActor->int_yvel() << 8, 0, 0, 0, CLIPMASK0);
|
||||
|
||||
if (pSector != pActor->sector())
|
||||
{
|
||||
|
|
|
@ -612,7 +612,7 @@ void Gravity(DExhumedActor* pActor)
|
|||
|
||||
Collision MoveCreature(DExhumedActor* pActor)
|
||||
{
|
||||
return movesprite(pActor, pActor->int_xvel() << 8, pActor->spr.yvel << 8, pActor->int_zvel(), 15360, -5120, CLIPMASK0);
|
||||
return movesprite(pActor, pActor->int_xvel() << 8, pActor->int_yvel() << 8, pActor->int_zvel(), 15360, -5120, CLIPMASK0);
|
||||
}
|
||||
|
||||
Collision MoveCreatureWithCaution(DExhumedActor* pActor)
|
||||
|
@ -1352,7 +1352,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
|
|||
auto pSector = pActor->sector();
|
||||
pActor->spr.pal = pSector->ceilingpal;
|
||||
|
||||
auto nVal = movesprite(pActor, pActor->int_xvel() << 10, pActor->spr.yvel << 10, pActor->int_zvel(), 2560, -2560, CLIPMASK1);
|
||||
auto nVal = movesprite(pActor, pActor->int_xvel() << 10, pActor->int_yvel() << 10, pActor->int_zvel(), 2560, -2560, CLIPMASK1);
|
||||
|
||||
if (pActor->spr.pos.Z >= pSector->floorz)
|
||||
{
|
||||
|
|
|
@ -222,34 +222,34 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
|
||||
}
|
||||
|
||||
if (pActor->float_xvel() != 0 || pActor->spr.yvel)
|
||||
if (pActor->float_xvel() != 0 || pActor->float_yvel() != 0)
|
||||
{
|
||||
if (pActor->int_xvel() > 0)
|
||||
if (pActor->float_xvel() > 0)
|
||||
{
|
||||
pActor->add_int_xvel(-1024);
|
||||
if (pActor->int_xvel() < 0) {
|
||||
if (pActor->float_xvel() < 0) {
|
||||
pActor->clear_xvel();
|
||||
}
|
||||
}
|
||||
else if (pActor->int_xvel() < 0)
|
||||
else if (pActor->float_xvel() < 0)
|
||||
{
|
||||
pActor->add_int_xvel( 1024);
|
||||
if (pActor->int_xvel() > 0) {
|
||||
if (pActor->float_xvel() > 0) {
|
||||
pActor->clear_xvel();
|
||||
}
|
||||
}
|
||||
|
||||
if (pActor->spr.yvel > 0)
|
||||
if (pActor->float_yvel() > 0)
|
||||
{
|
||||
pActor->spr.yvel -= 1024;
|
||||
if (pActor->spr.yvel < 0) {
|
||||
pActor->add_int_yvel(-1024);
|
||||
if (pActor->float_yvel() < 0) {
|
||||
pActor->clear_yvel();
|
||||
}
|
||||
}
|
||||
else if (pActor->spr.yvel < 0)
|
||||
else if (pActor->float_yvel() < 0)
|
||||
{
|
||||
pActor->spr.yvel += 1024;
|
||||
if (pActor->spr.yvel > 0) {
|
||||
pActor->add_int_yvel(1024);
|
||||
if (pActor->float_yvel() > 0) {
|
||||
pActor->clear_yvel();
|
||||
}
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
if (nMov.exbits)
|
||||
{
|
||||
pActor->mul_int_xvel(0.5);
|
||||
pActor->spr.yvel >>= 1;
|
||||
pActor->mul_int_yvel(0.5);
|
||||
}
|
||||
|
||||
if (bVal)
|
||||
|
|
|
@ -1436,7 +1436,7 @@ void AISpark::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->add_int_zvel( 128);
|
||||
|
||||
auto nMov = movesprite(pActor, pActor->int_xvel() << 12, pActor->spr.yvel << 12, pActor->int_zvel(), 2560, -2560, CLIPMASK1);
|
||||
auto nMov = movesprite(pActor, pActor->int_xvel() << 12, pActor->int_yvel() << 12, pActor->int_zvel(), 2560, -2560, CLIPMASK1);
|
||||
if (!nMov.type && !nMov.exbits) {
|
||||
return;
|
||||
}
|
||||
|
@ -1888,7 +1888,7 @@ void AIObject::Tick(RunListEvent* ev)
|
|||
FUNCOBJECT_GOTO:
|
||||
if (nStat != kStatExplodeTarget)
|
||||
{
|
||||
auto nMov = movesprite(pActor, pActor->int_xvel() << 6, pActor->spr.yvel << 6, pActor->int_zvel(), 0, 0, CLIPMASK0);
|
||||
auto nMov = movesprite(pActor, pActor->int_xvel() << 6, pActor->int_yvel() << 6, pActor->int_zvel(), 0, 0, CLIPMASK0);
|
||||
|
||||
if (pActor->spr.statnum == kStatExplodeTrigger) {
|
||||
pActor->spr.pal = 1;
|
||||
|
|
|
@ -970,7 +970,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
if (zVel >= 6500)
|
||||
{
|
||||
pPlayerActor->mul_int_xvel(0.25);
|
||||
pPlayerActor->spr.yvel >>= 2;
|
||||
pPlayerActor->mul_int_yvel(0.25);
|
||||
|
||||
runlist_DamageEnemy(pPlayerActor, nullptr, ((zVel - 6500) >> 7) + 10);
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
else
|
||||
{
|
||||
pHitActor->add_int_xvel( (xVel >> 3));
|
||||
pHitActor->spr.yvel += (yVel >> 3);
|
||||
pHitActor->add_int_yvel((yVel >> 3));
|
||||
pHitActor->set_int_zvel(-2880);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1656,7 +1656,7 @@ int runlist_CheckRadialDamage(DExhumedActor* pActor)
|
|||
int nAngle = getangle(x, y);
|
||||
|
||||
pActor->add_int_xvel( (edi * bcos(nAngle)) >> 3);
|
||||
pActor->spr.yvel += (edi * bsin(nAngle)) >> 3;
|
||||
pActor->add_int_yvel((edi * bsin(nAngle)) >> 3);
|
||||
pActor->add_int_zvel(- edi * 24);
|
||||
|
||||
if (pActor->float_zvel() < -14) {
|
||||
|
|
|
@ -395,7 +395,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
if (pActor->nIndex2)
|
||||
{
|
||||
pActor->mul_int_xvel(2);
|
||||
pActor->spr.yvel *= 2;
|
||||
pActor->mul_int_yvel(2);
|
||||
}
|
||||
|
||||
if (nMov.type == kHitWall)
|
||||
|
@ -547,7 +547,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
case 9:
|
||||
{
|
||||
pActor->mul_int_xvel(0.5);
|
||||
pActor->spr.yvel >>= 1;
|
||||
pActor->mul_int_yvel(0.5);
|
||||
|
||||
if (bVal)
|
||||
{
|
||||
|
|
|
@ -275,7 +275,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
spp->clear_yvel();
|
||||
}
|
||||
|
||||
auto nMov = movesprite(spp, spp->int_xvel() << nVel, spp->spr.yvel << nVel, spp->int_zvel(), 1280, -1280, CLIPMASK0);
|
||||
auto nMov = movesprite(spp, spp->int_xvel() << nVel, spp->int_yvel() << nVel, spp->int_zvel(), 1280, -1280, CLIPMASK0);
|
||||
|
||||
if (nMov.type == kHitNone && nMov.exbits == 0)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue