- use temp_pos for TRIPBOMB and SE26

This commit is contained in:
Christoph Oelckers 2022-08-29 23:13:54 +02:00
parent bdeb056727
commit 5f93ba9053
5 changed files with 9 additions and 11 deletions

View file

@ -4248,7 +4248,7 @@ void handle_se26(DDukeActor* actor)
actor->spr.shade++;
if (actor->spr.shade > 7)
{
actor->set_int_xy( actor->temp_data[3], actor->temp_data[4]);
actor->spr.pos.XY() = actor->temp_pos.XY();
sc->addfloorz(-((zvel * actor->spr.shade) - zvel));
actor->spr.shade = 0;
}

View file

@ -871,7 +871,7 @@ static void movetripbomb(DDukeActor *actor)
int16_t l = actor->int_ang();
actor->spr.angle = actor->temp_angle;
actor->temp_data[3] = actor->int_pos().X; actor->temp_data[4] = actor->int_pos().Y;
actor->temp_pos.XY() = actor->spr.pos.XY();
actor->spr.pos += actor->temp_angle.ToVector() * 2;
actor->spr.pos.Z -= 3;
@ -923,7 +923,7 @@ static void movetripbomb(DDukeActor *actor)
}
actor->temp_data[0]++;
actor->set_int_xy(actor->temp_data[3], actor->temp_data[4]);
actor->spr.pos.XY() = actor->temp_pos.XY();
actor->spr.pos.Z += 3;//
ChangeActorSect(actor, oldSect);
actor->temp_data[3] = 0;
@ -939,15 +939,14 @@ static void movetripbomb(DDukeActor *actor)
actor->temp_data[1]++;
actor->temp_data[3] = actor->int_pos().X;
actor->temp_data[4] = actor->int_pos().Y;
actor->temp_pos.XY() = actor->spr.pos.XY();
actor->spr.pos += actor->temp_angle.ToVector() * 2;
actor->spr.pos.Z -= 3;
SetActor(actor, actor->spr.pos);
x = hitasprite(actor, nullptr);
actor->set_int_xy(actor->temp_data[3], actor->temp_data[4]);
actor->spr.pos.XY() = actor->temp_pos.XY();
actor->spr.pos.Z += 3;
SetActor(actor, actor->spr.pos);

View file

@ -867,7 +867,7 @@ void checkhitwall_d(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
DukeStatIterator it(STAT_EFFECTOR);
while (auto effector = it.Next())
{
if (effector->spr.hitag == wal->lotag && effector->spr.lotag == 3)
if (effector->spr.hitag == wal->lotag && effector->spr.lotag == SE_3_RANDOM_LIGHTS_AFTER_SHOT_OUT)
{
effector->temp_data[2] = j;
effector->temp_data[3] = darkestwall;

View file

@ -1353,7 +1353,7 @@ void checkhitwall_r(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
DukeStatIterator it(STAT_EFFECTOR);
while (auto act = it.Next())
{
if (act->spr.hitag == wal->lotag && act->spr.lotag == 3)
if (act->spr.hitag == wal->lotag && act->spr.lotag == SE_3_RANDOM_LIGHTS_AFTER_SHOT_OUT)
{
act->temp_data[2] = j;
act->temp_data[3] = darkestwall;

View file

@ -917,7 +917,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
{
if (actor->spr.lotag == 0)
{
if (sectp->lotag == 30)
if (sectp->lotag == SE_30_TWO_WAY_TRAIN)
{
if (actor->spr.pal) actor->spr.clipdist = 1;
else actor->spr.clipdist = 0;
@ -1003,8 +1003,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
else if (actor->spr.lotag == SE_26)
{
actor->temp_data[3] = actor->int_pos().X;
actor->temp_data[4] = actor->int_pos().Y;
actor->temp_pos.XY() = actor->spr.pos.XY();
if (actor->spr.shade == sectp->floorshade) //UP
actor->spr.zvel = -256;
else