mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-11-04 01:26:41 +00:00 
			
		
		
		
	Merge branch 'player_resurrection_spell_fix' into 'master'
Don't clear spells for a dead player, preventing resurrection problems See merge request OpenMW/openmw!207
This commit is contained in:
		
						commit
						c3a44212c7
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1966,13 +1966,17 @@ namespace MWMechanics
 | 
			
		|||
            }
 | 
			
		||||
            else if (killResult == CharacterController::Result_DeathAnimJustFinished)
 | 
			
		||||
            {
 | 
			
		||||
                bool isPlayer = iter->first == getPlayer();
 | 
			
		||||
                notifyDied(iter->first);
 | 
			
		||||
 | 
			
		||||
                // Reset magic effects and recalculate derived effects
 | 
			
		||||
                // One case where we need this is to make sure bound items are removed upon death
 | 
			
		||||
                stats.modifyMagicEffects(MWMechanics::MagicEffects());
 | 
			
		||||
                stats.getActiveSpells().clear();
 | 
			
		||||
                stats.getSpells().clear();
 | 
			
		||||
 | 
			
		||||
                if (!isPlayer)
 | 
			
		||||
                    stats.getSpells().clear();
 | 
			
		||||
 | 
			
		||||
                // Make sure spell effects are removed
 | 
			
		||||
                purgeSpellEffects(stats.getActorId());
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1981,7 +1985,7 @@ namespace MWMechanics
 | 
			
		|||
                if (iter->first.getClass().isNpc())
 | 
			
		||||
                    calculateNpcStatModifiers(iter->first, 0);
 | 
			
		||||
 | 
			
		||||
                if( iter->first == getPlayer())
 | 
			
		||||
                if (isPlayer)
 | 
			
		||||
                {
 | 
			
		||||
                    //player's death animation is over
 | 
			
		||||
                    MWBase::Environment::get().getStateManager()->askLoadRecent();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue