mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 20:00:49 +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,27 +42,24 @@ AISTATE spidGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, spidThinkGot
|
||||||
AISTATE spidSearch = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, spidThinkSearch, &spidIdle };
|
AISTATE spidSearch = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, spidThinkSearch, &spidIdle };
|
||||||
AISTATE spidBite = { kAiStateChase, 6, nSpidBiteClient, 60, NULL, NULL, NULL, &spidChase };
|
AISTATE spidBite = { kAiStateChase, 6, nSpidBiteClient, 60, NULL, NULL, NULL, &spidChase };
|
||||||
AISTATE spidJump = { kAiStateChase, 8, nSpidJumpClient, 60, NULL, aiMoveForward, 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);
|
assert(pXDude != NULL);
|
||||||
int nDude = pXDude->reference;
|
int nDude = pXDude->reference;
|
||||||
spritetype *pDude = &sprite[nDude];
|
spritetype *pDude = &sprite[nDude];
|
||||||
if (IsPlayerSprite(pDude))
|
if (IsPlayerSprite(pDude))
|
||||||
{
|
{
|
||||||
a2 <<= 4;
|
nBlind <<= 4;
|
||||||
a3 <<= 4;
|
max <<= 4;
|
||||||
if (IsPlayerSprite(pDude))
|
|
||||||
{
|
|
||||||
PLAYER *pPlayer = &gPlayer[pDude->type-kDudePlayer1];
|
PLAYER *pPlayer = &gPlayer[pDude->type-kDudePlayer1];
|
||||||
if (a3 > pPlayer->blindEffect)
|
if (pPlayer->blindEffect < max)
|
||||||
{
|
{
|
||||||
pPlayer->blindEffect = ClipHigh(pPlayer->blindEffect+a2, a3);
|
pPlayer->blindEffect = ClipHigh(pPlayer->blindEffect+nBlind, max);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,11 +90,11 @@ void SpidBiteSeqCallback(int, DBloodActor* actor)
|
||||||
break;
|
break;
|
||||||
case kDudeSpiderRed:
|
case kDudeSpiderRed:
|
||||||
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
||||||
if (Chance(0x5000)) sub_70D30(pXTarget, 4, 16);
|
if (Chance(0x5000)) SpidPoisonTarget(pXTarget, 4, 16);
|
||||||
break;
|
break;
|
||||||
case kDudeSpiderBlack:
|
case kDudeSpiderBlack:
|
||||||
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
||||||
sub_70D30(pXTarget, 8, 16);
|
SpidPoisonTarget(pXTarget, 8, 16);
|
||||||
break;
|
break;
|
||||||
case kDudeSpiderMother: {
|
case kDudeSpiderMother: {
|
||||||
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
||||||
|
@ -106,7 +103,7 @@ void SpidBiteSeqCallback(int, DBloodActor* actor)
|
||||||
dy += Random2(2000);
|
dy += Random2(2000);
|
||||||
dz += Random2(2000);
|
dz += Random2(2000);
|
||||||
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
|
||||||
sub_70D30(pXTarget, 8, 16);
|
SpidPoisonTarget(pXTarget, 8, 16);
|
||||||
}
|
}
|
||||||
break;
|
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();
|
XSPRITE* pXSprite = &actor->x();
|
||||||
spritetype* pSprite = &actor->s();
|
spritetype* pSprite = &actor->s();
|
||||||
|
@ -249,7 +246,7 @@ static void spidThinkChase(DBloodActor* actor)
|
||||||
if (nDist < 0x733 && nDist > 0x399 && abs(nDeltaAngle) < 85)
|
if (nDist < 0x733 && nDist > 0x399 && abs(nDeltaAngle) < 85)
|
||||||
aiNewState(actor, &spidJump);
|
aiNewState(actor, &spidJump);
|
||||||
else if (Chance(0x8000))
|
else if (Chance(0x8000))
|
||||||
aiNewState(actor, &spid13A92C);
|
aiNewState(actor, &spidBirth);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@ extern AISTATE spidGoto;
|
||||||
extern AISTATE spidSearch;
|
extern AISTATE spidSearch;
|
||||||
extern AISTATE spidBite;
|
extern AISTATE spidBite;
|
||||||
extern AISTATE spidJump;
|
extern AISTATE spidJump;
|
||||||
extern AISTATE spid13A92C;
|
extern AISTATE spidBirth;
|
||||||
|
|
||||||
extern AISTATE tchernobogIdle;
|
extern AISTATE tchernobogIdle;
|
||||||
extern AISTATE tchernobogSearch;
|
extern AISTATE tchernobogSearch;
|
||||||
|
|
|
@ -318,7 +318,7 @@ static AISTATE* allAIStates[] =
|
||||||
&spidSearch,
|
&spidSearch,
|
||||||
&spidBite,
|
&spidBite,
|
||||||
&spidJump,
|
&spidJump,
|
||||||
&spid13A92C,
|
&spidBirth,
|
||||||
&tchernobogIdle,
|
&tchernobogIdle,
|
||||||
&tchernobogSearch,
|
&tchernobogSearch,
|
||||||
&tchernobogChase,
|
&tchernobogChase,
|
||||||
|
|
|
@ -75,7 +75,7 @@ static void (*seqClientCallback[])(int, DBloodActor*) = {
|
||||||
ratBiteSeqCallback,
|
ratBiteSeqCallback,
|
||||||
SpidBiteSeqCallback,
|
SpidBiteSeqCallback,
|
||||||
SpidJumpSeqCallback,
|
SpidJumpSeqCallback,
|
||||||
sub_71370,
|
SpidBirthSeqCallback,
|
||||||
sub_71BD4,
|
sub_71BD4,
|
||||||
sub_720AC,
|
sub_720AC,
|
||||||
sub_71A90,
|
sub_71A90,
|
||||||
|
|
|
@ -43,7 +43,7 @@ void sub_70284(int, DBloodActor*);
|
||||||
void ratBiteSeqCallback(int, DBloodActor*);
|
void ratBiteSeqCallback(int, DBloodActor*);
|
||||||
void SpidBiteSeqCallback(int, DBloodActor*);
|
void SpidBiteSeqCallback(int, DBloodActor*);
|
||||||
void SpidJumpSeqCallback(int, DBloodActor*);
|
void SpidJumpSeqCallback(int, DBloodActor*);
|
||||||
void sub_71370(int, DBloodActor*);
|
void SpidBirthSeqCallback(int, DBloodActor*);
|
||||||
void sub_71A90(int, DBloodActor*);
|
void sub_71A90(int, DBloodActor*);
|
||||||
void sub_71BD4(int, DBloodActor*);
|
void sub_71BD4(int, DBloodActor*);
|
||||||
void sub_720AC(int, DBloodActor*);
|
void sub_720AC(int, DBloodActor*);
|
||||||
|
@ -104,7 +104,7 @@ enum
|
||||||
nRatBiteClient,
|
nRatBiteClient,
|
||||||
nSpidBiteClient,
|
nSpidBiteClient,
|
||||||
nSpidJumpClient,
|
nSpidJumpClient,
|
||||||
dword_279B50,
|
nSpidBirthClient,
|
||||||
dword_279B54,
|
dword_279B54,
|
||||||
dword_279B58,
|
dword_279B58,
|
||||||
dword_279B5C,
|
dword_279B5C,
|
||||||
|
|
Loading…
Reference in a new issue