Added checks for character removal to a bunch of places. Some of these may not necessary, but at least MeleeWeapon, Projectile and Controller still accessed the user after the user had been removed.
This commit is contained in:
@@ -275,6 +275,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private bool OnProjectileCollision(Fixture target, Vector2 collisionNormal)
|
||||
{
|
||||
if (User != null && User.Removed) User = null;
|
||||
|
||||
if (IgnoredBodies.Contains(target.Body)) return false;
|
||||
|
||||
if (target.CollisionCategories == Physics.CollisionCharacter && !(target.Body.UserData is Limb))
|
||||
|
||||
Reference in New Issue
Block a user