Skip to content

Commit

Permalink
Corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
cybiosphere committed Oct 22, 2024
1 parent d3005ce commit a571eda
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion WpEntity/src/CAnimal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3170,7 +3170,7 @@ void CAnimal::logDeathCause(std::string deathCauseStr)
{
CYBIOCORE_LOG_TIME(m_pBiotop->getBiotopTime());
CYBIOCORE_LOG("ANIMAL - Death : specie %s name %s age %ddays sex %s is dead ",
getSpecieName().c_str(), getLabel().c_str(), getAge(), getSexString());
getSpecieName().c_str(), getLabel().c_str(), getAge(), getSexString().c_str());
CYBIOCORE_LOG(deathCauseStr.c_str());
}
}
Expand Down
4 changes: 4 additions & 0 deletions WpEnvironment/src/CBiotop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@ size_t CBiotop::deleteEntity(CBasicEntity* pEntity, bool displayLog)
CYBIOCORE_LOG("BIOTOP - ERROR Try to remove NULL entity\n");
return (invalidIndex);
}
if (isCoordValid(pEntity->getGridCoord(), pEntity->getLayer()))
{
m_tBioGrid[pEntity->getGridCoord().x][pEntity->getGridCoord().y][pEntity->getLayer()].pEntity = NULL;
}
for (size_t i = 0; i < getNbOfEntities(); i++)
{
if (m_tEntity[i] == pEntity)
Expand Down
7 changes: 4 additions & 3 deletions WpGui/src/GenomeEditorDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,10 @@ void CGenomeEditorDlg::OnOK()
entityIdType oldId = m_pOldEntity->getId();
theApp.GetBiotop()->resetEntityGenome(oldId, m_pNewGenome);
CBasicEntity* pNewEntity = theApp.GetBiotop()->getEntityById(oldId);

pNewEntity->quickAgeing(m_InitAge);

if (pNewEntity)
{
pNewEntity->quickAgeing(m_InitAge);
}
theApp.setSelectedEntity(NULL); // Clear all
theApp.updateSelectedEntity(pNewEntity);
}
Expand Down

0 comments on commit a571eda

Please sign in to comment.