mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
[Client] Fix crash caused by setting instant state for null localCast
This commit is contained in:
parent
5a46b40e1a
commit
a385fcdd87
@ -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…
x
Reference in New Issue
Block a user