mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 11:26:42 +00:00 
			
		
		
		
	Merge pull request #1239 from akortunov/projectilefix
Disable explosion effect for 0-range projectiles (bug #3730)
This commit is contained in:
		
						commit
						0a061d45b7
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -3275,6 +3275,9 @@ namespace MWWorld
 | 
				
			||||||
            if (effectIt->mRange != rangeType || (effectIt->mArea <= 0 && !ignore.isEmpty() && ignore.getClass().isActor()))
 | 
					            if (effectIt->mRange != rangeType || (effectIt->mArea <= 0 && !ignore.isEmpty() && ignore.getClass().isActor()))
 | 
				
			||||||
                continue; // Not right range type, or not area effect and hit an actor
 | 
					                continue; // Not right range type, or not area effect and hit an actor
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (fromProjectile && effectIt->mArea <= 0)
 | 
				
			||||||
 | 
					                continue; // Don't play explosion for projectiles with 0-area effects
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (!fromProjectile && effectIt->mRange == ESM::RT_Touch && (!ignore.isEmpty()) && (!ignore.getClass().isActor() && !ignore.getClass().canBeActivated(ignore)))
 | 
					            if (!fromProjectile && effectIt->mRange == ESM::RT_Touch && (!ignore.isEmpty()) && (!ignore.getClass().isActor() && !ignore.getClass().canBeActivated(ignore)))
 | 
				
			||||||
                continue; // Don't play explosion for touch spells on non-activatable objects except when spell is from the projectile enchantment
 | 
					                continue; // Don't play explosion for touch spells on non-activatable objects except when spell is from the projectile enchantment
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue