mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-02 09:47:58 +03:00
Fixed baddy state 0
This commit is contained in:
parent
3da38df713
commit
adf51a567c
2 changed files with 69 additions and 60 deletions
|
@ -534,7 +534,7 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode)
|
|||
} while (SmashedMeshCount != 0);
|
||||
}
|
||||
|
||||
PHD_VECTOR src = { 1024,-512,1024 };
|
||||
/*PHD_VECTOR src = { 1024,-512,1024 };
|
||||
PHD_VECTOR dest = { 4096,-1024,4096 };
|
||||
|
||||
byte b = (GetRandomControl() & 0x1F) + 224 - (GetRandomControl() & 0x3F);
|
||||
|
@ -562,7 +562,7 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode)
|
|||
1,
|
||||
32,
|
||||
5);
|
||||
}
|
||||
}*/
|
||||
|
||||
UpdateSparks();
|
||||
UpdateFireSparks();
|
||||
|
|
|
@ -524,21 +524,28 @@ void BaddyControl(short itemNum)
|
|||
|
||||
//currentCreature->enemy = LaraItem;
|
||||
|
||||
//ITEM_INFO* oldEnemy = creature->enemy;
|
||||
//creature->enemy = LaraItem;
|
||||
|
||||
// Is baddy alerted?
|
||||
if (item->hitStatus
|
||||
|| laraInfo.distance < SQUARE(1024)
|
||||
|| TargetVisible(item, &laraInfo) && abs(LaraItem->pos.yPos - item->pos.yPos) < STEP_SIZE * 4)
|
||||
|| TargetVisible(item, &laraInfo)
|
||||
&& abs(LaraItem->pos.yPos - item->pos.yPos) < STEP_SIZE * 4)
|
||||
{
|
||||
currentCreature->alerted = true;
|
||||
}
|
||||
|
||||
if (item != Lara.target || laraInfo.distance <= 942 ||
|
||||
laraInfo.angle <= -ANGLE(56.25f) || laraInfo.angle >= ANGLE(56.25f))
|
||||
if (item != Lara.target
|
||||
|| laraInfo.distance <= 942
|
||||
|| laraInfo.angle <= -ANGLE(56.25f)
|
||||
|| laraInfo.angle >= ANGLE(56.25f))
|
||||
{
|
||||
roll = false;
|
||||
jump = false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
dx = 942 * phd_sin(item->pos.yRot + ANGLE(45));
|
||||
dz = 942 * phd_cos(item->pos.yRot + ANGLE(45));
|
||||
|
||||
|
@ -601,6 +608,7 @@ void BaddyControl(short itemNum)
|
|||
{
|
||||
roll = true;
|
||||
}
|
||||
}
|
||||
|
||||
switch (item->currentAnimState)
|
||||
{
|
||||
|
@ -610,7 +618,7 @@ void BaddyControl(short itemNum)
|
|||
currentCreature->flags = 0;
|
||||
currentCreature->maximumTurn = 0;
|
||||
joint3 = info.angle / 2;
|
||||
if (info.ahead && item->aiBits & FOLLOW)
|
||||
if (info.ahead && item->aiBits != GUARD)
|
||||
{
|
||||
joint1 = info.angle / 2;
|
||||
joint2 = info.xAngle;
|
||||
|
@ -646,7 +654,7 @@ void BaddyControl(short itemNum)
|
|||
break;
|
||||
}
|
||||
|
||||
item->goalAnimState = STATE_BADDY_STOP;
|
||||
item->goalAnimState = STATE_BADDY_HOLSTER_SWORD;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -737,7 +745,7 @@ void BaddyControl(short itemNum)
|
|||
{
|
||||
item->goalAnimState = STATE_BADDY_HOLSTER_GUN;
|
||||
}
|
||||
else if (info.distance >= 0x40000)
|
||||
else if (info.distance >= SQUARE(512))
|
||||
{
|
||||
item->goalAnimState = STATE_BADDY_SWORD_HIT_FRONT;
|
||||
}
|
||||
|
@ -752,6 +760,7 @@ void BaddyControl(short itemNum)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
item->goalAnimState = STATE_BADDY_WALK;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue