mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
Renamed untitled spider functions
This commit is contained in:
parent
cd53e4c966
commit
1f6181fa99
5 changed files with 18 additions and 21 deletions
|
@ -42,25 +42,22 @@ AISTATE spidGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, spidThinkGot
|
|||
AISTATE spidSearch = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, spidThinkSearch, &spidIdle };
|
||||
AISTATE spidBite = { kAiStateChase, 6, nSpidBiteClient, 60, NULL, NULL, NULL, &spidChase };
|
||||
AISTATE spidJump = { kAiStateChase, 8, nSpidJumpClient, 60, NULL, aiMoveForward, NULL, &spidChase };
|
||||
AISTATE spid13A92C = { kAiStateOther, 0, dword_279B50, 60, NULL, NULL, NULL, &spidIdle };
|
||||
AISTATE spidBirth = { kAiStateOther, 0, nSpidBirthClient, 60, NULL, NULL, NULL, &spidIdle };
|
||||
|
||||
static char sub_70D30(XSPRITE *pXDude, int a2, int a3)
|
||||
static char SpidPoisonTarget(XSPRITE *pXDude, int nBlind, int max)
|
||||
{
|
||||
assert(pXDude != NULL);
|
||||
int nDude = pXDude->reference;
|
||||
spritetype *pDude = &sprite[nDude];
|
||||
if (IsPlayerSprite(pDude))
|
||||
{
|
||||
a2 <<= 4;
|
||||
a3 <<= 4;
|
||||
if (IsPlayerSprite(pDude))
|
||||
nBlind <<= 4;
|
||||
max <<= 4;
|
||||
PLAYER *pPlayer = &gPlayer[pDude->type-kDudePlayer1];
|
||||
if (pPlayer->blindEffect < max)
|
||||
{
|
||||
PLAYER *pPlayer = &gPlayer[pDude->type-kDudePlayer1];
|
||||
if (a3 > pPlayer->blindEffect)
|
||||
{
|
||||
pPlayer->blindEffect = ClipHigh(pPlayer->blindEffect+a2, a3);
|
||||
return 1;
|
||||
}
|
||||
pPlayer->blindEffect = ClipHigh(pPlayer->blindEffect+nBlind, max);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -93,11 +90,11 @@ void SpidBiteSeqCallback(int, DBloodActor* actor)
|
|||
break;
|
||||
case kDudeSpiderRed:
|
||||
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
||||
if (Chance(0x5000)) sub_70D30(pXTarget, 4, 16);
|
||||
if (Chance(0x5000)) SpidPoisonTarget(pXTarget, 4, 16);
|
||||
break;
|
||||
case kDudeSpiderBlack:
|
||||
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
||||
sub_70D30(pXTarget, 8, 16);
|
||||
SpidPoisonTarget(pXTarget, 8, 16);
|
||||
break;
|
||||
case kDudeSpiderMother: {
|
||||
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
||||
|
@ -106,7 +103,7 @@ void SpidBiteSeqCallback(int, DBloodActor* actor)
|
|||
dy += Random2(2000);
|
||||
dz += Random2(2000);
|
||||
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
||||
sub_70D30(pXTarget, 8, 16);
|
||||
SpidPoisonTarget(pXTarget, 8, 16);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -141,7 +138,7 @@ void SpidJumpSeqCallback(int, DBloodActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
void sub_71370(int, DBloodActor* actor)
|
||||
void SpidBirthSeqCallback(int, DBloodActor* actor)
|
||||
{
|
||||
XSPRITE* pXSprite = &actor->x();
|
||||
spritetype* pSprite = &actor->s();
|
||||
|
@ -249,7 +246,7 @@ static void spidThinkChase(DBloodActor* actor)
|
|||
if (nDist < 0x733 && nDist > 0x399 && abs(nDeltaAngle) < 85)
|
||||
aiNewState(actor, &spidJump);
|
||||
else if (Chance(0x8000))
|
||||
aiNewState(actor, &spid13A92C);
|
||||
aiNewState(actor, &spidBirth);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ extern AISTATE spidGoto;
|
|||
extern AISTATE spidSearch;
|
||||
extern AISTATE spidBite;
|
||||
extern AISTATE spidJump;
|
||||
extern AISTATE spid13A92C;
|
||||
extern AISTATE spidBirth;
|
||||
|
||||
extern AISTATE tchernobogIdle;
|
||||
extern AISTATE tchernobogSearch;
|
||||
|
|
|
@ -318,7 +318,7 @@ static AISTATE* allAIStates[] =
|
|||
&spidSearch,
|
||||
&spidBite,
|
||||
&spidJump,
|
||||
&spid13A92C,
|
||||
&spidBirth,
|
||||
&tchernobogIdle,
|
||||
&tchernobogSearch,
|
||||
&tchernobogChase,
|
||||
|
|
|
@ -75,7 +75,7 @@ static void (*seqClientCallback[])(int, DBloodActor*) = {
|
|||
ratBiteSeqCallback,
|
||||
SpidBiteSeqCallback,
|
||||
SpidJumpSeqCallback,
|
||||
sub_71370,
|
||||
SpidBirthSeqCallback,
|
||||
sub_71BD4,
|
||||
sub_720AC,
|
||||
sub_71A90,
|
||||
|
|
|
@ -43,7 +43,7 @@ void sub_70284(int, DBloodActor*);
|
|||
void ratBiteSeqCallback(int, DBloodActor*);
|
||||
void SpidBiteSeqCallback(int, DBloodActor*);
|
||||
void SpidJumpSeqCallback(int, DBloodActor*);
|
||||
void sub_71370(int, DBloodActor*);
|
||||
void SpidBirthSeqCallback(int, DBloodActor*);
|
||||
void sub_71A90(int, DBloodActor*);
|
||||
void sub_71BD4(int, DBloodActor*);
|
||||
void sub_720AC(int, DBloodActor*);
|
||||
|
@ -104,7 +104,7 @@ enum
|
|||
nRatBiteClient,
|
||||
nSpidBiteClient,
|
||||
nSpidJumpClient,
|
||||
dword_279B50,
|
||||
nSpidBirthClient,
|
||||
dword_279B54,
|
||||
dword_279B58,
|
||||
dword_279B5C,
|
||||
|
|
Loading…
Reference in a new issue