- simple replacements in player code

This commit is contained in:
Christoph Oelckers 2022-09-13 19:56:17 +02:00
parent f6d06b1326
commit 1c05d80e53
3 changed files with 11 additions and 11 deletions

View file

@ -1053,8 +1053,8 @@ void shootbloodsplat(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
auto spawned = spawn(actor, atwith);
if (spawned)
{
spawned->set_int_xvel(-12);
spawned->set_int_ang(getangle(-hit.hitWall->delta()) + 512); // note the '-' sign here!
spawned->vel.X = -0.75;
spawned->spr.angle = VecToAngle(-hit.hitWall->delta()) + DAngle90; // note the '-' sign here!
spawned->spr.pos = hit.hitpos;
spawned->spr.cstat |= randomXFlip();
ssp(spawned, CLIPMASK0);

View file

@ -512,8 +512,8 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
auto hole = spawn(spark, BULLETHOLE);
if (hole)
{
hole->set_int_xvel(-1);
hole->set_int_ang(getangle(-hit.hitWall->delta()) + 512);
hole->vel.X = -1 / 16.;
hole->spr.angle = VecToAngle(-hit.hitWall->delta()) + DAngle90;
ssp(hole, CLIPMASK0);
hole->spr.cstat2 |= CSTAT2_SPRITE_DECAL;
}
@ -647,11 +647,11 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
spawned->spr.shade = 0;
if (actor->spr.picnum == BOSS2)
{
l = spawned->int_xvel();
spawned->set_int_xvel(1024);
auto ovel = spawned->vel.X;
spawned->vel.X = 64;
ssp(spawned, CLIPMASK0);
spawned->set_int_xvel(l);
spawned->add_int_ang(128 - (krand() & 255));
spawned->vel.X = ovel;
spawned->spr.angle += DAngle22_5 - randomAngle(45);
}
}
@ -885,7 +885,7 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
ud.bomb_tag = (ud.bomb_tag + 1) & 32767;
bomb->spr.hitag = ud.bomb_tag;
S_PlayActorSound(LASERTRIP_ONWALL, bomb);
bomb->set_int_xvel(-20);
bomb->vel.X = -1.25;
ssp(bomb, CLIPMASK0);
bomb->spr.cstat = CSTAT_SPRITE_ALIGNMENT_WALL;
auto delta = hit.hitWall->delta();
@ -1064,7 +1064,7 @@ void shoot_d(DDukeActor* actor, int atwith)
k->setsector(sect);
k->spr.pos = spos;
k->spr.angle = sang;
k->set_int_xvel(500);
k->vel.X = 500 / 16.;
k->vel.Z = 0;
}
return;

View file

@ -902,7 +902,7 @@ void shoot_r(DDukeActor* actor, int atwith)
auto j = spawn(actor, atwith);
if (j)
{
j->set_int_xvel(250);
j->vel.X = 250 / 16.;
j->spr.angle = actor->spr.angle;
j->spr.pos.Z -= 15;
}