Skip to content

Commit

Permalink
Various fixes to crow's class by Sin!
Browse files Browse the repository at this point in the history
  • Loading branch information
ShokerStlk authored and Xottab-DUTY committed Jan 14, 2018
1 parent ec379b7 commit 7b10da4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/xrGame/ai/crow/ai_crow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,17 @@ BOOL CAI_Crow::net_Spawn(CSE_Abstract* DC)

if (GetfHealth() > 0)
{
st_current = eFlyIdle;
st_target = eFlyIdle;
st_current = ECrowStates::eFlyIdle;
st_target = ECrowStates::eFlyIdle;

// disable UpdateCL, enable only on HIT
processing_deactivate();
}
else
{
st_current = eDeathFall;
st_target = eDeathDead;
st_current = ECrowStates::eDeathFall;
st_target = ECrowStates::eDeathDead;

// Crow is already dead, need to enable physics
processing_activate();
CreateSkeleton();
Expand Down Expand Up @@ -310,7 +312,7 @@ void CAI_Crow::UpdateCL()
}
void CAI_Crow::renderable_Render()
{
UpdateWorkload(Device.fTimeDelta);
UpdateWorkload(Device.fTimeDelta * (Device.dwFrame - o_workload_frame));
inherited::renderable_Render();
o_workload_rframe = Device.dwFrame;
}
Expand Down Expand Up @@ -370,7 +372,7 @@ void CAI_Crow::shedule_Update(u32 DT)
m_Sounds.m_idle.SetPosition(Position());

// work
if (o_workload_rframe == (Device.dwFrame - 1))
if (o_workload_rframe >= (Device.dwFrame - 2))
;
else
UpdateWorkload(fDT);
Expand Down

0 comments on commit 7b10da4

Please sign in to comment.