mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-01 13:30:50 +00:00
- use temp_angle for TRIPBOMB’s saved angle
This commit is contained in:
parent
a1b2f7d555
commit
0c757ff96a
4 changed files with 13 additions and 10 deletions
|
@ -869,10 +869,11 @@ static void movetripbomb(DDukeActor *actor)
|
|||
if (actor->temp_data[0] == 32)
|
||||
{
|
||||
int16_t l = actor->int_ang();
|
||||
actor->set_int_ang(actor->temp_data[5]);
|
||||
actor->spr.angle = actor->temp_angle;
|
||||
|
||||
actor->temp_data[3] = actor->int_pos().X; actor->temp_data[4] = actor->int_pos().Y;
|
||||
actor->add_int_pos({ bcos(actor->temp_data[5], -9), bsin(actor->temp_data[5], -9), -(3 << 8) });
|
||||
actor->spr.pos += actor->temp_angle.ToVector(2);
|
||||
actor->spr.pos.Z -= 3;
|
||||
|
||||
// Laser fix from EDuke32.
|
||||
auto const oldSect = actor->sector();
|
||||
|
@ -907,7 +908,7 @@ static void movetripbomb(DDukeActor *actor)
|
|||
}
|
||||
x -= 1024;
|
||||
|
||||
actor->add_int_pos({ bcos(actor->temp_data[5], -4), bsin(actor->temp_data[5], -4), 0 });
|
||||
actor->spr.pos += actor->temp_angle.ToVector(64);
|
||||
updatesectorneighbor(actor->spr.pos, &curSect, 128);
|
||||
|
||||
if (curSect == nullptr)
|
||||
|
@ -923,7 +924,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.Z += 3;
|
||||
actor->spr.pos.Z += 3;//
|
||||
ChangeActorSect(actor, oldSect);
|
||||
actor->temp_data[3] = 0;
|
||||
if (hit && lTripBombControl & TRIPBOMB_TRIPWIRE)
|
||||
|
@ -940,7 +941,8 @@ static void movetripbomb(DDukeActor *actor)
|
|||
|
||||
actor->temp_data[3] = actor->int_pos().X;
|
||||
actor->temp_data[4] = actor->int_pos().Y;
|
||||
actor->add_int_pos({ bcos(actor->temp_data[5], -9), bsin(actor->temp_data[5], -9), -(3 << 8) });
|
||||
actor->spr.pos += actor->temp_angle.ToVector(2);
|
||||
actor->spr.pos.Z -= 3;
|
||||
SetActor(actor, actor->spr.pos);
|
||||
|
||||
x = hitasprite(actor, nullptr);
|
||||
|
|
|
@ -887,9 +887,9 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
bomb->spr.xvel = -20;
|
||||
ssp(bomb, CLIPMASK0);
|
||||
bomb->spr.cstat = CSTAT_SPRITE_ALIGNMENT_WALL;
|
||||
auto delta = hit.hitWall->delta();
|
||||
bomb->set_int_ang(getangle(-delta.X, -delta.Y) - 512);
|
||||
bomb->temp_data[5] = bomb->int_ang();
|
||||
auto delta = hit.hitWall->fdelta();
|
||||
bomb->spr.angle = VecToAngle(-delta.X, -delta.Y) - DAngle90;
|
||||
bomb->temp_angle = bomb->spr.angle;
|
||||
|
||||
if (p >= 0)
|
||||
ps[p].ammo_amount[TRIPBOMB_WEAPON]--;
|
||||
|
|
|
@ -160,6 +160,7 @@ bool initspriteforspawn(DDukeActor* act)
|
|||
|
||||
act->temp_data[0] = act->temp_data[1] = act->temp_data[2] = act->temp_data[3] = act->temp_data[4] = act->temp_data[5] = 0;
|
||||
act->temp_actor = nullptr;
|
||||
act->temp_angle = nullAngle;
|
||||
|
||||
if (wallswitchcheck(act) && (act->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL))
|
||||
{
|
||||
|
|
|
@ -243,7 +243,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->spr.yrepeat = 0;
|
||||
}
|
||||
|
||||
if (actj) act->set_int_ang(actj->temp_data[5] + 512);
|
||||
if (actj) act->spr.angle = actj->temp_angle + DAngle90;
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
break;
|
||||
|
||||
|
@ -340,7 +340,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
ssp(act, CLIPMASK0);
|
||||
act->temp_data[0] = 17;
|
||||
act->temp_data[2] = 0;
|
||||
act->temp_data[5] = act->int_ang();
|
||||
act->temp_angle = act->spr.angle;
|
||||
[[fallthrough]];
|
||||
|
||||
case SPACEMARINE:
|
||||
|
|
Loading…
Reference in a new issue