mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 14:56:38 +00:00 
			
		
		
		
	Merge pull request #1097 from Allofich/persuasion
Don't let intimidate bring disposition below 0 (Fixes #3584)
This commit is contained in:
		
						commit
						ae2036fa85
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -448,6 +448,12 @@ namespace MWDialogue | |||
|     { | ||||
|         MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue); | ||||
| 
 | ||||
|         // Clamp permanent disposition change so that final disposition doesn't go below 0 (could happen with intimidate)
 | ||||
|          | ||||
|         float curDisp = static_cast<float>(MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mActor, false)); | ||||
|         if (curDisp + mPermanentDispositionChange < 0) | ||||
|             mPermanentDispositionChange = -curDisp; | ||||
| 
 | ||||
|         // Apply disposition change to NPC's base disposition
 | ||||
|         if (mActor.getClass().isNpc()) | ||||
|         { | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue