mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Hoikas' fix for crash when triggering missing animation
https://github.com/H-uru/Plasma/pull/103
This commit is contained in:
@ -424,6 +424,14 @@ bool plAnimStage::IMoveBackward(double time, float delta, float &overrun, plArma
|
|||||||
bool infiniteLoop = fLoops == -1;
|
bool infiniteLoop = fLoops == -1;
|
||||||
bool loopsRemain = fCurLoop > 0 || infiniteLoop;
|
bool loopsRemain = fCurLoop > 0 || infiniteLoop;
|
||||||
|
|
||||||
|
// If we don't have this animation, just pretend to have worked.
|
||||||
|
// Otherwise, we crash the client.
|
||||||
|
if (!fAnimInstance)
|
||||||
|
{
|
||||||
|
hsAssert(false, "AnimInstance nil");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// This must be here before we set the local time.
|
// This must be here before we set the local time.
|
||||||
if (fAnimInstance->GetTimeConvert())
|
if (fAnimInstance->GetTimeConvert())
|
||||||
fAnimInstance->GetTimeConvert()->Backwards();
|
fAnimInstance->GetTimeConvert()->Backwards();
|
||||||
@ -476,6 +484,14 @@ bool plAnimStage::IMoveForward(double time, float delta, float &overrun, plArmat
|
|||||||
// first get the target time in local time, ignoring overruns
|
// first get the target time in local time, ignoring overruns
|
||||||
float target = fLocalTime + delta;
|
float target = fLocalTime + delta;
|
||||||
|
|
||||||
|
// If we don't have this animation, just pretend to have worked.
|
||||||
|
// Otherwise, we crash the client.
|
||||||
|
if (!fAnimInstance)
|
||||||
|
{
|
||||||
|
hsAssert(false, "AnimInstance nil");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (fAnimInstance->GetTimeConvert())
|
if (fAnimInstance->GetTimeConvert())
|
||||||
fAnimInstance->GetTimeConvert()->Forewards();
|
fAnimInstance->GetTimeConvert()->Forewards();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user