mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 21:26:48 +00:00 
			
		
		
		
	Make sure player doesn't get any AI packages (Bug #1749)
This commit is contained in:
		
							parent
							
								
									8707f7b116
								
							
						
					
					
						commit
						1fc424ce30
					
				
					 2 changed files with 5 additions and 0 deletions
				
			
		|  | @ -245,6 +245,9 @@ void AiSequence::clear() | |||
| 
 | ||||
| void AiSequence::stack (const AiPackage& package, const MWWorld::Ptr& actor) | ||||
| { | ||||
|     if (actor == MWBase::Environment::get().getWorld()->getPlayerPtr()) | ||||
|         throw std::runtime_error("Can't add AI packages to player"); | ||||
| 
 | ||||
|     if (package.getTypeId() == AiPackage::TypeIdCombat || package.getTypeId() == AiPackage::TypeIdPursue) | ||||
|     { | ||||
|         // Notify AiWander of our current position so we can return to it after combat finished
 | ||||
|  |  | |||
|  | @ -244,6 +244,8 @@ namespace MWWorld | |||
| 
 | ||||
|             mPlayer.load (player.mObject); | ||||
| 
 | ||||
|             getPlayer().getClass().getCreatureStats(getPlayer()).getAiSequence().clear(); | ||||
| 
 | ||||
|             MWBase::World& world = *MWBase::Environment::get().getWorld(); | ||||
| 
 | ||||
|             try | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue