Skip to content

Conversation

@tomsons26
Copy link

@tomsons26 tomsons26 commented Apr 23, 2025

split off #688

Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks safe in principle, but a few notes added.


Object* goalObj = getStateMachine()->getGoalObject();
if (goalObj && goalObj->getID() == fromID)
getStateMachine()->setGoalObject(TheGameLogic->findObjectByID(toID));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good change. I suggest to sync Generals to Zero Hour.

Object *obj = getObject();
if (!isDieApplicable(damageInfo))
return;
TheGameLogic->destroyObject(getObject());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good change. I suggest to sync Generals to Zero Hour.


Object *damageDealer = TheGameLogic->findObjectByID( damageInfo->in.m_sourceID );

ObjectCreationList::create(getCreateObjectDieModuleData()->m_ocl, getObject(), damageDealer);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good change. I suggest to sync Generals to Zero Hour.

// if this is an enemy object of the builder object (and therefore the thing
// that will be constructed) we can't build here
//
if( builderObject && builderObject->getRelationship( them ) == ENEMIES ) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good change. I suggest to sync Generals to Zero Hour.

// ------------------------------------------------------------------------------------------------
void DockUpdate::loadDockPositions()
{
Drawable *myDrawable = getObject()->getDrawable();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary change. I suggest copy Generals to Zero Hour.

int moneyAmount = modData->m_depositAmount;

getObject()->getControllingPlayer()->getMoney()->deposit( moneyAmount );
getObject()->getControllingPlayer()->getScoreKeeper()->addMoneyEarned( modData->m_depositAmount);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just note: Here the Zero Hour developer forgot refactor.



setWakeFrame(getObject(), calcTimeToSleep());
setWakeFrame(me, calcTimeToSleep());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just note: The Zero Hour developer forgot replacing a few getObject() above.

@xezon xezon added this to the Code foundation build up milestone Apr 23, 2025
@xezon xezon added Gen Relates to Generals Unify Unifies code between Generals and Zero Hour labels Apr 23, 2025
@tomsons26 tomsons26 marked this pull request as draft April 24, 2025 14:54
@Mauller
Copy link

Mauller commented Jul 23, 2025

was this being worked on still? : )

@tomsons26 tomsons26 closed this Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gen Relates to Generals Unify Unifies code between Generals and Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants