- floatified and consolidated handle_se29.

This commit is contained in:
Christoph Oelckers 2022-09-11 23:51:48 +02:00
parent 9a07dc5b7b
commit 03a0eb7284
4 changed files with 18 additions and 10 deletions

View file

@ -4617,6 +4617,20 @@ void handle_se130(DDukeActor *actor, int countmax, int EXPLOSION2)
//
//---------------------------------------------------------------------------
void handle_se29(DDukeActor* actor)
{
auto sc = actor->sector();
actor->spr.hitag += 64;
double val = actor->spr.yint * BobVal(actor->spr.hitag) / 64.;
sc->setfloorz(actor->spr.pos.Z + val);
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
void handle_se31(DDukeActor* actor, bool choosedir)
{
auto sec = actor->sector();

View file

@ -3292,8 +3292,6 @@ static void handle_se28(DDukeActor* actor)
void moveeffectors_d(void) //STATNUM 3
{
int l;
clearfriction();
DukeStatIterator it(STAT_EFFECTOR);
@ -3423,10 +3421,9 @@ void moveeffectors_d(void) //STATNUM 3
break;
case SE_29_WAVES:
act->spr.hitag += 64;
l = MulScale(act->spr.yint, bsin(act->spr.hitag), 12);
sc->set_int_floorz(act->int_pos().Z + l);
handle_se29(act);
break;
case SE_31_FLOOR_RISE_FALL: // True Drop Floor
handle_se31(act, true);
break;

View file

@ -3243,8 +3243,6 @@ void handle_se06_r(DDukeActor *actor)
void moveeffectors_r(void) //STATNUM 3
{
int l;
clearfriction();
DukeStatIterator it(STAT_EFFECTOR);
@ -3384,9 +3382,7 @@ void moveeffectors_r(void) //STATNUM 3
break;
case SE_29_WAVES:
act->spr.hitag += 64;
l = MulScale(act->spr.yint, bsin(act->spr.hitag), 12);
sc->set_int_floorz(act->int_pos().Z + l);
handle_se29(act);
break;
case SE_31_FLOOR_RISE_FALL: // True Drop Floor

View file

@ -89,6 +89,7 @@ void handle_se24(DDukeActor* actor, bool scroll, int shift);
void handle_se25(DDukeActor* a, int t_index, int snd1, int snd2);
void handle_se26(DDukeActor* i);
void handle_se27(DDukeActor* i);
void handle_se29(DDukeActor* actor);
void handle_se31(DDukeActor* a, bool choosedir);
void handle_se32(DDukeActor* i);
void handle_se35(DDukeActor* i, int SMALLSMOKE, int EXPLOSION2);