- remaining wrappers in coolg.cpp and jweapon.cpp

This commit is contained in:
Christoph Oelckers 2022-09-05 20:13:48 +02:00
parent b81a465336
commit 64e906d8fc
2 changed files with 9 additions and 8 deletions

View file

@ -722,9 +722,9 @@ int InitCoolgCircle(DSWActor* actor)
DoActorSetSpeed(actor, FAST_SPEED); DoActorSetSpeed(actor, FAST_SPEED);
// set to really fast // set to really fast
actor->set_int_zvel(400); actor->vel.Z = 400 / 256.;
// angle adjuster // angle adjuster
actor->user.Counter2 = actor->int_xvel() / 3; actor->user.Counter2 = actor->vel.X * (16. / 3);
// random angle direction // random angle direction
if (RANDOM_P2(1024) < 512) if (RANDOM_P2(1024) < 512)
actor->user.Counter2 = -actor->user.Counter2; actor->user.Counter2 = -actor->user.Counter2;

View file

@ -1268,7 +1268,7 @@ int PlayerInitChemBomb(PLAYER* pp)
// don't throw it as far if crawling // don't throw it as far if crawling
if (pp->Flags & (PF_CRAWLING)) if (pp->Flags & (PF_CRAWLING))
{ {
actorNew->add_int_xvel(-(actorNew->int_xvel() >> 2)); actorNew->vel.X *= 0.75;
} }
// actorNew->user.RotNum = 5; // actorNew->user.RotNum = 5;
@ -1289,7 +1289,7 @@ int PlayerInitChemBomb(PLAYER* pp)
if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
actorNew->set_int_zvel(-pp->horizon.horiz.asq16() >> 9); actorNew->vel.Z -= pp->horizon.horiz.asbuildf() * HORIZ_MULTF;
oclipdist = plActor->spr.clipdist; oclipdist = plActor->spr.clipdist;
plActor->spr.clipdist = 0; plActor->spr.clipdist = 0;
@ -2171,7 +2171,8 @@ int DoFlag(DSWActor* actor)
int SpawnShell(DSWActor* actor, int ShellNum) int SpawnShell(DSWActor* actor, int ShellNum)
{ {
short id=0,velocity=0; short id = 0;
double velocity = 0;
STATE* p=nullptr; STATE* p=nullptr;
extern STATE s_UziShellShrap[]; extern STATE s_UziShellShrap[];
extern STATE s_ShotgunShellShrap[]; extern STATE s_ShotgunShellShrap[];
@ -2182,18 +2183,18 @@ int SpawnShell(DSWActor* actor, int ShellNum)
case -3: case -3:
id = UZI_SHELL; id = UZI_SHELL;
p = s_UziShellShrap; p = s_UziShellShrap;
velocity = 1500 + RandomRange(1000); velocity = 5.85 + RandomRangeF(3.9);
break; break;
case -4: case -4:
id = SHOT_SHELL; id = SHOT_SHELL;
p = s_ShotgunShellShrap; p = s_ShotgunShellShrap;
velocity = 2000 + RandomRange(1000); velocity = 7.8 + RandomRangeF(3.9);
break; break;
} }
auto actorNew = SpawnActor(STAT_SKIP4, id, p, actor->sector(), ActorVectOfMiddle(actor), actor->spr.angle, 64); auto actorNew = SpawnActor(STAT_SKIP4, id, p, actor->sector(), ActorVectOfMiddle(actor), actor->spr.angle, 64);
actorNew->set_int_zvel(-(velocity)); actorNew->vel.Z = -velocity;
if (actor->user.PlayerP) if (actor->user.PlayerP)
{ {