mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 20:56:42 +00:00 
			
		
		
		
	run targeted scripts with an implicit reference based on the ID given
This commit is contained in:
		
							parent
							
								
									e8322da663
								
							
						
					
					
						commit
						dba6a9ebff
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		|  | @ -75,8 +75,15 @@ namespace MWScript | |||
|         { | ||||
|             if (iter->second.mRunning) | ||||
|             { | ||||
|                 MWWorld::Ptr ptr; | ||||
| 
 | ||||
|                 if (!iter->second.mId.empty()) | ||||
|                     ptr = MWBase::Environment::get().getWorld()->getPtr ( | ||||
|                         iter->second.mId, false); | ||||
| 
 | ||||
|                 MWScript::InterpreterContext interpreterContext ( | ||||
|                     &iter->second.mLocals, MWWorld::Ptr()); | ||||
|                     &iter->second.mLocals, ptr); | ||||
| 
 | ||||
|                 MWBase::Environment::get().getScriptManager()->run (iter->first, interpreterContext); | ||||
|             } | ||||
|         } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue