mirror of
https://github.com/DrBeef/Raze.git
synced 2025-04-01 21:50:51 +00:00
- floatified user.z_tgt.
This commit is contained in:
parent
65d1e5cac9
commit
425f4055b4
4 changed files with 26 additions and 26 deletions
|
@ -966,6 +966,8 @@ struct USER
|
|||
TObjPtr<DSWActor*> WpnGoalActor;
|
||||
|
||||
double oz; // serialized copy of sprite.oz
|
||||
double z_tgt;
|
||||
|
||||
int Flags;
|
||||
int Flags2;
|
||||
int Tics;
|
||||
|
@ -1007,8 +1009,6 @@ struct USER
|
|||
// precalculated vectors
|
||||
vec3_t change;
|
||||
|
||||
int z_tgt;
|
||||
|
||||
// velocity
|
||||
int vel_tgt;
|
||||
int16_t vel_rate;
|
||||
|
|
|
@ -52,16 +52,16 @@ void ReverseSpike(DSWActor* actor)
|
|||
if (actor->user.int_z_tgt() == actor->user.int_oz())
|
||||
{
|
||||
if (actor->spr.pos.Z == actor->user.oz)
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
else if (actor->user.pos.Z == actor->user.int_oz())
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
}
|
||||
else if (actor->user.int_z_tgt() == actor->user.pos.Z)
|
||||
{
|
||||
if (actor->spr.pos.Z == actor->user.oz)
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
else if (actor->user.pos.Z == actor->user.int_oz())
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
}
|
||||
|
||||
actor->user.vel_rate = -actor->user.vel_rate;
|
||||
|
@ -285,7 +285,7 @@ int DoSpike(DSWActor* actor)
|
|||
if (actor->user.int_z_tgt() == actor->int_pos().Z)
|
||||
{
|
||||
// change target
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
actor->user.vel_rate = -actor->user.vel_rate;
|
||||
|
||||
SetSpikeInactive(actor);
|
||||
|
@ -302,7 +302,7 @@ int DoSpike(DSWActor* actor)
|
|||
// change target
|
||||
actor->user.jump_speed = actor->user.vel_tgt;
|
||||
actor->user.vel_rate = (short)abs(actor->user.vel_rate);
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
|
||||
SetSpikeInactive(actor);
|
||||
|
||||
|
@ -390,7 +390,7 @@ int DoSpikeAuto(DSWActor* actor)
|
|||
if (actor->user.int_z_tgt() == actor->int_pos().Z)
|
||||
{
|
||||
// change target
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
actor->user.vel_rate = -actor->user.vel_rate;
|
||||
actor->user.Tics = actor->user.WaitTics;
|
||||
|
||||
|
@ -404,7 +404,7 @@ int DoSpikeAuto(DSWActor* actor)
|
|||
// change target
|
||||
actor->user.jump_speed = actor->user.vel_tgt;
|
||||
actor->user.vel_rate = (short)abs(actor->user.vel_rate);
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
actor->user.Tics = actor->user.WaitTics;
|
||||
|
||||
if (SP_TAG6(actor) && TEST_BOOL5(actor))
|
||||
|
|
|
@ -2043,7 +2043,7 @@ void SpriteSetup(void)
|
|||
{
|
||||
// start off
|
||||
actor->user.pos.Z = sectp->int_floorz();
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
if (start_on)
|
||||
{
|
||||
int amt;
|
||||
|
@ -2051,7 +2051,7 @@ void SpriteSetup(void)
|
|||
|
||||
// start in the on position
|
||||
sectp->add_int_floorz(amt);
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
|
||||
MoveSpritesWithSector(actor->sector(), amt, false); // floor
|
||||
}
|
||||
|
@ -2064,7 +2064,7 @@ void SpriteSetup(void)
|
|||
{
|
||||
// start off
|
||||
actor->user.pos.Z = sectp->int_ceilingz();
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
if (start_on)
|
||||
{
|
||||
int amt;
|
||||
|
@ -2072,7 +2072,7 @@ void SpriteSetup(void)
|
|||
|
||||
// starting in the on position
|
||||
sectp->add_int_ceilingz(amt);
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
|
||||
MoveSpritesWithSector(actor->sector(), amt, true); // ceiling
|
||||
}
|
||||
|
@ -2251,12 +2251,12 @@ void SpriteSetup(void)
|
|||
|
||||
// start off
|
||||
actor->user.pos.Z = actor->user.zclip;
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
if (start_on)
|
||||
{
|
||||
// start in the on position
|
||||
actor->user.zclip = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
SpikeAlign(actor);
|
||||
}
|
||||
|
||||
|
@ -2270,12 +2270,12 @@ void SpriteSetup(void)
|
|||
|
||||
// start off
|
||||
actor->user.pos.Z = actor->user.zclip;
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
if (start_on)
|
||||
{
|
||||
// starting in the on position
|
||||
actor->user.zclip = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
SpikeAlign(actor);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,16 +57,16 @@ void ReverseVator(DSWActor* actor)
|
|||
if (actor->user.int_z_tgt() == actor->user.int_oz())
|
||||
{
|
||||
if (actor->spr.pos.Z == actor->user.oz)
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
else if (actor->user.pos.Z == actor->user.int_oz())
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
}
|
||||
else if (actor->user.int_z_tgt() == actor->user.pos.Z)
|
||||
{
|
||||
if (actor->spr.pos.Z == actor->user.oz)
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
else if (actor->user.pos.Z == actor->user.int_oz())
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
}
|
||||
|
||||
actor->user.vel_rate = -actor->user.vel_rate;
|
||||
|
@ -395,7 +395,7 @@ int DoVator(DSWActor* actor)
|
|||
if (actor->user.int_z_tgt() == actor->int_pos().Z)
|
||||
{
|
||||
// change target
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
actor->user.vel_rate = -actor->user.vel_rate;
|
||||
|
||||
SetVatorInactive(actor);
|
||||
|
@ -413,7 +413,7 @@ int DoVator(DSWActor* actor)
|
|||
// change target
|
||||
actor->user.jump_speed = actor->user.vel_tgt;
|
||||
actor->user.vel_rate = short(abs(actor->user.vel_rate));
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
|
||||
RESET_BOOL8(actor);
|
||||
SetVatorInactive(actor);
|
||||
|
@ -548,7 +548,7 @@ int DoVatorAuto(DSWActor* actor)
|
|||
if (actor->user.int_z_tgt() == actor->int_pos().Z)
|
||||
{
|
||||
// change target
|
||||
actor->user.z_tgt = actor->user.pos.Z;
|
||||
actor->user.z_tgt = actor->user.pos.Z * zinttoworld;
|
||||
actor->user.vel_rate = -actor->user.vel_rate;
|
||||
actor->user.Tics = actor->user.WaitTics;
|
||||
|
||||
|
@ -562,7 +562,7 @@ int DoVatorAuto(DSWActor* actor)
|
|||
// change target
|
||||
actor->user.jump_speed = actor->user.vel_tgt;
|
||||
actor->user.vel_rate = short(abs(actor->user.vel_rate));
|
||||
actor->user.z_tgt = actor->int_pos().Z;
|
||||
actor->user.z_tgt = actor->spr.pos.Z;
|
||||
actor->user.Tics = actor->user.WaitTics;
|
||||
|
||||
if (SP_TAG6(actor) && TEST_BOOL5(actor))
|
||||
|
|
Loading…
Reference in a new issue