mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 00:36:41 +00:00
[Client] Fix crash caused by setting instant state for null localCast
This commit is contained in:
parent
5a46b40e1a
commit
a385fcdd87
1 changed files with 4 additions and 11 deletions
|
@ -1195,6 +1195,10 @@ bool CharacterController::updateCreatureState()
|
|||
localCast->spellId = spellid;
|
||||
localCast->pressed = true;
|
||||
localCast->shouldSend = true;
|
||||
|
||||
// Mark the attack as instant if there is no spellcast animation
|
||||
if (!mAnimation->hasAnimation("spellcast"))
|
||||
localCast->instant = true;
|
||||
}
|
||||
/*
|
||||
End of tes3mp addition
|
||||
|
@ -1203,17 +1207,6 @@ bool CharacterController::updateCreatureState()
|
|||
MWMechanics::CastSpell cast(mPtr, nullptr, false, mCastingManualSpell);
|
||||
cast.playSpellCastingEffects(spellid, false);
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Mark the attack as instant if there is no spellcast animation
|
||||
*/
|
||||
if (!mAnimation->hasAnimation("spellcast"))
|
||||
localCast->instant = true;
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
||||
if (!mAnimation->hasAnimation("spellcast"))
|
||||
{
|
||||
MWBase::Environment::get().getWorld()->castSpell(mPtr, mCastingManualSpell); // No "release" text key to use, so cast immediately
|
||||
|
|
Loading…
Reference in a new issue