Don’t double-notify passenger addition.

This commit is contained in:
Paul Chote
2014-10-04 22:10:50 +13:00
committed by Paul Chote
parent f05c537491
commit 4c5429200e

View File

@@ -309,8 +309,10 @@ namespace OpenRA.Mods.Common.Traits
upgradeManager.RevokeUpgrade(self, u, this);
}
foreach (var npe in self.TraitsImplementing<INotifyPassengerEntered>())
npe.OnPassengerEntered(self, a);
// If not initialized then this will be notified in the first tick
if (initialized)
foreach (var npe in self.TraitsImplementing<INotifyPassengerEntered>())
npe.OnPassengerEntered(self, a);
var p = a.Trait<Passenger>();
p.Transport = self;