diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index bcd94836e..74b21310e 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -12781,7 +12781,7 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang return 0; } - QueueHole(hit.hitSector, hit.hitWall, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z); + QueueHole(hit.hitSector, hit.hitWall, hit.hitpos); } // hit a sprite? @@ -12935,7 +12935,7 @@ int InitShotgun(PLAYER* pp) continue; } - QueueHole(hit.hitSector, hit.hitWall, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z); + QueueHole(hit.hitSector, hit.hitWall, hit.hitpos); } // hit a sprite? @@ -15241,7 +15241,7 @@ int InitUzi(PLAYER* pp) return 0; } - QueueHole(hit.hitSector, hit.hitWall, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z); + QueueHole(hit.hitSector, hit.hitWall, hit.hitpos); } // hit a sprite? @@ -16096,7 +16096,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop) continue; } - QueueHole(hit.hitSector, hit.hitWall, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z); + QueueHole(hit.hitSector, hit.hitWall, hit.hitpos); } // hit a sprite? @@ -16229,7 +16229,7 @@ int InitEnemyUzi(DSWActor* actor) return 0; } - QueueHole(hit.hitSector, hit.hitWall, hit.int_hitpos().X, hit.int_hitpos().Y, hit.int_hitpos().Z); + QueueHole(hit.hitSector, hit.hitWall, hit.hitpos); } if (hit.actor() != nullptr) @@ -17380,7 +17380,7 @@ int QueueStar(DSWActor* actor) return 0; } -void QueueHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z) +void QueueHole(sectortype* hit_sect, walltype* hit_wall, const DVector3& pos) { short w,nw,wall_ang; DSWActor* spawnedActor; @@ -17403,7 +17403,7 @@ void QueueHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, i spawnedActor->spr.extra = 0; spawnedActor->spr.clipdist = 0; spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0; - spawnedActor->set_int_pos({ hit_x, hit_y, hit_z }); + spawnedActor->spr.pos = pos; spawnedActor->spr.picnum = 2151; ChangeActorSect(spawnedActor, hit_sect); diff --git a/source/games/sw/src/weapon.h b/source/games/sw/src/weapon.h index 631c6592b..2f79af662 100644 --- a/source/games/sw/src/weapon.h +++ b/source/games/sw/src/weapon.h @@ -84,7 +84,7 @@ void DoPlayerBeginRecoil(PLAYER* pp, short pix_amt); SECTOR_OBJECT* DetectSectorObject(sectortype*); SECTOR_OBJECT* DetectSectorObjectByWall(walltype*); void ScaleSpriteVector(DSWActor* actor, int scale); -void QueueHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z); +void QueueHole(sectortype* hit_sect, walltype* hit_wall, const DVector3& pos); DSWActor* QueueWallBlood(DSWActor* hit, short ang); bool SlopeBounce(DSWActor*, bool *hit_wall); int SpawnSwordSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang);