Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POB: Optimizations to damage-taking code, other updates #356

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Aingar
Copy link
Collaborator

@Aingar Aingar commented Nov 25, 2023

-POBs now calculate wear and tear much more efficiently
-Fix specific interactions with MobileDocking plugin
-Fix players who logged out in space being beamed back onto the POB
-POBs now explode immediately upon reaching 0 health
-Removed a bunch of deprecated siege-mode related code
-Fixed price update logging
-Non-crew POB population added to F9 menu and /base supplies
-Code cleanup

-POBs now calculate wear and tear much more efficiently
-Fix specific interactions with MobileDocking plugin
-Fix players who logged out in space being beamed back onto the POB
-POBs now explode immediately upon reaching 0 health
-Removed a bunch of deprecated siege-mode related code
-Fixed price update logging
-Non-crew POB population added to F9 menu and /base supplies
-Code cleanup
@@ -132,6 +132,9 @@ void CoreModule::Spawn()

pub::SpaceObj::SetRelativeHealth(space_obj, base->base_health / base->max_base_health);

base->baseCSolar = (CSolar*)CObject::Find(space_obj, CObject::CSOLAR_OBJECT);
base->baseCSolar->Release();
Copy link
Member

Choose a reason for hiding this comment

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

uh we should not be calling release on something we just shoved into our object

return curr_hitpoints - damageTaken;
if (!wasDamagedSinceLastUpdate)
{
base->baseCSolar->set_hit_pts(base->base_health);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we be doing this after we modify base->base_health below?

@@ -2624,39 +2635,6 @@ bool ExecuteCommandString_Callback(CCmds* cmd, const wstring &args)
}


return true;
}
else if (args.find(L"basedespawn") == 0)
Copy link
Member

Choose a reason for hiding this comment

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

Aren't people using this? Did you mean to get rid of one of the baserespawn handlers instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants