mirror of
https://github.com/DrBeef/Raze.git
synced 2025-03-29 12:20:39 +00:00
- handle all remaining trivial int_loz.
This commit is contained in:
parent
5e14361dd6
commit
0d24aeb3f5
3 changed files with 9 additions and 9 deletions
source/games/sw/src
|
@ -349,7 +349,7 @@ int DoActorSectorDamage(DSWActor* actor)
|
|||
}
|
||||
|
||||
// note that most squishing is done in vator.c
|
||||
if (actor->user.lo_sectp && actor->user.hi_sectp && abs(actor->user.int_loz() - actor->user.int_hiz()) < (int_ActorSizeZ(actor) >> 1))
|
||||
if (actor->user.lo_sectp && actor->user.hi_sectp && abs(actor->user.loz - actor->user.hiz) < (ActorSizeZ(actor) * 0.5))
|
||||
{
|
||||
actor->user.Health = 0;
|
||||
if (SpawnShrap(actor, nullptr, WPN_NM_SECTOR_SQUISH))
|
||||
|
@ -429,7 +429,7 @@ int DoActorDebris(DSWActor* actor)
|
|||
if (actor->sector()->hasU() && FixedToInt(actor->sector()->depth_fixed) > 10) // JBF: added null check
|
||||
{
|
||||
actor->user.WaitTics = (actor->user.WaitTics + (ACTORMOVETICS << 3)) & 1023;
|
||||
actor->set_int_z(actor->user.int_loz() - MulScale(Z(2), bsin(actor->user.WaitTics), 14));
|
||||
actor->spr.pos.Z = actor->user.loz - 2 * DAngle::fromBuild(actor->user.WaitTics).Sin();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -867,9 +867,9 @@ int DoFall(DSWActor* actor)
|
|||
actor->add_int_z(actor->user.jump_speed * ACTORMOVETICS);
|
||||
|
||||
// Stick like glue when you hit the ground
|
||||
if (actor->int_pos().Z > actor->user.int_loz() - actor->user.int_floor_dist())
|
||||
if (actor->spr.pos.Z > actor->user.loz - actor->user.floor_dist)
|
||||
{
|
||||
actor->set_int_z(actor->user.int_loz() - actor->user.int_floor_dist());
|
||||
actor->spr.pos.Z = actor->user.loz - actor->user.floor_dist;
|
||||
actor->user.Flags &= ~(SPR_FALLING);
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ int SetupSkull(DSWActor* actor)
|
|||
|
||||
actor->user.Radius = 400;
|
||||
|
||||
if (int_ActorZOfBottom(actor) > actor->user.int_loz() - Z(16))
|
||||
if (ActorZOfBottom(actor) > actor->user.loz - 16)
|
||||
{
|
||||
actor->spr.pos.Z = actor->user.loz + tileTopOffset(actor->spr.picnum);
|
||||
|
||||
|
@ -617,7 +617,7 @@ int SetupBetty(DSWActor* actor)
|
|||
|
||||
actor->user.Radius = 400;
|
||||
|
||||
if (int_ActorZOfBottom(actor) > actor->user.int_loz() - Z(16))
|
||||
if (ActorZOfBottom(actor) > actor->user.loz - 16)
|
||||
{
|
||||
actor->spr.pos.Z = actor->user.loz + tileTopOffset(actor->spr.picnum);
|
||||
|
||||
|
|
|
@ -14601,11 +14601,11 @@ int InitCoolgFire(DSWActor* actor)
|
|||
int DoCoolgDrip(DSWActor* actor)
|
||||
{
|
||||
actor->user.Counter += 220;
|
||||
actor->add_int_z(actor->user.Counter);
|
||||
actor->spr.pos.Z += actor->user.Counter * maptoworld;
|
||||
|
||||
if (actor->int_pos().Z > actor->user.int_loz() - actor->user.int_floor_dist())
|
||||
if (actor->spr.pos.Z > actor->user.loz - actor->user.floor_dist)
|
||||
{
|
||||
actor->set_int_z(actor->user.int_loz() - actor->user.int_floor_dist());
|
||||
actor->spr.pos.Z = actor->user.loz - actor->user.floor_dist;
|
||||
actor->spr.yrepeat = actor->spr.xrepeat = 32;
|
||||
ChangeState(actor, s_GoreFloorSplash);
|
||||
if (actor->user.spal == PALETTE_BLUE_LIGHTING)
|
||||
|
|
Loading…
Reference in a new issue