mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- RR's movement and underwater completed.
This commit is contained in:
parent
8060813ea8
commit
4e9ab67c35
2 changed files with 8 additions and 12 deletions
|
@ -3729,7 +3729,7 @@ void handle_se15(DDukeActor* actor)
|
|||
actor->temp_data[3]--;
|
||||
}
|
||||
|
||||
movesector(actor, actor->temp_data[1], DAngle::fromBuild(actor->temp_data[2]));
|
||||
movesector(actor, actor->temp_data[1], nullAngle);
|
||||
//SetActor(actor, actor->spr.pos);
|
||||
}
|
||||
}
|
||||
|
@ -4264,7 +4264,7 @@ void handle_se26(DDukeActor* actor)
|
|||
ps[p].pos.Z += zvel;
|
||||
}
|
||||
|
||||
movesector(actor, actor->temp_data[1], DAngle::fromBuild(actor->temp_data[2]));
|
||||
movesector(actor, actor->temp_data[1], nullAngle);
|
||||
//SetActor(actor, actor->spr.pos);
|
||||
}
|
||||
|
||||
|
|
|
@ -2067,12 +2067,10 @@ static void onBoat(int snum, ESyncBits &actions)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void movement(int snum, ESyncBits actions, sectortype* psect, int fz_, int cz_, int shrunk, double truefdist, int psectlotag)
|
||||
static void movement(int snum, ESyncBits actions, sectortype* psect, double floorz, double ceilingz, int shrunk, double truefdist, int psectlotag)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
auto pact = p->GetActor();
|
||||
double floorz = fz_ * zinttoworld;
|
||||
double ceilingz = cz_ * zinttoworld;
|
||||
|
||||
if (p->airleft != 15 * 26)
|
||||
p->airleft = 15 * 26; //Aprox twenty seconds.
|
||||
|
@ -2249,7 +2247,7 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, int fz_, in
|
|||
|
||||
else if ((actions & SB_JUMP) && !p->OnMotorcycle && p->jumping_toggle == 0)
|
||||
{
|
||||
playerJump(snum, fz_, cz_);
|
||||
playerJump(snum, floorz* zworldtoint, ceilingz* zworldtoint);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2297,12 +2295,10 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, int fz_, in
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void underwater(int snum, ESyncBits actions, int fz_, int cz_)
|
||||
static void underwater(int snum, ESyncBits actions, double floorz, double ceilingz)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
auto pact = p->GetActor();
|
||||
double floorz = fz_ * zinttoworld;
|
||||
double ceilingz = cz_ * zinttoworld;
|
||||
|
||||
p->jumping_counter = 0;
|
||||
|
||||
|
@ -2360,7 +2356,7 @@ static void underwater(int snum, ESyncBits actions, int fz_, int cz_)
|
|||
auto j = spawn(pact, WATERBUBBLE);
|
||||
if (j)
|
||||
{
|
||||
j->add_int_pos({ bcos(p->angle.ang.Buildang() + 64 - (global_random & 128) + 128, -6), bsin(p->angle.ang.Buildang() + 64 - (global_random & 128) + 128, -6), 0 });
|
||||
j->spr.pos += (p->angle.ang.ToVector() + DVector2(12 - (global_random & 8), 12 - (global_random & 8))) * 16;
|
||||
j->spr.xrepeat = 3;
|
||||
j->spr.yrepeat = 2;
|
||||
j->spr.pos.Z = p->pos.Z + 8;
|
||||
|
@ -3606,11 +3602,11 @@ void processinput_r(int snum)
|
|||
|
||||
if (psectlotag == ST_2_UNDERWATER)
|
||||
{
|
||||
underwater(snum, actions, floorz * worldtoint, ceilingz * worldtoint);
|
||||
underwater(snum, actions, floorz, ceilingz);
|
||||
}
|
||||
else
|
||||
{
|
||||
movement(snum, actions, psectp, floorz * worldtoint, ceilingz * worldtoint, shrunk, truefdist, psectlotag);
|
||||
movement(snum, actions, psectp, floorz, ceilingz, shrunk, truefdist, psectlotag);
|
||||
}
|
||||
|
||||
p->psectlotag = psectlotag;
|
||||
|
|
Loading…
Reference in a new issue