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

Military::removeFromSquad: Add missing history event when unassigning officer #5269

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

ong-yinggao98
Copy link
Contributor

Minor and virtually cosmetic change for consistency's sake.

@@ -389,6 +394,19 @@ static void remove_officer_entity_link(df::historical_figure* hf, df::squad* squ
former_pos->link_strength = 100;

hf->entity_links.push_back(former_pos);

int32_t event_id = *df::global::hist_event_next_id;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
int32_t event_id = *df::global::hist_event_next_id;
int32_t event_id = (*df::global::hist_event_next_id)++;

Copy link
Member

Choose a reason for hiding this comment

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

this should work, allowing you to remove the explicit increment below

Copy link
Contributor Author

@ong-yinggao98 ong-yinggao98 Feb 11, 2025

Choose a reason for hiding this comment

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

Yep, I tested that earlier before publishing this but could not tell which would be visually neater. if you prefer it I will do just that.

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

Successfully merging this pull request may close these issues.

2 participants