From 4c5429200ef529bf3a7a5e48582c06910299af45 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 4 Oct 2014 22:10:50 +1300 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20double-notify=20passenger=20add?= =?UTF-8?q?ition.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenRA.Mods.Common/Traits/Cargo.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Cargo.cs b/OpenRA.Mods.Common/Traits/Cargo.cs index 4bec40371e..29dc1c135c 100644 --- a/OpenRA.Mods.Common/Traits/Cargo.cs +++ b/OpenRA.Mods.Common/Traits/Cargo.cs @@ -309,8 +309,10 @@ namespace OpenRA.Mods.Common.Traits upgradeManager.RevokeUpgrade(self, u, this); } - foreach (var npe in self.TraitsImplementing()) - npe.OnPassengerEntered(self, a); + // If not initialized then this will be notified in the first tick + if (initialized) + foreach (var npe in self.TraitsImplementing()) + npe.OnPassengerEntered(self, a); var p = a.Trait(); p.Transport = self;