You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voidCOsprey::Update()
{
//Look around so AI triggers work.Look(4092);
//Listen for sounds so AI triggers work.Listen();
ShowDamage();
FCheckAITrigger();
}
intCOsprey::TakeDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType)
{
//Set enemy to last attacker.//Ospreys are not capable of fighting so they'll get angry at whatever shoots at them, not whatever looks like an enemy.
m_hEnemy = Instance(pevAttacker);
//It's on now!
m_MonsterState = MONSTERSTATE_COMBAT;
returnCBaseMonster::TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType);
}
These changes have the following effects:
Setting max_health enables the 50% damage condition to work properly.
Setting deadflag to DEAD_DYING enables the Death condition to work properly.
The Update method handles showing damage, and now looks around the level which updates condition bits that track whether the Osprey can see enemies or not, which handles the See player * conditions. The look distance is the same as that of the Apache, and covers virtually the entire level. It also listens for sounds, which handles the Hear * conditions. Finally, it evaluates the condition to see if it needs firing.
TakeDamage stores off the last attacker as the Osprey's enemy so the See Player, Mad at player condition works properly. It also sets the Osprey's state to combat so the See Player, not in combat condition works properly.
The text was updated successfully, but these errors were encountered:
SamVanheer
added a commit
to twhl-community/halflife-op4-updated
that referenced
this issue
Mar 15, 2022
The Osprey doesn't fire its trigger targets, which are targets fired when a specific NPC condition is met such as taking damage, dying, etc.
To fix this, apply the following changes:
Uncomment this line:
halflife/dlls/osprey.cpp
Line 67 in c7240b9
After this line:
halflife/dlls/osprey.cpp
Line 69 in c7240b9
Add this:
After this line:
halflife/dlls/osprey.cpp
Line 160 in c7240b9
Add:
Replace these lines:
halflife/dlls/osprey.cpp
Line 344 in c7240b9
halflife/dlls/osprey.cpp
Line 408 in c7240b9
halflife/dlls/osprey.cpp
Line 554 in c7240b9
With:
Update();
After this line:
halflife/dlls/osprey.cpp
Line 525 in c7240b9
Add this:
After this line:
halflife/dlls/osprey.cpp
Line 764 in c7240b9
Add this:
These changes have the following effects:
max_health
enables the50% damage
condition to work properly.deadflag
toDEAD_DYING
enables theDeath
condition to work properly.Update
method handles showing damage, and now looks around the level which updates condition bits that track whether the Osprey can see enemies or not, which handles theSee player *
conditions. The look distance is the same as that of the Apache, and covers virtually the entire level. It also listens for sounds, which handles theHear *
conditions. Finally, it evaluates the condition to see if it needs firing.TakeDamage
stores off the last attacker as the Osprey's enemy so theSee Player, Mad at player
condition works properly. It also sets the Osprey's state to combat so theSee Player, not in combat
condition works properly.The text was updated successfully, but these errors were encountered: