- poolball stuff in Duke

This commit is contained in:
Christoph Oelckers 2022-09-11 19:09:53 +02:00
parent fe7dfa1c53
commit 2be133aaee

View file

@ -1040,9 +1040,9 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
case STRIPEBALL: case STRIPEBALL:
if (proj->spr.picnum == QUEBALL || proj->spr.picnum == STRIPEBALL) if (proj->spr.picnum == QUEBALL || proj->spr.picnum == STRIPEBALL)
{ {
proj->set_int_xvel((targ->int_xvel() >> 1) + (targ->int_xvel() >> 2)); proj->vel.X *= 0.75;
proj->add_int_ang(-((targ->int_ang() << 1) + 1024)); proj->spr.angle -= targ->spr.angle * 2 + DAngle180;
targ->set_int_ang(getangle(targ->int_pos().X - proj->int_pos().X, targ->int_pos().Y - proj->int_pos().Y) - 512); targ->spr.angle = VecToAngle(targ->spr.pos.XY() - proj->spr.pos.XY()) - DAngle90;
if (S_CheckSoundPlaying(POOLBALLHIT) < 2) if (S_CheckSoundPlaying(POOLBALLHIT) < 2)
S_PlayActorSound(POOLBALLHIT, targ); S_PlayActorSound(POOLBALLHIT, targ);
} }
@ -1050,7 +1050,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
{ {
if (krand() & 3) if (krand() & 3)
{ {
targ->set_int_xvel(164); targ->vel.X = 10.25;
targ->spr.angle = proj->spr.angle; targ->spr.angle = proj->spr.angle;
} }
else else