Description:
Add warning when simulating multiple ticks at once.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r437:d06d7daf4ddc -

@@ -13,7 +13,7
13 {
13 {
14
14
15 [Receives(typeof(GameRateMessage), typeof(TogglePauseMessage))]
15 [Receives(typeof(GameRateMessage), typeof(TogglePauseMessage))]
16 [Sends(typeof(SpawnContractMessage), typeof(TickMessage))]
16 [Sends(typeof(SpawnContractMessage), typeof(SpawnDialogMessage), typeof(TickMessage))]
17 [Reads(typeof(AreaComponent),
17 [Reads(typeof(AreaComponent),
18 typeof(BudgetComponent),
18 typeof(BudgetComponent),
19 typeof(BudgetLineComponent),
19 typeof(BudgetLineComponent),
@@ -106,11 +106,16
106
106
107 }
107 }
108
108
109
109 if (this.ticksToSend > 0)
110 if (this.ticksToSend > 0)
110 {
111 {
111
112
112 Logging.Trace(String.Format("{0} ticks to send in update", this.ticksToSend));
113 Logging.Trace(String.Format("{0} ticks to send in update", this.ticksToSend));
113 }
114 }
115 if (this.ticksToSend > 1)
116 {
117 Logging.Warning(String.Format("Simulating {0} ticks at once!", this.ticksToSend));
118 }
114 for (int i = ticksToSend; i > 0; i--)
119 for (int i = ticksToSend; i > 0; i--)
115 {
120 {
116 SendMessage<TickMessage>(new TickMessage { });
121 SendMessage<TickMessage>(new TickMessage { });
@@ -172,6 +177,10
172 simulation.contracts = new_contract_amount;
177 simulation.contracts = new_contract_amount;
173 simulation.enforcement = new_enforcement_amount;
178 simulation.enforcement = new_enforcement_amount;
174
179
180
181 //Move this here?
182 // this.simulation.update(dt);
183
175 }
184 }
176
185
177 }
186 }
@@ -224,7 +224,7
224 AddComponent(contract, new ImageComponent {ImageIndex = image_index});
224 AddComponent(contract, new ImageComponent {ImageIndex = image_index});
225 AddComponent(contract, new WindowTypeComponent { type = Window.Contract});
225 AddComponent(contract, new WindowTypeComponent { type = Window.Contract});
226 AddComponent(contract, new VisibilityComponent { visible = false});
226 AddComponent(contract, new VisibilityComponent { visible = false});
227 Logging.Spy(nameAndDescription);
227 Logging.Info(String.Format("Generated contract {0}: ", nameAndDescription));
228 return;
228 return;
229 }
229 }
230 else {
230 else {
You need to be logged in to leave comments. Login now