Skip to content

Commit 7b10da4

Browse files
ShokerStlkXottab-DUTY
authored andcommitted
Various fixes to crow's class by Sin!
1 parent ec379b7 commit 7b10da4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/xrGame/ai/crow/ai_crow.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,17 @@ BOOL CAI_Crow::net_Spawn(CSE_Abstract* DC)
150150

151151
if (GetfHealth() > 0)
152152
{
153-
st_current = eFlyIdle;
154-
st_target = eFlyIdle;
153+
st_current = ECrowStates::eFlyIdle;
154+
st_target = ECrowStates::eFlyIdle;
155+
155156
// disable UpdateCL, enable only on HIT
156157
processing_deactivate();
157158
}
158159
else
159160
{
160-
st_current = eDeathFall;
161-
st_target = eDeathDead;
161+
st_current = ECrowStates::eDeathFall;
162+
st_target = ECrowStates::eDeathDead;
163+
162164
// Crow is already dead, need to enable physics
163165
processing_activate();
164166
CreateSkeleton();
@@ -310,7 +312,7 @@ void CAI_Crow::UpdateCL()
310312
}
311313
void CAI_Crow::renderable_Render()
312314
{
313-
UpdateWorkload(Device.fTimeDelta);
315+
UpdateWorkload(Device.fTimeDelta * (Device.dwFrame - o_workload_frame));
314316
inherited::renderable_Render();
315317
o_workload_rframe = Device.dwFrame;
316318
}
@@ -370,7 +372,7 @@ void CAI_Crow::shedule_Update(u32 DT)
370372
m_Sounds.m_idle.SetPosition(Position());
371373

372374
// work
373-
if (o_workload_rframe == (Device.dwFrame - 1))
375+
if (o_workload_rframe >= (Device.dwFrame - 2))
374376
;
375377
else
376378
UpdateWorkload(fDT);

0 commit comments

Comments
 (0)