Skip to content

Commit c627819

Browse files
committed
added ProcessOutputBuffer to SGPSymbiont
1 parent 0c1eb73 commit c627819

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

source/sgp_mode/SGPSymbiont.h

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ class SGPSymbiont : public Symbiont {
336336

337337

338338

339-
//GABE TODO after refactor remove comment in SGPWorld.cc
339+
//GABE TODO after full refactor remove comment in SGPWorld.cc
340340

341341
void ProcessOutputBuffer() {
342342
auto& cpu_state = GetHardware().GetCPUState();
@@ -382,16 +382,6 @@ void ProcessOutputBuffer() {
382382
cpu_state.ResetCreditedOutputs(task_id);
383383
}
384384

385-
//GABE TODO:
386-
//There is no equivalent of line ++sym_...id]; in the SGPHost.h port, and a quick look
387-
//through the repository doesent show ++host_task_success. Could be a bug?
388-
//WAS:
389-
// Track success
390-
//++sym_task_successes[task_id];
391-
//NOW:
392-
// Track success
393-
++(my_world->sym_task_successes[task_id])
394-
395385
// Calc base task value based on task environment, task requirements, and
396386
// symbiont's current point value.
397387
// NOTE - A little funky because task value might be a multiplier on
@@ -412,10 +402,15 @@ void ProcessOutputBuffer() {
412402
// Add earned task points to symbiont's point total
413403
AddPoints(task_points);
414404
// // Enforce limits on points
405+
406+
//GABE TODO
415407
// const double max_points = my_world->GetConfig().SYM_HORIZ_TRANS_RES();
416408
// if (sym.GetPoints() > (1.5 * my_world->GetConfig().SYM_HORIZ_TRANS_RES())) {
417409
// sym.SetPoints(1.5 * my_world->GetConfig().SYM_HORIZ_TRANS_RES());
418410
// }
411+
412+
//add task success
413+
my_world->GetSymTaskSuccesses()[task_id] += 1;
419414
}
420415
}
421416
}

0 commit comments

Comments
 (0)