diff --git a/source/games/sw/src/misc.h b/source/games/sw/src/misc.h index 8ae2928bb..01a056aa2 100644 --- a/source/games/sw/src/misc.h +++ b/source/games/sw/src/misc.h @@ -101,7 +101,7 @@ void QuakeViewChange(PLAYERp pp, int* z_diff, int* x_diff, int* y_diff, short* a void DoQuake(PLAYERp pp); bool SetQuake(PLAYERp pp, short tics, short amt); int SetExpQuake(DSWActor*); -int SetGunQuake(int16_t SpriteNum); +int SetGunQuake(DSWActor*); int SetPlayerQuake(PLAYERp mpp); int SetNuclearQuake(DSWActor*); int SetSumoQuake(DSWActor*); diff --git a/source/games/sw/src/quake.cpp b/source/games/sw/src/quake.cpp index d6ec9d8a7..3b856e077 100644 --- a/source/games/sw/src/quake.cpp +++ b/source/games/sw/src/quake.cpp @@ -278,9 +278,9 @@ SetExpQuake(DSWActor* actor) } int -SetGunQuake(int16_t SpriteNum) +SetGunQuake(DSWActor* actor) { - SPRITEp sp = &sprite[SpriteNum]; + SPRITEp sp = &actor->s(); SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 40, 8, 40000); diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 12b85532b..33fa8a6c1 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -16881,7 +16881,7 @@ int InitSobjGun(PLAYERp pp) case 0: SpawnVis(actor, -1, -1, -1, -1, 8); SpawnBigGunFlames(actor, pp->Actor(), pp->sop, false); - SetGunQuake(actor->GetSpriteIndex()); + SetGunQuake(actor); InitTankShell(actor, pp); if (!SP_TAG5(sp)) pp->FirePause = 80;