[Avida-SVN] r2811 - branches/hjg-dev/source/cpu
hjg at myxo.css.msu.edu
hjg at myxo.css.msu.edu
Tue Sep 30 15:38:01 PDT 2008
Author: hjg
Date: 2008-09-30 18:38:01 -0400 (Tue, 30 Sep 2008)
New Revision: 2811
Modified:
branches/hjg-dev/source/cpu/cHardwareCPU.cc
Log:
bug fix
Modified: branches/hjg-dev/source/cpu/cHardwareCPU.cc
===================================================================
--- branches/hjg-dev/source/cpu/cHardwareCPU.cc 2008-09-30 17:08:45 UTC (rev 2810)
+++ branches/hjg-dev/source/cpu/cHardwareCPU.cc 2008-09-30 22:38:01 UTC (rev 2811)
@@ -6709,8 +6709,12 @@
to you. If so, */
bool cHardwareCPU::Inst_IfDonor(cAvidaContext& ctx)
{
- if (!(organism->IsDonor(organism->GetNeighbor()->GetID())))
- IP().Advance();
+ if (organism->IsNeighborCellOccupied()) {
+ if (!(organism->IsDonor(organism->GetNeighbor()->GetID())))
+ IP().Advance();
+ } else {
+ IP().Advance();
+ }
return true;
}
More information about the Avida-cvs
mailing list