remove a redundant method from queries.
This commit is contained in:
@@ -136,7 +136,7 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
int* c = (int*)bitmapData.Scan0;
|
||||
|
||||
foreach (var t in world.Queries.WithTraitMultiple<IRadarSignature>())
|
||||
foreach (var t in world.Queries.WithTrait<IRadarSignature>())
|
||||
{
|
||||
if (!world.LocalShroud.IsVisible(t.Actor))
|
||||
continue;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRA.Network
|
||||
report.Frame = orderManager.NetFrameNumber;
|
||||
report.SyncedRandom = orderManager.world.SharedRandom.Last;
|
||||
report.Traits.Clear();
|
||||
foreach (var a in orderManager.world.Queries.WithTraitMultiple<object>())
|
||||
foreach (var a in orderManager.world.Queries.WithTrait<object>())
|
||||
{
|
||||
var sync = Sync.CalculateSyncHash(a.Trait);
|
||||
if (sync != 0)
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace OpenRA
|
||||
if (!DisableTick)
|
||||
{
|
||||
actors.Do( x => x.Tick() );
|
||||
Queries.WithTraitMultiple<ITick>().DoTimed( x =>
|
||||
Queries.WithTrait<ITick>().DoTimed( x =>
|
||||
{
|
||||
x.Trait.Tick( x.Actor );
|
||||
}, "[{2}] Trait: {0} ({1:0.000} ms)", Game.Settings.Debug.LongTickThreshold );
|
||||
@@ -241,11 +241,6 @@ namespace OpenRA
|
||||
return ret;
|
||||
}
|
||||
|
||||
public IEnumerable<TraitPair<T>> WithTraitMultiple<T>()
|
||||
{
|
||||
return world.traitDict.ActorsWithTraitMultiple<T>( world );
|
||||
}
|
||||
|
||||
public class OwnedByCachedView : CachedView<Actor, Actor>
|
||||
{
|
||||
readonly TypeDictionary hasTrait = new TypeDictionary();
|
||||
|
||||
Reference in New Issue
Block a user