mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- floatified handle_se21
This commit is contained in:
parent
b0b5dbc55b
commit
a9c7a5e62f
1 changed files with 5 additions and 5 deletions
|
@ -4171,18 +4171,18 @@ void handle_se20(DDukeActor* actor)
|
|||
void handle_se21(DDukeActor* actor)
|
||||
{
|
||||
auto sc = actor->sector();
|
||||
int lp;
|
||||
double lp;
|
||||
|
||||
if (actor->temp_data[0] == 0) return;
|
||||
|
||||
if (actor->int_ang() == 1536)
|
||||
lp = sc->int_ceilingz();
|
||||
if (actor->spr.intangle == 1536)
|
||||
lp = sc->ceilingz;
|
||||
else
|
||||
lp = sc->int_floorz();
|
||||
lp = sc->floorz;
|
||||
|
||||
if (actor->temp_data[0] == 1) //Decide if the sector should go up or down
|
||||
{
|
||||
actor->set_int_zvel(Sgn(actor->int_pos().Z - lp) * (actor->spr.yint << 4));
|
||||
actor->vel.Z = (Sgn(actor->spr.pos.Z - lp) * (actor->spr.yint << 4) * zmaptoworld);
|
||||
actor->temp_data[0]++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue