From 6c98a07a60addf2b552c147e21128818038def48 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 26 Sep 2022 22:51:36 +0200 Subject: [PATCH] - elininated the actSpawnThing wrapper. --- source/games/blood/src/actor.h | 5 ----- source/games/blood/src/gib.cpp | 2 +- source/games/blood/src/triggers.cpp | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/source/games/blood/src/actor.h b/source/games/blood/src/actor.h index 2c286af98..be2d9a9c5 100644 --- a/source/games/blood/src/actor.h +++ b/source/games/blood/src/actor.h @@ -236,11 +236,6 @@ DBloodActor* actSpawnDude(DBloodActor* pSource, int nType, double dist); DBloodActor * actSpawnSprite(DBloodActor *pSource, int nStat); DBloodActor* actSpawnThing(sectortype* pSector, const DVector3& pos, int nThingType); -inline DBloodActor* actSpawnThing(sectortype* pSector, int x, int y, int z, int nThingType) -{ - return actSpawnThing(pSector, DVector3(x * inttoworld, y * inttoworld, z * zinttoworld), nThingType); -} - inline DBloodActor* actFireThing(DBloodActor* actor, double xyoff, double zoff, double zvel, int thingType, double nSpeed); inline DBloodActor* actFireThing(DBloodActor* actor, int xyoff_, int zoff_, int zvel_, int thingType, int nSpeed_) { diff --git a/source/games/blood/src/gib.cpp b/source/games/blood/src/gib.cpp index 923e63fbb..4857b7688 100644 --- a/source/games/blood/src/gib.cpp +++ b/source/games/blood/src/gib.cpp @@ -366,7 +366,7 @@ void GibThing(DBloodActor* actor, GIBTHING* pGThing, DVector3* pPos, DVector3* p getzsofslopeptr(pSector, gPos, &ceilZ, &floorZ); double dz1 = floorZ - gPos.Z; double dz2 = gPos.Z - ceilZ; - auto gibactor = actSpawnThing(pSector, gPos.X * worldtoint, gPos.Y * worldtoint, gPos.Z * zworldtoint, pGThing->type); + auto gibactor = actSpawnThing(pSector, gPos, pGThing->type); if (!gibactor) return; if (pGThing->Kills > -1) diff --git a/source/games/blood/src/triggers.cpp b/source/games/blood/src/triggers.cpp index 33be31d19..e86a0f413 100644 --- a/source/games/blood/src/triggers.cpp +++ b/source/games/blood/src/triggers.cpp @@ -2498,9 +2498,9 @@ void ActivateGenerator(DBloodActor* actor) switch (actor->spr.type) { case kGenDripWater: case kGenDripBlood: { - int top, bottom; + double top, bottom; GetActorExtents(actor, &top, &bottom); - actSpawnThing(actor->sector(), actor->int_pos().X, actor->int_pos().Y, bottom, (actor->spr.type == kGenDripWater) ? kThingDripWater : kThingDripBlood); + actSpawnThing(actor->sector(), DVector3(actor->spr.pos.XY(), bottom), (actor->spr.type == kGenDripWater) ? kThingDripWater : kThingDripBlood); break; } case kGenSound: