Fixed exceptions if a character is removed when an AI character is attacking it
This commit is contained in:
@@ -16,9 +16,13 @@ namespace Barotrauma
|
||||
private ushort id;
|
||||
|
||||
protected AITarget aiTarget;
|
||||
//protected float soundRange;
|
||||
//protected float sightRange;
|
||||
|
||||
|
||||
public bool Removed
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public ushort ID
|
||||
{
|
||||
get
|
||||
@@ -125,6 +129,7 @@ namespace Barotrauma
|
||||
public virtual void Remove()
|
||||
{
|
||||
dictionary.Remove(ID);
|
||||
Removed = true;
|
||||
}
|
||||
|
||||
public static void DumpIds(int count)
|
||||
|
||||
Reference in New Issue
Block a user