Skip to content
Snippets Groups Projects
Commit c6f0c377 authored by Robin Halseth Sandvik's avatar Robin Halseth Sandvik
Browse files

Fixed error with audio source.

parent c34dda00
No related branches found
No related tags found
1 merge request!68Master
......@@ -217,7 +217,7 @@ namespace BigSock {
// Trigger the event for taking damage.
OnTakeDamage?.Invoke(this, attack.Actor, attack);
if (TakeDamageAudio != null){
if(TakeDamageAudio != null && source?.Count > 0 && source[0] != null) {
source[0].clip = TakeDamageAudio;
source[0].Play();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment