mirror of
https://github.com/DrBeef/Raze.git
synced 2025-04-08 00:31:04 +00:00
- actSpawnThing
This commit is contained in:
parent
443cfc991c
commit
331a7654bf
4 changed files with 8 additions and 8 deletions
|
@ -6443,10 +6443,10 @@ DBloodActor* actSpawnDude(DBloodActor* source, int nType, int a3, int a4)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DBloodActor* actSpawnThing(int nSector, int x, int y, int z, int nThingType)
|
||||
DBloodActor* actSpawnThing(sectortype* pSector, int x, int y, int z, int nThingType)
|
||||
{
|
||||
assert(nThingType >= kThingBase && nThingType < kThingMax);
|
||||
auto actor = actSpawnSprite(§or[nSector], x, y, z, 4, 1);
|
||||
auto actor = actSpawnSprite(pSector, x, y, z, 4, 1);
|
||||
spritetype* pSprite = &actor->s();
|
||||
int nType = nThingType - kThingBase;
|
||||
pSprite->type = nThingType;
|
||||
|
@ -6551,7 +6551,7 @@ DBloodActor* actFireThing(DBloodActor* actor, int a2, int a3, int a4, int thingT
|
|||
x = gHitInfo.hitx - MulScale(pSprite->clipdist << 1, Cos(pSprite->ang), 28);
|
||||
y = gHitInfo.hity - MulScale(pSprite->clipdist << 1, Sin(pSprite->ang), 28);
|
||||
}
|
||||
auto fired = actSpawnThing(pSprite->sectnum, x, y, z, thingType);
|
||||
auto fired = actSpawnThing(pSprite->sector(), x, y, z, thingType);
|
||||
spritetype* pThing = &fired->s();
|
||||
fired->SetOwner(actor);
|
||||
pThing->ang = pSprite->ang;
|
||||
|
|
|
@ -227,7 +227,7 @@ void actProcessSprites(void);
|
|||
DBloodActor* actSpawnSprite(sectortype* pSector, int x, int y, int z, int nStat, bool a6);
|
||||
DBloodActor* actSpawnDude(DBloodActor* pSource, int nType, int a3, int a4);
|
||||
DBloodActor * actSpawnSprite(DBloodActor *pSource, int nStat);
|
||||
DBloodActor * actSpawnThing(int nSector, int x, int y, int z, int nThingType);
|
||||
DBloodActor * actSpawnThing(sectortype* pSector, int x, int y, int z, int nThingType);
|
||||
DBloodActor* actFireThing(DBloodActor* pSprite, int a2, int a3, int a4, int thingType, int a6);
|
||||
DBloodActor* actFireMissile(DBloodActor *pSprite, int a2, int a3, int a4, int a5, int a6, int nType);
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@ void GibThing(DBloodActor* actor, GIBTHING *pGThing, CGibPosition *pPos, CGibVel
|
|||
|
||||
if (pGThing->chance == 65536 || Chance(pGThing->chance))
|
||||
{
|
||||
int nSector = pSprite->sectnum;
|
||||
auto pSector = pSprite->sector();
|
||||
int top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
int x, y, z;
|
||||
|
@ -361,10 +361,10 @@ void GibThing(DBloodActor* actor, GIBTHING *pGThing, CGibPosition *pPos, CGibVel
|
|||
z = pPos->z;
|
||||
}
|
||||
int32_t ceilZ, floorZ;
|
||||
getzsofslope(nSector, x, y, &ceilZ, &floorZ);
|
||||
getzsofslopeptr(pSector, x, y, &ceilZ, &floorZ);
|
||||
int dz1 = floorZ-z;
|
||||
int dz2 = z-ceilZ;
|
||||
auto gibactor = actSpawnThing(nSector, x, y, z, pGThing->type);
|
||||
auto gibactor = actSpawnThing(pSector, x, y, z, pGThing->type);
|
||||
if (!gibactor) return;
|
||||
spritetype *pGib = &gibactor->s();
|
||||
assert(pGib != NULL);
|
||||
|
|
|
@ -2199,7 +2199,7 @@ void ActivateGenerator(DBloodActor* actor)
|
|||
case kGenDripBlood: {
|
||||
int top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
actSpawnThing(pSprite->sectnum, pSprite->x, pSprite->y, bottom, (pSprite->type == kGenDripWater) ? kThingDripWater : kThingDripBlood);
|
||||
actSpawnThing(pSprite->sector(), pSprite->x, pSprite->y, bottom, (pSprite->type == kGenDripWater) ? kThingDripWater : kThingDripBlood);
|
||||
break;
|
||||
}
|
||||
case kGenSound:
|
||||
|
|
Loading…
Reference in a new issue