Fix bot traits crashing on missing ResourceMapBotModule
This commit is contained in:
committed by
Gustas Kažukauskas
parent
4cd1b4e208
commit
08d07eeb06
@@ -257,7 +257,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
if (firstTick)
|
||||
{
|
||||
ResourceMapModule = bot.Player.PlayerActor.TraitsImplementing<ResourceMapBotModule>().First(t => t.IsTraitEnabled());
|
||||
ResourceMapModule = bot.Player.PlayerActor.TraitsImplementing<ResourceMapBotModule>().FirstOrDefault(t => t.IsTraitEnabled());
|
||||
firstTick = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user