forked from nikita/muzika-gromche
				
			Consistently use equality operator for state indexes
This commit is contained in:
		
							parent
							
								
									eea59ca19f
								
							
						
					
					
						commit
						c8f1ba90e3
					
				|  | @ -204,7 +204,7 @@ namespace MuzikaGromche | ||||||
|                 __instance.farAudio = __state.farAudio; |                 __instance.farAudio = __state.farAudio; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if (__instance.currentBehaviourStateIndex is 1 && __state.prevStateindex != 1) |             if (__instance.currentBehaviourStateIndex == 1 && __state.prevStateindex != 1) | ||||||
|             { |             { | ||||||
|                 // if just started winding up |                 // if just started winding up | ||||||
|                 // then stop the default music... |                 // then stop the default music... | ||||||
|  | @ -234,7 +234,7 @@ namespace MuzikaGromche | ||||||
|                 __instance.farAudio.Play(); |                 __instance.farAudio.Play(); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if (__instance.currentBehaviourStateIndex is 2 && __state.prevStateindex != 2) |             if (__instance.currentBehaviourStateIndex == 2 && __state.prevStateindex != 2) | ||||||
|             { |             { | ||||||
|                 __instance.creatureVoice.Stop(); |                 __instance.creatureVoice.Stop(); | ||||||
|                 Plugin.StartLightSwitching(__instance); |                 Plugin.StartLightSwitching(__instance); | ||||||
|  | @ -246,7 +246,7 @@ namespace MuzikaGromche | ||||||
|                 Plugin.ResetLightColor(); |                 Plugin.ResetLightColor(); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if (__instance.currentBehaviourStateIndex is 2 && !__instance.creatureVoice.isPlaying) |             if (__instance.currentBehaviourStateIndex == 2 && !__instance.creatureVoice.isPlaying) | ||||||
|             { |             { | ||||||
|                 __instance.creatureVoice.maxDistance = 150; |                 __instance.creatureVoice.maxDistance = 150; | ||||||
|                 __instance.creatureVoice.clip = Plugin.CurrentTrack.LoadedLoop; |                 __instance.creatureVoice.clip = Plugin.CurrentTrack.LoadedLoop; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue