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:
@@ -54,7 +54,7 @@ namespace Barotrauma.Items.Components
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
if (!item.body.Enabled) return;
|
||||
if (!picker.HasSelectedItem(item))
|
||||
if (picker == null || picker.Removed || !picker.HasSelectedItem(item))
|
||||
{
|
||||
IsActive = false;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user