Skip to content

Fix gm-unit: dynamically update size_cur when modifying body appearance#1582

Open
sizzlins wants to merge 2 commits intoDFHack:masterfrom
sizzlins:fix/gm-unit-body-size
Open

Fix gm-unit: dynamically update size_cur when modifying body appearance#1582
sizzlins wants to merge 2 commits intoDFHack:masterfrom
sizzlins:fix/gm-unit-body-size

Conversation

@sizzlins
Copy link
Copy Markdown

Fixes #5793.

This pull request implements the math to dynamically update size_cur when modifying body appearance values (Height, Broadness, Length) in gm-unit. Previously, modifying these values left size_cur untouched (fulfilling the 3-year-old TODO in editor_body.lua). It uses standard DF scaling integer math to perfectly match the engine's volume calculations.

Fixes #5793. Manually calculates size_cur from size_base and body modifiers to emulate native DF scaling logic, fulfilling the 3-year-old TODO.
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.

1 participant