Merge branch 'master' of https://github.com/Regalis11/Barotrauma
This commit is contained in:
@@ -627,9 +627,9 @@ namespace Barotrauma
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsPet)
|
||||
if (IsPet && AIController is EnemyAIController { PetBehavior: { } petBehavior })
|
||||
{
|
||||
string petName = (AIController as EnemyAIController).PetBehavior.GetTagName();
|
||||
string petName = petBehavior.GetTagName();
|
||||
if (!string.IsNullOrEmpty(petName)) { return petName; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user