Skip to content

Commit

Permalink
Update area nullability suppression.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhett12321 committed Mar 8, 2023
1 parent 192f4b5 commit 4c696d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NWN.Toolbox/src/Features/Chat/Commands/EncounterCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private void SpawnEncounterPreset(NwPlayer caller, string presetName)
}
NwCreature playerCreature = eventData.Player.ControlledCreature!;
NwArea area = playerCreature.Area!;
NwArea area = playerCreature.Area;
Vector3 direction = Vector3.Normalize(playerCreature.Position - eventData.TargetPosition);
float orientation = NwMath.VectorToAngle(direction);
Expand All @@ -102,7 +102,7 @@ private void SpawnEncounterPreset(NwPlayer caller, string presetName)
{
Vector3 position = new Vector3(spawn.LocalOffsetX, spawn.LocalOffsetY, spawn.LocalOffsetZ);
position = eventData.TargetPosition + position;
creature.Location = Location.Create(area, position, orientation);
creature.Location = Location.Create(area!, position, orientation);
}
}
});
Expand Down

0 comments on commit 4c696d2

Please sign in to comment.