Skip to content

Commit

Permalink
Merge pull request #3113 from masakitenchi/GizmoFix
Browse files Browse the repository at this point in the history
Fix NRE when selecting Corpse
  • Loading branch information
N7Huntsman authored May 1, 2024
2 parents 3811e93 + c4853eb commit e672d1e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ private string heightString
public override IEnumerable<Gizmo> CompGetGizmosExtra()
{
// Don't let people control melee targeting for non-colonist pawns or colonists in a mental state
if (!PawnParent.IsColonist || PawnParent.InAggroMentalState)
// Corpses are also auto-assigned this comp, but clearly they are not typeof(Pawn)
if (parent is Corpse || !PawnParent.IsColonist || PawnParent.InAggroMentalState)
{
yield break;
}
Expand Down

0 comments on commit e672d1e

Please sign in to comment.