mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-25 13:31:55 +00:00
- Blood: Ensure actor's XY pos is updated before calling Z slope utils.
* Originates from efc832ca5c
.
* Fixes #833.
This commit is contained in:
parent
f69bfe4959
commit
1438bb5e80
1 changed files with 4 additions and 2 deletions
|
@ -211,12 +211,13 @@ int CheckLink(DBloodActor* actor)
|
|||
assert(aLower);
|
||||
assert(aLower->insector());
|
||||
ChangeActorSect(actor, aLower->sector());
|
||||
actor->spr.pos.XY() += aLower->spr.pos.XY() - aUpper->spr.pos.XY();
|
||||
double z2;
|
||||
if (aLower->spr.type == kMarkerLowLink)
|
||||
z2 = aLower->spr.pos.Z;
|
||||
else
|
||||
z2 = getceilzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
actor->spr.pos += DVector3(aLower->spr.pos.XY() - aUpper->spr.pos.XY(), z2 - z);
|
||||
actor->spr.pos.Z += z2 - z;
|
||||
actor->interpolated = false;
|
||||
return aUpper->spr.type;
|
||||
}
|
||||
|
@ -234,12 +235,13 @@ int CheckLink(DBloodActor* actor)
|
|||
assert(aUpper);
|
||||
assert(aUpper->insector());
|
||||
ChangeActorSect(actor, aUpper->sector());
|
||||
actor->spr.pos.XY() += aUpper->spr.pos.XY() - aLower->spr.pos.XY();
|
||||
double z2;
|
||||
if (aUpper->spr.type == kMarkerUpLink)
|
||||
z2 = aUpper->spr.pos.Z;
|
||||
else
|
||||
z2 = getflorzofslopeptr(actor->sector(), actor->spr.pos);
|
||||
actor->spr.pos += DVector3(aUpper->spr.pos.XY() - aLower->spr.pos.XY(), z2 - z);
|
||||
actor->spr.pos.Z += z2 - z;
|
||||
actor->interpolated = false;
|
||||
return aLower->spr.type;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue