Skip to content

Commit

Permalink
- handle_se00 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Aug 10, 2022
1 parent 7d4c139 commit a5f1f28
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions source/games/duke/src/actors.cpp
Expand Up @@ -2605,15 +2605,15 @@ void handle_se00(DDukeActor* actor)

if (sect->floorz > actor->spr.pos.Z) //z's are touching
{
sect->add_int_floorz(-512);
sect->addfloorz(-2);
zchange = -512;
if (sect->floorz < actor->spr.pos.Z)
sect->floorz = actor->spr.pos.Z;
}

else if (sect->floorz < actor->spr.pos.Z) //z's are touching
{
sect->add_int_floorz(512);
sect->addfloorz(2);
zchange = 512;
if (sect->floorz > actor->spr.pos.Z)
sect->floorz = actor->spr.pos.Z;
Expand All @@ -2631,20 +2631,21 @@ void handle_se00(DDukeActor* actor)
}
else actor->tempang = 0;

if (sect->int_floorz() > actor->temp_data[3]) //z's are touching
double checkz = actor->temp_data[3] * inttoworld;
if (sect->floorz > checkz) //z's are touching
{
sect->add_int_floorz(-512);
sect->addfloorz(-2);
zchange = -512;
if (sect->int_floorz() < actor->temp_data[3])
sect->set_int_floorz(actor->temp_data[3]);
if (sect->floorz < checkz)
sect->setfloorz(checkz);
}

else if (sect->int_floorz() < actor->temp_data[3]) //z's are touching
else if (sect->floorz < checkz) //z's are touching
{
sect->add_int_floorz(512);
sect->addfloorz(2);
zchange = 512;
if (sect->int_floorz() > actor->temp_data[3])
sect->set_int_floorz(actor->temp_data[3]);
if (sect->floorz > checkz)
sect->setfloorz(checkz);
}
}

Expand Down

0 comments on commit a5f1f28

Please sign in to comment.