mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-03 23:56:43 +00:00 
			
		
		
		
	Update idle voices according to research
This commit is contained in:
		
							parent
							
								
									6b2df95167
								
							
						
					
					
						commit
						bf915d929a
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -308,8 +308,7 @@ namespace MWMechanics
 | 
				
			||||||
        // Play idle voiced dialogue entries randomly
 | 
					        // Play idle voiced dialogue entries randomly
 | 
				
			||||||
        int hello = cStats.getAiSetting(CreatureStats::AI_Hello).getModified();
 | 
					        int hello = cStats.getAiSetting(CreatureStats::AI_Hello).getModified();
 | 
				
			||||||
        if (hello > 0 && !MWBase::Environment::get().getWorld()->isSwimming(actor)
 | 
					        if (hello > 0 && !MWBase::Environment::get().getWorld()->isSwimming(actor)
 | 
				
			||||||
                && actor.getRefData().getPosition().pos[2] < 3000 &&
 | 
					                && MWBase::Environment::get().getSoundManager()->sayDone(actor))
 | 
				
			||||||
                MWBase::Environment::get().getSoundManager()->sayDone(actor))
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
 | 
					            MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -327,7 +326,8 @@ namespace MWMechanics
 | 
				
			||||||
            // Only say Idle voices when player is in LOS
 | 
					            // Only say Idle voices when player is in LOS
 | 
				
			||||||
            // A bit counterintuitive, likely vanilla did this to reduce the appearance of
 | 
					            // A bit counterintuitive, likely vanilla did this to reduce the appearance of
 | 
				
			||||||
            // voices going through walls?
 | 
					            // voices going through walls?
 | 
				
			||||||
            if (roll < x && Ogre::Vector3(player.getRefData().getPosition().pos).squaredDistance(Ogre::Vector3(pos.pos)) < 1500*1500
 | 
					            if (roll < x && Ogre::Vector3(player.getRefData().getPosition().pos).squaredDistance(Ogre::Vector3(pos.pos))
 | 
				
			||||||
 | 
					                    < 3000*3000 // maybe should be fAudioVoiceDefaultMaxDistance*fAudioMaxDistanceMult instead
 | 
				
			||||||
                    && MWBase::Environment::get().getWorld()->getLOS(player, actor))
 | 
					                    && MWBase::Environment::get().getWorld()->getLOS(player, actor))
 | 
				
			||||||
                MWBase::Environment::get().getDialogueManager()->say(actor, "idle");
 | 
					                MWBase::Environment::get().getDialogueManager()->say(actor, "idle");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue