mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- refactored the SEQ callback to receive an actor pointer instead of an xsprite index.
This commit is contained in:
parent
44805e29b3
commit
7e78bc1c14
25 changed files with 285 additions and 340 deletions
|
@ -6758,71 +6758,66 @@ void actFireVector(spritetype *pShooter, int a2, int a3, int a4, int a5, int a6,
|
||||||
sfxPlay3DSound(x, y, z, pVectorData->surfHit[nSurf].fxSnd, nSector);
|
sfxPlay3DSound(x, y, z, pVectorData->surfHit[nSurf].fxSnd, nSector);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FireballSeqCallback(int, int nXSprite)
|
void FireballSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
int nSprite = pXSprite->reference;
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &actor->s();
|
||||||
spritetype *pFX = gFX.fxSpawn(FX_11, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
spritetype *pFX = gFX.fxSpawn(FX_11, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
||||||
if (pFX)
|
if (pFX)
|
||||||
{
|
{
|
||||||
int nFX = pFX->index;
|
int nFX = pFX->index;
|
||||||
xvel[nFX] = xvel[nSprite];
|
xvel[nFX] = actor->xvel();
|
||||||
yvel[nFX] = yvel[nSprite];
|
yvel[nFX] = actor->yvel();
|
||||||
zvel[nFX] = zvel[nSprite];
|
zvel[nFX] = actor->zvel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NapalmSeqCallback(int, int nXSprite)
|
|
||||||
|
void NapalmSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype *pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pFX = gFX.fxSpawn(FX_12, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
spritetype *pFX = gFX.fxSpawn(FX_12, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
||||||
if (pFX)
|
if (pFX)
|
||||||
{
|
{
|
||||||
int nFX = pFX->index;
|
int nFX = pFX->index;
|
||||||
xvel[nFX] = xvel[nSprite];
|
xvel[nFX] = actor->xvel();
|
||||||
yvel[nFX] = yvel[nSprite];
|
yvel[nFX] = actor->yvel();
|
||||||
zvel[nFX] = zvel[nSprite];
|
zvel[nFX] = actor->zvel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_3888C(int, int nXSprite)
|
void sub_3888C(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
spritetype* pSprite = &actor->s();
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pFX = gFX.fxSpawn(FX_32, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
spritetype *pFX = gFX.fxSpawn(FX_32, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
||||||
if (pFX)
|
if (pFX)
|
||||||
{
|
{
|
||||||
int nFX = pFX->index;
|
int nFX = pFX->index;
|
||||||
xvel[nFX] = xvel[nSprite];
|
xvel[nFX] = actor->xvel();
|
||||||
yvel[nFX] = yvel[nSprite];
|
yvel[nFX] = actor->yvel();
|
||||||
zvel[nFX] = zvel[nSprite];
|
zvel[nFX] = actor->zvel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_38938(int, int nXSprite)
|
void sub_38938(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
spritetype *pSprite = &actor->s();
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pFX = gFX.fxSpawn(FX_33, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
spritetype *pFX = gFX.fxSpawn(FX_33, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
||||||
if (pFX)
|
if (pFX)
|
||||||
{
|
{
|
||||||
int nFX = pFX->index;
|
int nFX = pFX->index;
|
||||||
xvel[nFX] = xvel[nSprite];
|
xvel[nFX] = actor->xvel();
|
||||||
yvel[nFX] = yvel[nSprite];
|
yvel[nFX] = actor->yvel();
|
||||||
zvel[nFX] = zvel[nSprite];
|
zvel[nFX] = actor->zvel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TreeToGibCallback(int, int nXSprite)
|
void TreeToGibCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype *pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
pSprite->type = kThingObjectExplode;
|
pSprite->type = kThingObjectExplode;
|
||||||
pXSprite->state = 1;
|
pXSprite->state = 1;
|
||||||
pXSprite->data1 = 15;
|
pXSprite->data1 = 15;
|
||||||
|
@ -6833,11 +6828,10 @@ void TreeToGibCallback(int, int nXSprite)
|
||||||
pSprite->cstat |= 257;
|
pSprite->cstat |= 257;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DudeToGibCallback1(int, int nXSprite)
|
void DudeToGibCallback1(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
pSprite->type = kThingBloodChunks;
|
pSprite->type = kThingBloodChunks;
|
||||||
pXSprite->data1 = 8;
|
pXSprite->data1 = 8;
|
||||||
pXSprite->data2 = 0;
|
pXSprite->data2 = 0;
|
||||||
|
@ -6851,11 +6845,10 @@ void DudeToGibCallback1(int, int nXSprite)
|
||||||
pXSprite->state = 1;
|
pXSprite->state = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DudeToGibCallback2(int, int nXSprite)
|
void DudeToGibCallback2(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
pSprite->type = kThingBloodChunks;
|
pSprite->type = kThingBloodChunks;
|
||||||
pXSprite->data1 = 3;
|
pXSprite->data1 = 3;
|
||||||
pXSprite->data2 = 0;
|
pXSprite->data2 = 0;
|
||||||
|
|
|
@ -72,10 +72,10 @@ AISTATE batDodgeDown = {kAiStateMove, 6, -1, 120, NULL, batMoveDodgeDown, 0, &ba
|
||||||
AISTATE batDodgeDownRight = {kAiStateMove, 6, -1, 90, NULL, batMoveDodgeDown, 0, &batChase };
|
AISTATE batDodgeDownRight = {kAiStateMove, 6, -1, 90, NULL, batMoveDodgeDown, 0, &batChase };
|
||||||
AISTATE batDodgeDownLeft = {kAiStateMove, 6, -1, 90, NULL, batMoveDodgeDown, 0, &batChase };
|
AISTATE batDodgeDownLeft = {kAiStateMove, 6, -1, 90, NULL, batMoveDodgeDown, 0, &batChase };
|
||||||
|
|
||||||
void batBiteSeqCallback(int, int nXSprite)
|
void batBiteSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
spritetype *pSprite = &sprite[pXSprite->reference];
|
spritetype *pSprite = &actor->s();
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
|
|
|
@ -75,11 +75,10 @@ AISTATE beast138FB4 = { kAiStateOther, 9, -1, 120, NULL, sub_62AE0, beastThinkSw
|
||||||
AISTATE beast138FD0 = { kAiStateOther, 9, -1, 0, NULL, sub_62D7C, beastThinkSwimChase, &beastSwimChase };
|
AISTATE beast138FD0 = { kAiStateOther, 9, -1, 0, NULL, sub_62D7C, beastThinkSwimChase, &beastSwimChase };
|
||||||
AISTATE beast138FEC = { kAiStateOther, 9, -1, 120, NULL, aiMoveTurn, NULL, &beastSwimChase };
|
AISTATE beast138FEC = { kAiStateOther, 9, -1, 120, NULL, aiMoveTurn, NULL, &beastSwimChase };
|
||||||
|
|
||||||
void SlashSeqCallback(int, int nXSprite)
|
void SlashSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype *pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
|
@ -93,12 +92,12 @@ void SlashSeqCallback(int, int nXSprite)
|
||||||
sfxPlay3DSound(pSprite, 9012+Random(2), -1, 0);
|
sfxPlay3DSound(pSprite, 9012+Random(2), -1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StompSeqCallback(int, int nXSprite)
|
void StompSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
uint8_t vb8[(kMaxSectors+7)>>3];
|
uint8_t vb8[(kMaxSectors+7)>>3];
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
int nSprite = pXSprite->reference;
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &actor->s();
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
int x = pSprite->x;
|
int x = pSprite->x;
|
||||||
|
|
|
@ -73,11 +73,10 @@ AISTATE eelDodgeDown = { kAiStateMove, 0, -1, 120, NULL, eelMoveDodgeDown, NULL,
|
||||||
AISTATE eelDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeDown, NULL, &eelChase };
|
AISTATE eelDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeDown, NULL, &eelChase };
|
||||||
AISTATE eelDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeDown, NULL, &eelChase };
|
AISTATE eelDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeDown, NULL, &eelChase };
|
||||||
|
|
||||||
void eelBiteSeqCallback(int, int nXSprite)
|
void eelBiteSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
auto actor = &bloodActors[pXSprite->reference];
|
spritetype *pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[pXSprite->reference];
|
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
|
|
|
@ -85,7 +85,7 @@ AISTATE genDudeBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, burn
|
||||||
AISTATE genDudeBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, burnThinkSearch, &genDudeBurnSearch };
|
AISTATE genDudeBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, burnThinkSearch, &genDudeBurnSearch };
|
||||||
AISTATE genDudeBurnAttack = { kAiStateChase, 3, nBurnClient, 120, NULL, NULL, NULL, &genDudeBurnChase };
|
AISTATE genDudeBurnAttack = { kAiStateChase, 3, nBurnClient, 120, NULL, NULL, NULL, &genDudeBurnChase };
|
||||||
|
|
||||||
void BurnSeqCallback(int, int)
|
void BurnSeqCallback(int, DBloodActor*)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,13 +70,12 @@ AISTATE tinycaleb139660 = { kAiStateOther, 8, -1, 120, NULL, sub_65F44, calebThi
|
||||||
AISTATE tinycaleb13967C = { kAiStateOther, 8, -1, 0, NULL, sub_661E0, calebThinkSwimChase, &tinycalebSwimChase };
|
AISTATE tinycaleb13967C = { kAiStateOther, 8, -1, 0, NULL, sub_661E0, calebThinkSwimChase, &tinycalebSwimChase };
|
||||||
AISTATE tinycaleb139698 = { kAiStateOther, 8, -1, 120, NULL, aiMoveTurn, NULL, &tinycalebSwimChase };
|
AISTATE tinycaleb139698 = { kAiStateOther, 8, -1, 120, NULL, aiMoveTurn, NULL, &tinycalebSwimChase };
|
||||||
|
|
||||||
void SeqAttackCallback(int, int nXSprite)
|
void SeqAttackCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
int nSprite = xsprite[nXSprite].reference;
|
spritetype *pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
int dz = gDudeSlope[nXSprite];
|
int dz = actor->dudeSlope();
|
||||||
dx += Random2(1500);
|
dx += Random2(1500);
|
||||||
dy += Random2(1500);
|
dy += Random2(1500);
|
||||||
dz += Random2(1500);
|
dz += Random2(1500);
|
||||||
|
|
|
@ -68,11 +68,10 @@ AISTATE cerberus4Burn = { kAiStateChase, 6, nCerberusBurnClient2, 60, NULL, NULL
|
||||||
AISTATE cerberus139890 = { kAiStateOther, 7, -1, 120, NULL, aiMoveTurn, NULL, &cerberusChase };
|
AISTATE cerberus139890 = { kAiStateOther, 7, -1, 120, NULL, aiMoveTurn, NULL, &cerberusChase };
|
||||||
AISTATE cerberus1398AC = { kAiStateOther, 7, -1, 120, NULL, aiMoveTurn, NULL, &cerberusChase };
|
AISTATE cerberus1398AC = { kAiStateOther, 7, -1, 120, NULL, aiMoveTurn, NULL, &cerberusChase };
|
||||||
|
|
||||||
void cerberusBiteSeqCallback(int, int nXSprite)
|
void cerberusBiteSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype *pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
///assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
///assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||||
|
@ -92,11 +91,10 @@ void cerberusBiteSeqCallback(int, int nXSprite)
|
||||||
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_14);
|
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_14);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cerberusBurnSeqCallback(int, int nXSprite)
|
void cerberusBurnSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
int height = pDudeInfo->eyeHeight*pSprite->yrepeat;
|
int height = pDudeInfo->eyeHeight*pSprite->yrepeat;
|
||||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
||||||
|
@ -111,7 +109,7 @@ void cerberusBurnSeqCallback(int, int nXSprite)
|
||||||
Aim aim;
|
Aim aim;
|
||||||
aim.dx = CosScale16(pSprite->ang);
|
aim.dx = CosScale16(pSprite->ang);
|
||||||
aim.dy = SinScale16(pSprite->ang);
|
aim.dy = SinScale16(pSprite->ang);
|
||||||
aim.dz = gDudeSlope[nXSprite];
|
aim.dz = actor->dudeSlope();
|
||||||
int nClosest = 0x7fffffff;
|
int nClosest = 0x7fffffff;
|
||||||
int nSprite2;
|
int nSprite2;
|
||||||
StatIterator it(kStatDude);
|
StatIterator it(kStatDude);
|
||||||
|
@ -135,7 +133,7 @@ void cerberusBurnSeqCallback(int, int nXSprite)
|
||||||
}
|
}
|
||||||
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
||||||
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
||||||
int tz = z+mulscale(gDudeSlope[nXSprite], nDist, 10);
|
int tz = z+mulscale(actor->dudeSlope(), nDist, 10);
|
||||||
int tsr = mulscale(9460, nDist, 10);
|
int tsr = mulscale(9460, nDist, 10);
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
GetSpriteExtents(pSprite2, &top, &bottom);
|
GetSpriteExtents(pSprite2, &top, &bottom);
|
||||||
|
@ -175,11 +173,10 @@ void cerberusBurnSeqCallback(int, int nXSprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cerberusBurnSeqCallback2(int, int nXSprite)
|
void cerberusBurnSeqCallback2(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
||||||
if (!(pXSprite->target >= 0 && pXSprite->target < kMaxSprites)) {
|
if (!(pXSprite->target >= 0 && pXSprite->target < kMaxSprites)) {
|
||||||
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
||||||
|
@ -196,7 +193,7 @@ void cerberusBurnSeqCallback2(int, int nXSprite)
|
||||||
int ax, ay, az;
|
int ax, ay, az;
|
||||||
aim.dx = ax = CosScale16(pSprite->ang);
|
aim.dx = ax = CosScale16(pSprite->ang);
|
||||||
aim.dy = ay = SinScale16(pSprite->ang);
|
aim.dy = ay = SinScale16(pSprite->ang);
|
||||||
aim.dz = gDudeSlope[nXSprite];
|
aim.dz = actor->dudeSlope();
|
||||||
az = 0;
|
az = 0;
|
||||||
int nClosest = 0x7fffffff;
|
int nClosest = 0x7fffffff;
|
||||||
int nSprite2;
|
int nSprite2;
|
||||||
|
@ -221,7 +218,7 @@ void cerberusBurnSeqCallback2(int, int nXSprite)
|
||||||
}
|
}
|
||||||
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
||||||
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
||||||
int tz = z+mulscale(gDudeSlope[nXSprite], nDist, 10);
|
int tz = z+mulscale(actor->dudeSlope(), nDist, 10);
|
||||||
int tsr = mulscale(9460, nDist, 10);
|
int tsr = mulscale(9460, nDist, 10);
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
GetSpriteExtents(pSprite2, &top, &bottom);
|
GetSpriteExtents(pSprite2, &top, &bottom);
|
||||||
|
|
|
@ -87,14 +87,13 @@ AISTATE cultistTSwimFire = { kAiStateChase, 8, nTommyClient, 0, NULL, aiMoveTurn
|
||||||
AISTATE cultistTsSwimFire = { kAiStateChase, 8, nTeslaClient, 0, NULL, aiMoveTurn, cultThinkChase, &cultistTsSwimFire };
|
AISTATE cultistTsSwimFire = { kAiStateChase, 8, nTeslaClient, 0, NULL, aiMoveTurn, cultThinkChase, &cultistTsSwimFire };
|
||||||
AISTATE cultistSwimRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &cultistSwimDodge };
|
AISTATE cultistSwimRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &cultistSwimDodge };
|
||||||
|
|
||||||
void TommySeqCallback(int, int nXSprite)
|
void TommySeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
int dz = gDudeSlope[nXSprite];
|
int dz = actor->dudeSlope();
|
||||||
dx += Random3((5-gGameOptions.nDifficulty)*1000);
|
dx += Random3((5-gGameOptions.nDifficulty)*1000);
|
||||||
dy += Random3((5-gGameOptions.nDifficulty)*1000);
|
dy += Random3((5-gGameOptions.nDifficulty)*1000);
|
||||||
dz += Random3((5-gGameOptions.nDifficulty)*500);
|
dz += Random3((5-gGameOptions.nDifficulty)*500);
|
||||||
|
@ -102,16 +101,15 @@ void TommySeqCallback(int, int nXSprite)
|
||||||
sfxPlay3DSound(pSprite, 4001, -1, 0);
|
sfxPlay3DSound(pSprite, 4001, -1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TeslaSeqCallback(int, int nXSprite)
|
void TeslaSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
if (Chance(dword_138BB0[gGameOptions.nDifficulty]))
|
if (Chance(dword_138BB0[gGameOptions.nDifficulty]))
|
||||||
{
|
{
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
int dz = gDudeSlope[nXSprite];
|
int dz = actor->dudeSlope();
|
||||||
dx += Random3((5-gGameOptions.nDifficulty)*1000);
|
dx += Random3((5-gGameOptions.nDifficulty)*1000);
|
||||||
dy += Random3((5-gGameOptions.nDifficulty)*1000);
|
dy += Random3((5-gGameOptions.nDifficulty)*1000);
|
||||||
dz += Random3((5-gGameOptions.nDifficulty)*500);
|
dz += Random3((5-gGameOptions.nDifficulty)*500);
|
||||||
|
@ -120,14 +118,13 @@ void TeslaSeqCallback(int, int nXSprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShotSeqCallback(int, int nXSprite)
|
void ShotSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
int dz = gDudeSlope[nXSprite];
|
int dz = actor->dudeSlope();
|
||||||
dx += Random2((5-gGameOptions.nDifficulty)*1000-500);
|
dx += Random2((5-gGameOptions.nDifficulty)*1000-500);
|
||||||
dy += Random2((5-gGameOptions.nDifficulty)*1000-500);
|
dy += Random2((5-gGameOptions.nDifficulty)*1000-500);
|
||||||
dz += Random2((5-gGameOptions.nDifficulty)*500);
|
dz += Random2((5-gGameOptions.nDifficulty)*500);
|
||||||
|
@ -144,11 +141,10 @@ void ShotSeqCallback(int, int nXSprite)
|
||||||
sfxPlay3DSound(pSprite, 1002, -1, 0);
|
sfxPlay3DSound(pSprite, 1002, -1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cultThrowSeqCallback(int, int nXSprite)
|
void cultThrowSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int nMissile = kThingArmedTNTStick;
|
int nMissile = kThingArmedTNTStick;
|
||||||
if (gGameOptions.nDifficulty > 2)
|
if (gGameOptions.nDifficulty > 2)
|
||||||
nMissile = kThingArmedTNTBundle;
|
nMissile = kThingArmedTNTBundle;
|
||||||
|
@ -171,24 +167,22 @@ void cultThrowSeqCallback(int, int nXSprite)
|
||||||
evPost(pMissile->index, 3, 120*(1+Random(2)), kCmdOn);
|
evPost(pMissile->index, 3, 120*(1+Random(2)), kCmdOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_68170(int, int nXSprite)
|
void sub_68170(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int nMissile = kThingArmedTNTStick;
|
int nMissile = kThingArmedTNTStick;
|
||||||
if (gGameOptions.nDifficulty > 2)
|
if (gGameOptions.nDifficulty > 2)
|
||||||
nMissile = kThingArmedTNTBundle;
|
nMissile = kThingArmedTNTBundle;
|
||||||
sfxPlay3DSound(pSprite, 455, -1, 0);
|
sfxPlay3DSound(pSprite, 455, -1, 0);
|
||||||
spritetype *pMissile = actFireThing(pSprite, 0, 0, gDudeSlope[nXSprite]-9460, nMissile, 0x133333);
|
spritetype* pMissile = actFireThing(pSprite, 0, 0, actor->dudeSlope() - 9460, nMissile, 0x133333);
|
||||||
evPost(pMissile->index, 3, 120*(2+Random(2)), kCmdOn);
|
evPost(pMissile->index, 3, 120*(2+Random(2)), kCmdOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_68230(int, int nXSprite)
|
void sub_68230(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int nMissile = kThingArmedTNTStick;
|
int nMissile = kThingArmedTNTStick;
|
||||||
if (gGameOptions.nDifficulty > 2)
|
if (gGameOptions.nDifficulty > 2)
|
||||||
nMissile = kThingArmedTNTBundle;
|
nMissile = kThingArmedTNTBundle;
|
||||||
|
|
|
@ -92,11 +92,10 @@ static void playStatueBreakSnd(DBloodActor* actor) {
|
||||||
aiPlay3DSound(pSprite, 313, AI_SFX_PRIORITY_1, -1);
|
aiPlay3DSound(pSprite, 313, AI_SFX_PRIORITY_1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlashFSeqCallback(int, int nXSprite)
|
void SlashFSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
||||||
|
@ -114,18 +113,17 @@ void SlashFSeqCallback(int, int nXSprite)
|
||||||
actFireVector(pSprite, 0, 0, dx-r2, dy+r1, dz, VECTOR_TYPE_13);
|
actFireVector(pSprite, 0, 0, dx-r2, dy+r1, dz, VECTOR_TYPE_13);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThrowFSeqCallback(int, int nXSprite)
|
void ThrowFSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
actFireThing(&sprite[nSprite], 0, 0, gDudeSlope[nXSprite]-7500, kThingBone, 0xeeeee);
|
actFireThing(&actor->s(), 0, 0, actor->dudeSlope()-7500, kThingBone, 0xeeeee);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlastSSeqCallback(int, int nXSprite)
|
void BlastSSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
wrand(); // ???
|
wrand(); // ???
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
int height = (pSprite->yrepeat*getDudeInfo(pSprite->type)->eyeHeight) << 2;
|
int height = (pSprite->yrepeat*getDudeInfo(pSprite->type)->eyeHeight) << 2;
|
||||||
|
@ -138,7 +136,7 @@ void BlastSSeqCallback(int, int nXSprite)
|
||||||
Aim aim;
|
Aim aim;
|
||||||
aim.dx = CosScale16(pSprite->ang);
|
aim.dx = CosScale16(pSprite->ang);
|
||||||
aim.dy = SinScale16(pSprite->ang);
|
aim.dy = SinScale16(pSprite->ang);
|
||||||
aim.dz = gDudeSlope[nXSprite];
|
aim.dz = actor->dudeSlope();
|
||||||
int nClosest = 0x7fffffff;
|
int nClosest = 0x7fffffff;
|
||||||
int nSprite2;
|
int nSprite2;
|
||||||
StatIterator it(kStatDude);
|
StatIterator it(kStatDude);
|
||||||
|
@ -162,7 +160,7 @@ void BlastSSeqCallback(int, int nXSprite)
|
||||||
}
|
}
|
||||||
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
||||||
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
||||||
int tz = z+mulscale(gDudeSlope[nXSprite], nDist, 10);
|
int tz = z+mulscale(actor->dudeSlope(), nDist, 10);
|
||||||
int tsr = mulscale(9460, nDist, 10);
|
int tsr = mulscale(9460, nDist, 10);
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
GetSpriteExtents(pSprite2, &top, &bottom);
|
GetSpriteExtents(pSprite2, &top, &bottom);
|
||||||
|
@ -216,12 +214,10 @@ void BlastSSeqCallback(int, int nXSprite)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThrowSSeqCallback(int, int nXSprite)
|
void ThrowSSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
spritetype* pSprite = &actor->s();
|
||||||
int nSprite = pXSprite->reference;
|
actFireThing(pSprite, 0, 0, actor->dudeSlope() - 7500, kThingBone, Chance(0x6000) ? 0x133333 : 0x111111);
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
actFireThing(pSprite, 0, 0, gDudeSlope[nXSprite]-7500, kThingBone, Chance(0x6000) ? 0x133333 : 0x111111);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gargThinkTarget(DBloodActor* actor)
|
static void gargThinkTarget(DBloodActor* actor)
|
||||||
|
|
|
@ -76,11 +76,10 @@ AISTATE ghostDodgeDown = { kAiStateMove, 0, -1, 120, NULL, ghostMoveDodgeDown, N
|
||||||
AISTATE ghostDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
|
AISTATE ghostDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
|
||||||
AISTATE ghostDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
|
AISTATE ghostDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
|
||||||
|
|
||||||
void ghostSlashSeqCallback(int, int nXSprite)
|
void ghostSlashSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
||||||
|
@ -99,18 +98,15 @@ void ghostSlashSeqCallback(int, int nXSprite)
|
||||||
actFireVector(pSprite, 0, 0, dx-r2, dy+r1, dz, VECTOR_TYPE_12);
|
actFireVector(pSprite, 0, 0, dx-r2, dy+r1, dz, VECTOR_TYPE_12);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ghostThrowSeqCallback(int, int nXSprite)
|
void ghostThrowSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
actFireThing(&actor->s(), 0, 0, actor->dudeSlope() - 7500, kThingBone, 0xeeeee);
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
actFireThing(&sprite[nSprite], 0, 0, gDudeSlope[nXSprite]-7500, kThingBone, 0xeeeee);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ghostBlastSeqCallback(int, int nXSprite)
|
void ghostBlastSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
wrand(); // ???
|
wrand(); // ???
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
int height = (pSprite->yrepeat*getDudeInfo(pSprite->type)->eyeHeight) << 2;
|
int height = (pSprite->yrepeat*getDudeInfo(pSprite->type)->eyeHeight) << 2;
|
||||||
|
@ -123,7 +119,7 @@ void ghostBlastSeqCallback(int, int nXSprite)
|
||||||
Aim aim;
|
Aim aim;
|
||||||
aim.dx = CosScale16(pSprite->ang);
|
aim.dx = CosScale16(pSprite->ang);
|
||||||
aim.dy = SinScale16(pSprite->ang);
|
aim.dy = SinScale16(pSprite->ang);
|
||||||
aim.dz = gDudeSlope[nXSprite];
|
aim.dz = actor->dudeSlope();
|
||||||
int nClosest = 0x7fffffff;
|
int nClosest = 0x7fffffff;
|
||||||
int nSprite2;
|
int nSprite2;
|
||||||
StatIterator it(kStatDude);
|
StatIterator it(kStatDude);
|
||||||
|
@ -147,7 +143,7 @@ void ghostBlastSeqCallback(int, int nXSprite)
|
||||||
}
|
}
|
||||||
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
||||||
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
||||||
int tz = z+mulscale(gDudeSlope[nXSprite], nDist, 10);
|
int tz = z+mulscale(actor->dudeSlope(), nDist, 10);
|
||||||
int tsr = mulscale(9460, nDist, 10);
|
int tsr = mulscale(9460, nDist, 10);
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
GetSpriteExtents(pSprite2, &top, &bottom);
|
GetSpriteExtents(pSprite2, &top, &bottom);
|
||||||
|
|
|
@ -71,11 +71,10 @@ AISTATE gillBeast13A138 = { kAiStateOther, 10, -1, 120, NULL, sub_6CD74, gillThi
|
||||||
AISTATE gillBeast13A154 = { kAiStateOther, 10, -1, 0, NULL, sub_6D03C, gillThinkSwimChase, &gillBeastSwimChase };
|
AISTATE gillBeast13A154 = { kAiStateOther, 10, -1, 0, NULL, sub_6D03C, gillThinkSwimChase, &gillBeastSwimChase };
|
||||||
AISTATE gillBeast13A170 = { kAiStateOther, 10, -1, 120, NULL, NULL, aiMoveTurn, &gillBeastSwimChase };
|
AISTATE gillBeast13A170 = { kAiStateOther, 10, -1, 120, NULL, NULL, aiMoveTurn, &gillBeastSwimChase };
|
||||||
|
|
||||||
void GillBiteSeqCallback(int, int nXSprite)
|
void GillBiteSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
|
|
|
@ -55,11 +55,10 @@ AISTATE handRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &handSearch }
|
||||||
AISTATE handGoto = { kAiStateMove, 6, -1, 1800, NULL, aiMoveForward, handThinkGoto, &handIdle };
|
AISTATE handGoto = { kAiStateMove, 6, -1, 1800, NULL, aiMoveForward, handThinkGoto, &handIdle };
|
||||||
AISTATE handJump = { kAiStateChase, 7, nJumpClient, 120, NULL, NULL, NULL, &handChase };
|
AISTATE handJump = { kAiStateChase, 7, nJumpClient, 120, NULL, NULL, NULL, &handChase };
|
||||||
|
|
||||||
void HandJumpSeqCallback(int, int nXSprite)
|
void HandJumpSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
if (IsPlayerSprite(pTarget))
|
if (IsPlayerSprite(pTarget))
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,11 +58,10 @@ AISTATE houndGoto = { kAiStateMove, 8, -1, 600, NULL, aiMoveForward, houndThinkG
|
||||||
AISTATE houndBite = { kAiStateChase, 6, nHoundBiteClient, 60, NULL, NULL, NULL, &houndChase };
|
AISTATE houndBite = { kAiStateChase, 6, nHoundBiteClient, 60, NULL, NULL, NULL, &houndChase };
|
||||||
AISTATE houndBurn = { kAiStateChase, 7, nHoundBurnClient, 60, NULL, NULL, NULL, &houndChase };
|
AISTATE houndBurn = { kAiStateChase, 7, nHoundBurnClient, 60, NULL, NULL, NULL, &houndChase };
|
||||||
|
|
||||||
void houndBiteSeqCallback(int, int nXSprite)
|
void houndBiteSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
///assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
///assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||||
|
@ -86,11 +85,9 @@ void houndBiteSeqCallback(int, int nXSprite)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void houndBurnSeqCallback(int, int nXSprite)
|
void houndBurnSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
spritetype* pSprite = &actor->s();
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
actFireMissile(pSprite, 0, 0, CosScale16(pSprite->ang), SinScale16(pSprite->ang), 0, kMissileFlameHound);
|
actFireMissile(pSprite, 0, 0, CosScale16(pSprite->ang), SinScale16(pSprite->ang), 0, kMissileFlameHound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,25 +66,20 @@ AISTATE tentacleStartChase = { kAiStateOther, 6, nTentacleStartSearchClient, 120
|
||||||
AISTATE tentacleRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &tentacleChase };
|
AISTATE tentacleRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &tentacleChase };
|
||||||
AISTATE tentacleChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveTurn, aiPodChase, NULL };
|
AISTATE tentacleChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveTurn, aiPodChase, NULL };
|
||||||
|
|
||||||
void sub_6FF08(int, int nXSprite)
|
void sub_6FF08(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
sfxPlay3DSound(&actor->s(), 2503, -1, 0);
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
sfxPlay3DSound(&sprite[nSprite], 2503, -1, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_6FF54(int, int nXSprite)
|
void sub_6FF54(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
sfxPlay3DSound(&actor->s(), 2500, -1, 0);
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
sfxPlay3DSound(&sprite[nSprite], 2500, -1, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void podAttack(int, int nXSprite)
|
void podAttack(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
||||||
if (!(pXSprite->target >= 0 && pXSprite->target < kMaxSprites)) {
|
if (!(pXSprite->target >= 0 && pXSprite->target < kMaxSprites)) {
|
||||||
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
||||||
|
@ -137,11 +132,10 @@ void podAttack(int, int nXSprite)
|
||||||
sub_746D4(pSprite, 240);
|
sub_746D4(pSprite, 240);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_70284(int, int nXSprite)
|
void sub_70284(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
sfxPlay3DSound(pSprite, 2502, -1, 0);
|
sfxPlay3DSound(pSprite, 2502, -1, 0);
|
||||||
int nDist, nBurn;
|
int nDist, nBurn;
|
||||||
DAMAGE_TYPE dmgType;
|
DAMAGE_TYPE dmgType;
|
||||||
|
@ -158,7 +152,7 @@ void sub_70284(int, int nXSprite)
|
||||||
nDist = 75;
|
nDist = 75;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sub_2A620(nSprite, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, nDist, 1, 5*(1+gGameOptions.nDifficulty), dmgType, 2, nBurn, 0, 0);
|
sub_2A620(pSprite->index, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, nDist, 1, 5*(1+gGameOptions.nDifficulty), dmgType, 2, nBurn, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void aiPodSearch(DBloodActor* actor)
|
static void aiPodSearch(DBloodActor* actor)
|
||||||
|
|
|
@ -55,11 +55,10 @@ AISTATE ratRecoil = { kAiStateRecoil, 7, -1, 0, NULL, NULL, NULL, &ratDodge };
|
||||||
AISTATE ratGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, ratThinkGoto, &ratIdle };
|
AISTATE ratGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, ratThinkGoto, &ratIdle };
|
||||||
AISTATE ratBite = { kAiStateChase, 6, nRatBiteClient, 120, NULL, NULL, NULL, &ratChase };
|
AISTATE ratBite = { kAiStateChase, 6, nRatBiteClient, 120, NULL, NULL, NULL, &ratChase };
|
||||||
|
|
||||||
void ratBiteSeqCallback(int, int nXSprite)
|
void ratBiteSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||||
|
|
|
@ -80,11 +80,10 @@ static char sub_70D30(XSPRITE *pXDude, int a2, int a3)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpidBiteSeqCallback(int, int nXSprite)
|
void SpidBiteSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
dx += Random2(2000);
|
dx += Random2(2000);
|
||||||
|
@ -130,11 +129,10 @@ void SpidBiteSeqCallback(int, int nXSprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpidJumpSeqCallback(int, int nXSprite)
|
void SpidJumpSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
int dx = CosScale16(pSprite->ang);
|
int dx = CosScale16(pSprite->ang);
|
||||||
int dy = SinScale16(pSprite->ang);
|
int dy = SinScale16(pSprite->ang);
|
||||||
dx += Random2(200);
|
dx += Random2(200);
|
||||||
|
@ -149,19 +147,18 @@ void SpidJumpSeqCallback(int, int nXSprite)
|
||||||
case kDudeSpiderBrown:
|
case kDudeSpiderBrown:
|
||||||
case kDudeSpiderRed:
|
case kDudeSpiderRed:
|
||||||
case kDudeSpiderBlack:
|
case kDudeSpiderBlack:
|
||||||
xvel[nSprite] = IntToFixed(dx);
|
actor->xvel() = IntToFixed(dx);
|
||||||
yvel[nSprite] = IntToFixed(dy);
|
actor->yvel() = IntToFixed(dy);
|
||||||
zvel[nSprite] = IntToFixed(dz);
|
actor->zvel() = IntToFixed(dz);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_71370(int, int nXSprite)
|
void sub_71370(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
||||||
|
@ -184,7 +181,7 @@ void sub_71370(int, int nXSprite)
|
||||||
|
|
||||||
if (pSpawn) {
|
if (pSpawn) {
|
||||||
pDudeExtraE->xval2++;
|
pDudeExtraE->xval2++;
|
||||||
pSpawn->owner = nSprite;
|
pSpawn->owner = pSprite->index;
|
||||||
gKillMgr.AddNewKill(1);
|
gKillMgr.AddNewKill(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,16 +60,14 @@ AISTATE tcherno13A9F0 = { kAiStateChase, 6, dword_279B58, 60, NULL, NULL, NULL,
|
||||||
AISTATE tcherno13AA0C = { kAiStateChase, 7, dword_279B5C, 60, NULL, NULL, NULL, &tchernobogChase };
|
AISTATE tcherno13AA0C = { kAiStateChase, 7, dword_279B5C, 60, NULL, NULL, NULL, &tchernobogChase };
|
||||||
AISTATE tcherno13AA28 = { kAiStateChase, 8, -1, 60, NULL, aiMoveTurn, NULL, &tchernobogChase };
|
AISTATE tcherno13AA28 = { kAiStateChase, 8, -1, 60, NULL, aiMoveTurn, NULL, &tchernobogChase };
|
||||||
|
|
||||||
void sub_71A90(int, int nXSprite)
|
void sub_71A90(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
auto actor = &bloodActors[pXSprite->reference];
|
spritetype* pSprite = &actor->s();
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
XSPRITE *pXTarget = &xsprite[pTarget->extra];
|
||||||
int nTarget = pTarget->index;
|
int nTarget = pTarget->index;
|
||||||
int nOwner = actSpriteIdToOwnerId(nSprite);
|
int nOwner = actSpriteIdToOwnerId(pSprite->index);
|
||||||
if (pXTarget->burnTime == 0)
|
if (pXTarget->burnTime == 0)
|
||||||
evPost(nTarget, 3, 0, kCallbackFXFlameLick);
|
evPost(nTarget, 3, 0, kCallbackFXFlameLick);
|
||||||
actBurnSprite(nOwner, pXTarget, 40);
|
actBurnSprite(nOwner, pXTarget, 40);
|
||||||
|
@ -77,11 +75,10 @@ void sub_71A90(int, int nXSprite)
|
||||||
aiNewState(actor, &tcherno13A9D4);
|
aiNewState(actor, &tcherno13A9D4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_71BD4(int, int nXSprite)
|
void sub_71BD4(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
int height = pSprite->yrepeat*pDudeInfo->eyeHeight;
|
int height = pSprite->yrepeat*pDudeInfo->eyeHeight;
|
||||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
||||||
|
@ -96,7 +93,7 @@ void sub_71BD4(int, int nXSprite)
|
||||||
Aim aim;
|
Aim aim;
|
||||||
aim.dx = CosScale16(pSprite->ang);
|
aim.dx = CosScale16(pSprite->ang);
|
||||||
aim.dy = SinScale16(pSprite->ang);
|
aim.dy = SinScale16(pSprite->ang);
|
||||||
aim.dz = gDudeSlope[nXSprite];
|
aim.dz = actor->dudeSlope();
|
||||||
int nClosest = 0x7fffffff;
|
int nClosest = 0x7fffffff;
|
||||||
int nSprite2;
|
int nSprite2;
|
||||||
StatIterator it(kStatDude);
|
StatIterator it(kStatDude);
|
||||||
|
@ -120,7 +117,7 @@ void sub_71BD4(int, int nXSprite)
|
||||||
}
|
}
|
||||||
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
||||||
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
||||||
int tz = z+mulscale(gDudeSlope[nXSprite], nDist, 10);
|
int tz = z+mulscale(actor->dudeSlope(), nDist, 10);
|
||||||
int tsr = mulscale(9460, nDist, 10);
|
int tsr = mulscale(9460, nDist, 10);
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
GetSpriteExtents(pSprite2, &top, &bottom);
|
GetSpriteExtents(pSprite2, &top, &bottom);
|
||||||
|
@ -153,11 +150,10 @@ void sub_71BD4(int, int nXSprite)
|
||||||
actFireMissile(pSprite, 350, 0, aim.dx, aim.dy, aim.dz, kMissileFireballTchernobog);
|
actFireMissile(pSprite, 350, 0, aim.dx, aim.dy, aim.dz, kMissileFireballTchernobog);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_720AC(int, int nXSprite)
|
void sub_720AC(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
///assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
|
||||||
if (!(pXSprite->target >= 0 && pXSprite->target < kMaxSprites)) {
|
if (!(pXSprite->target >= 0 && pXSprite->target < kMaxSprites)) {
|
||||||
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
Printf(PRINT_HIGH, "pXSprite->target >= 0 && pXSprite->target < kMaxSprites");
|
||||||
|
@ -175,7 +171,7 @@ void sub_720AC(int, int nXSprite)
|
||||||
Aim aim;
|
Aim aim;
|
||||||
aim.dx = ax;
|
aim.dx = ax;
|
||||||
aim.dy = ay;
|
aim.dy = ay;
|
||||||
aim.dz = gDudeSlope[nXSprite];
|
aim.dz = actor->dudeSlope();
|
||||||
int nClosest = 0x7fffffff;
|
int nClosest = 0x7fffffff;
|
||||||
az = 0;
|
az = 0;
|
||||||
int nSprite2;
|
int nSprite2;
|
||||||
|
@ -200,7 +196,7 @@ void sub_720AC(int, int nXSprite)
|
||||||
}
|
}
|
||||||
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
int tx = x+mulscale30(Cos(pSprite->ang), nDist);
|
||||||
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
int ty = y+mulscale30(Sin(pSprite->ang), nDist);
|
||||||
int tz = z+mulscale(gDudeSlope[nXSprite], nDist, 10);
|
int tz = z+mulscale(actor->dudeSlope(), nDist, 10);
|
||||||
int tsr = mulscale(9460, nDist, 10);
|
int tsr = mulscale(9460, nDist, 10);
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
GetSpriteExtents(pSprite2, &top, &bottom);
|
GetSpriteExtents(pSprite2, &top, &bottom);
|
||||||
|
|
|
@ -55,7 +55,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "gib.h"
|
#include "gib.h"
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
static void ThrowThing(int, bool);
|
static void ThrowThing(DBloodActor*, bool);
|
||||||
static void unicultThinkSearch(DBloodActor*);
|
static void unicultThinkSearch(DBloodActor*);
|
||||||
static void unicultThinkGoto(DBloodActor*);
|
static void unicultThinkGoto(DBloodActor*);
|
||||||
static void unicultThinkChase(DBloodActor*);
|
static void unicultThinkChase(DBloodActor*);
|
||||||
|
@ -132,7 +132,7 @@ static void forcePunch(DBloodActor* actor)
|
||||||
auto pXSprite = &actor->x();
|
auto pXSprite = &actor->x();
|
||||||
auto pSprite = &actor->s();
|
auto pSprite = &actor->s();
|
||||||
if (gGenDudeExtra[pSprite->index].forcePunch && seqGetStatus(3, pSprite->extra) == -1)
|
if (gGenDudeExtra[pSprite->index].forcePunch && seqGetStatus(3, pSprite->extra) == -1)
|
||||||
punchCallback(0,pSprite->extra);
|
punchCallback(0, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*bool sameFamily(spritetype* pDude1, spritetype* pDude2) {
|
/*bool sameFamily(spritetype* pDude1, spritetype* pDude2) {
|
||||||
|
@ -179,12 +179,12 @@ void genDudeUpdate(spritetype* pSprite) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void punchCallback(int, int nXIndex) {
|
void punchCallback(int, DBloodActor* actor)
|
||||||
XSPRITE* pXSprite = &xsprite[nXIndex];
|
{
|
||||||
if (pXSprite->target != -1) {
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype* pSprite = &sprite[nSprite];
|
if (pXSprite->target != -1)
|
||||||
|
{
|
||||||
int nZOffset1 = getDudeInfo(pSprite->type)->eyeHeight * pSprite->yrepeat << 2;
|
int nZOffset1 = getDudeInfo(pSprite->type)->eyeHeight * pSprite->yrepeat << 2;
|
||||||
int nZOffset2 = 0;
|
int nZOffset2 = 0;
|
||||||
|
|
||||||
|
@ -203,20 +203,14 @@ void punchCallback(int, int nXIndex) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void genDudeAttack1(int, int nXIndex) {
|
void genDudeAttack1(int, DBloodActor* actor)
|
||||||
if (!(nXIndex >= 0 && nXIndex < kMaxXSprites)) {
|
{
|
||||||
Printf(PRINT_HIGH, "nXIndex >= 0 && nXIndex < kMaxXSprites");
|
XSPRITE* pXSprite = &actor->x();
|
||||||
return;
|
spritetype* pSprite = &actor->s();
|
||||||
}
|
|
||||||
|
|
||||||
XSPRITE* pXSprite = &xsprite[nXIndex]; int nSprite = pXSprite->reference;
|
|
||||||
if (pXSprite->target < 0) return;
|
if (pXSprite->target < 0) return;
|
||||||
else if (!(nSprite >= 0 && nSprite < kMaxSprites)) {
|
|
||||||
Printf(PRINT_HIGH, "nIndex >= 0 && nIndex < kMaxSprites");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int dx, dy, dz; spritetype* pSprite = &sprite[nSprite];
|
int dx, dy, dz;
|
||||||
xvel[pSprite->index] = yvel[pSprite->index] = 0;
|
xvel[pSprite->index] = yvel[pSprite->index] = 0;
|
||||||
|
|
||||||
GENDUDEEXTRA* pExtra = genDudeExtra(pSprite);
|
GENDUDEEXTRA* pExtra = genDudeExtra(pSprite);
|
||||||
|
@ -226,7 +220,7 @@ void genDudeAttack1(int, int nXIndex) {
|
||||||
|
|
||||||
if (pExtra->weaponType == kGenDudeWeaponHitscan) {
|
if (pExtra->weaponType == kGenDudeWeaponHitscan) {
|
||||||
|
|
||||||
dx = CosScale16(pSprite->ang); dy = SinScale16(pSprite->ang); dz = gDudeSlope[nXIndex];
|
dx = CosScale16(pSprite->ang); dy = SinScale16(pSprite->ang); dz = actor->dudeSlope();
|
||||||
// dispersal modifiers here in case if non-melee enemy
|
// dispersal modifiers here in case if non-melee enemy
|
||||||
if (!dudeIsMelee(pXSprite)) {
|
if (!dudeIsMelee(pXSprite)) {
|
||||||
dx += Random3(dispersion); dy += Random3(dispersion); dz += Random3(dispersion);
|
dx += Random3(dispersion); dy += Random3(dispersion); dz += Random3(dispersion);
|
||||||
|
@ -241,7 +235,7 @@ void genDudeAttack1(int, int nXIndex) {
|
||||||
spritetype* pSpawned = NULL; int dist = pSprite->clipdist << 4;
|
spritetype* pSpawned = NULL; int dist = pSprite->clipdist << 4;
|
||||||
if (pExtra->slaveCount <= gGameOptions.nDifficulty) {
|
if (pExtra->slaveCount <= gGameOptions.nDifficulty) {
|
||||||
if ((pSpawned = actSpawnDude(pSprite, pExtra->curWeapon, dist + Random(dist), 0)) != NULL) {
|
if ((pSpawned = actSpawnDude(pSprite, pExtra->curWeapon, dist + Random(dist), 0)) != NULL) {
|
||||||
pSpawned->owner = nSprite;
|
pSpawned->owner = pSprite->index;
|
||||||
|
|
||||||
if (xspriRangeIsFine(pSpawned->extra)) {
|
if (xspriRangeIsFine(pSpawned->extra)) {
|
||||||
xsprite[pSpawned->extra].target = pXSprite->target;
|
xsprite[pSpawned->extra].target = pXSprite->target;
|
||||||
|
@ -258,7 +252,7 @@ void genDudeAttack1(int, int nXIndex) {
|
||||||
|
|
||||||
} else if (pExtra->weaponType == kGenDudeWeaponMissile) {
|
} else if (pExtra->weaponType == kGenDudeWeaponMissile) {
|
||||||
|
|
||||||
dx = CosScale16(pSprite->ang); dy = SinScale16(pSprite->ang); dz = gDudeSlope[nXIndex];
|
dx = CosScale16(pSprite->ang); dy = SinScale16(pSprite->ang); dz = actor->dudeSlope();
|
||||||
|
|
||||||
// dispersal modifiers here
|
// dispersal modifiers here
|
||||||
dx += Random3(dispersion); dy += Random3(dispersion); dz += Random3(dispersion >> 1);
|
dx += Random3(dispersion); dy += Random3(dispersion); dz += Random3(dispersion >> 1);
|
||||||
|
@ -269,16 +263,20 @@ void genDudeAttack1(int, int nXIndex) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThrowCallback1(int, int nXIndex) {
|
void ThrowCallback1(int, DBloodActor* actor)
|
||||||
ThrowThing(nXIndex, true);
|
{
|
||||||
|
ThrowThing(actor, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThrowCallback2(int, int nXIndex) {
|
void ThrowCallback2(int, DBloodActor* actor)
|
||||||
ThrowThing(nXIndex, false);
|
{
|
||||||
|
ThrowThing(actor, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ThrowThing(int nXIndex, bool impact) {
|
static void ThrowThing(DBloodActor* actor, bool impact)
|
||||||
XSPRITE* pXSprite = &xsprite[nXIndex]; spritetype* pSprite = &sprite[pXSprite->reference];
|
{
|
||||||
|
XSPRITE* pXSprite = &actor->x();
|
||||||
|
spritetype* pSprite = &actor->s();
|
||||||
|
|
||||||
if (!(pXSprite->target >= 0 && pXSprite->target < kMaxSprites))
|
if (!(pXSprite->target >= 0 && pXSprite->target < kMaxSprites))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -73,11 +73,10 @@ AISTATE zombie2Search = { kAiStateSearch, 8, -1, 1800, NULL, NULL, myThinkSearch
|
||||||
AISTATE zombieSIdle = { kAiStateIdle, 10, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
AISTATE zombieSIdle = { kAiStateIdle, 10, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||||
AISTATE zombie13AC2C = { kAiStateOther, 11, nStandClient, 0, entryEZombie, NULL, NULL, &zombieAPonder };
|
AISTATE zombie13AC2C = { kAiStateOther, 11, nStandClient, 0, entryEZombie, NULL, NULL, &zombieAPonder };
|
||||||
|
|
||||||
void HackSeqCallback(int, int nXSprite)
|
void HackSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
||||||
|
@ -93,11 +92,9 @@ void HackSeqCallback(int, int nXSprite)
|
||||||
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_10);
|
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StandSeqCallback(int, int nXSprite)
|
void StandSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
sfxPlay3DSound(&actor->s(), 1102, -1, 0);
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
sfxPlay3DSound(&sprite[nSprite], 1102, -1, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void zombaThinkSearch(DBloodActor* actor)
|
static void zombaThinkSearch(DBloodActor* actor)
|
||||||
|
|
|
@ -59,15 +59,10 @@ AISTATE zombieFSearch = { kAiStateSearch, 8, -1, 1800, NULL, aiMoveForward, zomb
|
||||||
AISTATE zombieFRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &zombieFChase };
|
AISTATE zombieFRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &zombieFChase };
|
||||||
AISTATE zombieFTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &zombieFChase };
|
AISTATE zombieFTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &zombieFChase };
|
||||||
|
|
||||||
void zombfHackSeqCallback(int, int nXSprite)
|
void zombfHackSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
if (nXSprite <= 0 || nXSprite >= kMaxXSprites)
|
XSPRITE* pXSprite = &actor->x();
|
||||||
return;
|
spritetype* pSprite = &actor->s();
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
if (nXSprite < 0 || nXSprite >= kMaxSprites)
|
|
||||||
return;
|
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
if (pSprite->type != kDudeZombieButcher)
|
if (pSprite->type != kDudeZombieButcher)
|
||||||
return;
|
return;
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
|
@ -78,11 +73,10 @@ void zombfHackSeqCallback(int, int nXSprite)
|
||||||
actFireVector(pSprite, 0, 0, CosScale16(pSprite->ang), SinScale16(pSprite->ang), height-height2, VECTOR_TYPE_11);
|
actFireVector(pSprite, 0, 0, CosScale16(pSprite->ang), SinScale16(pSprite->ang), height-height2, VECTOR_TYPE_11);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PukeSeqCallback(int, int nXSprite)
|
void PukeSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
int nSprite = pXSprite->reference;
|
spritetype* pSprite = &actor->s();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
spritetype *pTarget = &sprite[pXSprite->target];
|
spritetype *pTarget = &sprite[pXSprite->target];
|
||||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||||
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
||||||
|
@ -97,11 +91,9 @@ void PukeSeqCallback(int, int nXSprite)
|
||||||
actFireMissile(pSprite, 0, -(height-height2), dx, dy, 0, kMissilePukeGreen);
|
actFireMissile(pSprite, 0, -(height-height2), dx, dy, 0, kMissilePukeGreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThrowSeqCallback(int, int nXSprite)
|
void ThrowSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
spritetype* pSprite = &actor->s();
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
actFireMissile(pSprite, 0, -getDudeInfo(pSprite->type)->eyeHeight, CosScale16(pSprite->ang), SinScale16(pSprite->ang), 0, kMissileButcherKnife);
|
actFireMissile(pSprite, 0, -getDudeInfo(pSprite->type)->eyeHeight, CosScale16(pSprite->ang), SinScale16(pSprite->ang), 0, kMissileButcherKnife);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "gstrings.h"
|
#include "gstrings.h"
|
||||||
#include "gamestate.h"
|
#include "gamestate.h"
|
||||||
#include "automap.h"
|
#include "automap.h"
|
||||||
|
#include "bloodactor.h"
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
|
|
||||||
|
@ -2125,12 +2126,11 @@ void playerLandingSound(PLAYER *pPlayer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerSurvive(int, int nXSprite)
|
void PlayerSurvive(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
|
XSPRITE* pXSprite = &actor->x();
|
||||||
|
spritetype* pSprite = &actor->s();
|
||||||
char buffer[80];
|
char buffer[80];
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
actHealDude(pXSprite, 1, 2);
|
actHealDude(pXSprite, 1, 2);
|
||||||
if (gGameOptions.nGameType > 0 && numplayers > 1)
|
if (gGameOptions.nGameType > 0 && numplayers > 1)
|
||||||
{
|
{
|
||||||
|
@ -2150,9 +2150,9 @@ void PlayerSurvive(int, int nXSprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerKneelsOver(int, int nXSprite)
|
void PlayerKneelsOver(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE* pXSprite = &actor->x();
|
||||||
for (int p = connecthead; p >= 0; p = connectpoint2[p])
|
for (int p = connecthead; p >= 0; p = connectpoint2[p])
|
||||||
{
|
{
|
||||||
if (gPlayer[p].pXSprite == pXSprite)
|
if (gPlayer[p].pXSprite == pXSprite)
|
||||||
|
|
|
@ -279,7 +279,6 @@ int playerDamageSprite(int nSource, PLAYER *pPlayer, DAMAGE_TYPE nDamageType, in
|
||||||
int UseAmmo(PLAYER *pPlayer, int nAmmoType, int nDec);
|
int UseAmmo(PLAYER *pPlayer, int nAmmoType, int nDec);
|
||||||
void voodooTarget(PLAYER *pPlayer);
|
void voodooTarget(PLAYER *pPlayer);
|
||||||
void playerLandingSound(PLAYER *pPlayer);
|
void playerLandingSound(PLAYER *pPlayer);
|
||||||
void PlayerSurvive(int, int nXSprite);
|
void PlayerSurvive(int, DBloodActor*);
|
||||||
void PlayerKneelsOver(int, int nXSprite);
|
|
||||||
|
|
||||||
END_BLD_NS
|
END_BLD_NS
|
||||||
|
|
|
@ -42,6 +42,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "raze_sound.h"
|
#include "raze_sound.h"
|
||||||
#include "actor.h"
|
#include "actor.h"
|
||||||
#include "seq.h"
|
#include "seq.h"
|
||||||
|
#include "bloodactor.h"
|
||||||
|
|
||||||
|
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
|
@ -49,7 +50,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
|
|
||||||
static void (*seqClientCallback[])(int, int) = {
|
static void (*seqClientCallback[])(int, DBloodActor*) = {
|
||||||
FireballSeqCallback,
|
FireballSeqCallback,
|
||||||
sub_38938,
|
sub_38938,
|
||||||
NapalmSeqCallback,
|
NapalmSeqCallback,
|
||||||
|
@ -428,8 +429,14 @@ void SEQINST::Update()
|
||||||
UpdateMasked(index, &pSequence->frames[frameIndex]);
|
UpdateMasked(index, &pSequence->frames[frameIndex]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// all seq callbacks are for sprites, but there's no sanity checks here that what gets passed is meant to be for a sprite...
|
||||||
if (pSequence->frames[frameIndex].trigger && callback != -1)
|
if (pSequence->frames[frameIndex].trigger && callback != -1)
|
||||||
seqClientCallback[callback](type, index);
|
{
|
||||||
|
assert(type == 3);
|
||||||
|
seqClientCallback[callback](type, &bloodActors[xsprite[index].reference]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
|
@ -2,64 +2,65 @@
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
|
|
||||||
void FireballSeqCallback(int, int);
|
class DBloodActor;
|
||||||
void sub_38938(int, int);
|
void FireballSeqCallback(int, DBloodActor*);
|
||||||
void NapalmSeqCallback(int, int);
|
void sub_38938(int, DBloodActor*);
|
||||||
void sub_3888C(int, int);
|
void NapalmSeqCallback(int, DBloodActor*);
|
||||||
void TreeToGibCallback(int, int);
|
void sub_3888C(int, DBloodActor*);
|
||||||
void DudeToGibCallback1(int, int);
|
void TreeToGibCallback(int, DBloodActor*);
|
||||||
void DudeToGibCallback2(int, int);
|
void DudeToGibCallback1(int, DBloodActor*);
|
||||||
void batBiteSeqCallback(int, int);
|
void DudeToGibCallback2(int, DBloodActor*);
|
||||||
void SlashSeqCallback(int, int);
|
void batBiteSeqCallback(int, DBloodActor*);
|
||||||
void StompSeqCallback(int, int);
|
void SlashSeqCallback(int, DBloodActor*);
|
||||||
void eelBiteSeqCallback(int, int);
|
void StompSeqCallback(int, DBloodActor*);
|
||||||
void BurnSeqCallback(int, int);
|
void eelBiteSeqCallback(int, DBloodActor*);
|
||||||
void SeqAttackCallback(int, int);
|
void BurnSeqCallback(int, DBloodActor*);
|
||||||
void cerberusBiteSeqCallback(int, int);
|
void SeqAttackCallback(int, DBloodActor*);
|
||||||
void cerberusBurnSeqCallback(int, int);
|
void cerberusBiteSeqCallback(int, DBloodActor*);
|
||||||
void cerberusBurnSeqCallback2(int, int);
|
void cerberusBurnSeqCallback(int, DBloodActor*);
|
||||||
void TommySeqCallback(int, int);
|
void cerberusBurnSeqCallback2(int, DBloodActor*);
|
||||||
void TeslaSeqCallback(int, int);
|
void TommySeqCallback(int, DBloodActor*);
|
||||||
void ShotSeqCallback(int, int);
|
void TeslaSeqCallback(int, DBloodActor*);
|
||||||
void cultThrowSeqCallback(int, int);
|
void ShotSeqCallback(int, DBloodActor*);
|
||||||
void sub_68170(int, int);
|
void cultThrowSeqCallback(int, DBloodActor*);
|
||||||
void sub_68230(int, int);
|
void sub_68170(int, DBloodActor*);
|
||||||
void SlashFSeqCallback(int, int);
|
void sub_68230(int, DBloodActor*);
|
||||||
void ThrowFSeqCallback(int, int);
|
void SlashFSeqCallback(int, DBloodActor*);
|
||||||
void BlastSSeqCallback(int, int);
|
void ThrowFSeqCallback(int, DBloodActor*);
|
||||||
void ThrowSSeqCallback(int, int);
|
void BlastSSeqCallback(int, DBloodActor*);
|
||||||
void ghostSlashSeqCallback(int, int);
|
void ThrowSSeqCallback(int, DBloodActor*);
|
||||||
void ghostThrowSeqCallback(int, int);
|
void ghostSlashSeqCallback(int, DBloodActor*);
|
||||||
void ghostBlastSeqCallback(int, int);
|
void ghostThrowSeqCallback(int, DBloodActor*);
|
||||||
void GillBiteSeqCallback(int, int);
|
void ghostBlastSeqCallback(int, DBloodActor*);
|
||||||
void HandJumpSeqCallback(int, int);
|
void GillBiteSeqCallback(int, DBloodActor*);
|
||||||
void houndBiteSeqCallback(int, int);
|
void HandJumpSeqCallback(int, DBloodActor*);
|
||||||
void houndBurnSeqCallback(int, int);
|
void houndBiteSeqCallback(int, DBloodActor*);
|
||||||
void sub_6FF08(int, int);
|
void houndBurnSeqCallback(int, DBloodActor*);
|
||||||
void sub_6FF54(int, int);
|
void sub_6FF08(int, DBloodActor*);
|
||||||
void podAttack(int, int);
|
void sub_6FF54(int, DBloodActor*);
|
||||||
void sub_70284(int, int);
|
void podAttack(int, DBloodActor*);
|
||||||
void ratBiteSeqCallback(int, int);
|
void sub_70284(int, DBloodActor*);
|
||||||
void SpidBiteSeqCallback(int, int);
|
void ratBiteSeqCallback(int, DBloodActor*);
|
||||||
void SpidJumpSeqCallback(int, int);
|
void SpidBiteSeqCallback(int, DBloodActor*);
|
||||||
void sub_71370(int, int);
|
void SpidJumpSeqCallback(int, DBloodActor*);
|
||||||
void sub_71A90(int, int);
|
void sub_71370(int, DBloodActor*);
|
||||||
void sub_71BD4(int, int);
|
void sub_71A90(int, DBloodActor*);
|
||||||
void sub_720AC(int, int);
|
void sub_71BD4(int, DBloodActor*);
|
||||||
void genDudeAttack1(int, int);
|
void sub_720AC(int, DBloodActor*);
|
||||||
void punchCallback(int, int);
|
void genDudeAttack1(int, DBloodActor*);
|
||||||
void ThrowCallback1(int, int);
|
void punchCallback(int, DBloodActor*);
|
||||||
void ThrowCallback2(int, int);
|
void ThrowCallback1(int, DBloodActor*);
|
||||||
void HackSeqCallback(int, int);
|
void ThrowCallback2(int, DBloodActor*);
|
||||||
void StandSeqCallback(int, int);
|
void HackSeqCallback(int, DBloodActor*);
|
||||||
void zombfHackSeqCallback(int, int);
|
void StandSeqCallback(int, DBloodActor*);
|
||||||
void PukeSeqCallback(int, int);
|
void zombfHackSeqCallback(int, DBloodActor*);
|
||||||
void ThrowSeqCallback(int, int);
|
void PukeSeqCallback(int, DBloodActor*);
|
||||||
void PlayerSurvive(int, int);
|
void ThrowSeqCallback(int, DBloodActor*);
|
||||||
void PlayerKneelsOver(int, int);
|
void PlayerSurvive(int, DBloodActor*);
|
||||||
void FireballTrapSeqCallback(int, int);
|
void PlayerKneelsOver(int, DBloodActor*);
|
||||||
void MGunFireSeqCallback(int, int);
|
void FireballTrapSeqCallback(int, DBloodActor*);
|
||||||
void MGunOpenSeqCallback(int, int);
|
void MGunFireSeqCallback(int, DBloodActor*);
|
||||||
|
void MGunOpenSeqCallback(int, DBloodActor*);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -2259,7 +2259,7 @@ void ActivateGenerator(int nSprite)
|
||||||
case kGenMissileFireball:
|
case kGenMissileFireball:
|
||||||
switch (pXSprite->data2) {
|
switch (pXSprite->data2) {
|
||||||
case 0:
|
case 0:
|
||||||
FireballTrapSeqCallback(3, nXSprite);
|
FireballTrapSeqCallback(3, &bloodActors[nSprite]);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
seqSpawn(35, 3, nXSprite, nFireballTrapClient);
|
seqSpawn(35, 3, nXSprite, nFireballTrapClient);
|
||||||
|
@ -2281,11 +2281,9 @@ void ActivateGenerator(int nSprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FireballTrapSeqCallback(int, int nXSprite)
|
void FireballTrapSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
spritetype* pSprite = &actor->s();
|
||||||
int nSprite = pXSprite->reference;
|
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
|
||||||
if (pSprite->cstat&32)
|
if (pSprite->cstat&32)
|
||||||
actFireMissile(pSprite, 0, 0, 0, 0, (pSprite->cstat&8) ? 0x4000 : -0x4000, kMissileFireball);
|
actFireMissile(pSprite, 0, 0, 0, 0, (pSprite->cstat&8) ? 0x4000 : -0x4000, kMissileFireball);
|
||||||
else
|
else
|
||||||
|
@ -2293,18 +2291,17 @@ void FireballTrapSeqCallback(int, int nXSprite)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MGunFireSeqCallback(int, int nXSprite)
|
void MGunFireSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
int nSprite = xsprite[nXSprite].reference;
|
XSPRITE* pXSprite = &actor->x();
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype* pSprite = &actor->s();
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
|
||||||
if (pXSprite->data2 > 0 || pXSprite->data1 == 0)
|
if (pXSprite->data2 > 0 || pXSprite->data1 == 0)
|
||||||
{
|
{
|
||||||
if (pXSprite->data2 > 0)
|
if (pXSprite->data2 > 0)
|
||||||
{
|
{
|
||||||
pXSprite->data2--;
|
pXSprite->data2--;
|
||||||
if (pXSprite->data2 == 0)
|
if (pXSprite->data2 == 0)
|
||||||
evPost(nSprite, 3, 1, kCmdOff);
|
evPost(pXSprite->reference, 3, 1, kCmdOff);
|
||||||
}
|
}
|
||||||
int dx = CosScale16(pSprite->ang)+Random2(1000);
|
int dx = CosScale16(pSprite->ang)+Random2(1000);
|
||||||
int dy = SinScale16(pSprite->ang)+Random2(1000);
|
int dy = SinScale16(pSprite->ang)+Random2(1000);
|
||||||
|
@ -2314,9 +2311,9 @@ void MGunFireSeqCallback(int, int nXSprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MGunOpenSeqCallback(int, int nXSprite)
|
void MGunOpenSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
seqSpawn(39, 3, nXSprite, nMGunFireClient);
|
seqSpawn(39, 3, actor->s().extra, nMGunFireClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue