-
Notifications
You must be signed in to change notification settings - Fork 33
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
base: master
Are you sure you want to change the base?
Conversation
-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(); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
-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