Skip to content

Feature #5238: Add scale support for building elements - #5370

Open
iManGaaX wants to merge 1 commit into
multitheftauto:masterfrom
iManGaaX:resolve/issue-5238
Open

Feature #5238: Add scale support for building elements#5370
iManGaaX wants to merge 1 commit into
multitheftauto:masterfrom
iManGaaX:resolve/issue-5238

Conversation

@iManGaaX

Copy link
Copy Markdown
Contributor

Summary

Adds new element-level functions setElementScale/getElementScale that work on both objects and buildings, and deprecates setObjectScale/getObjectScale functions

Buildings are now scalable: the server stores the scale, syncs it to the client, and the client applies it to the building's RenderWare frame
Building also gets the getScale/setScale OOP methods, matching the object class

Closes #5238.

Motivation

Buildings had no way to be scaled, and setObjectScale only accepted objects. rather than changing the old function's behaviour, this introduces a clear, general replacement and follows the standard deprecation path used elsewhere in MTA

Test plan

  • Start a resource that calls setObjectScale/getObjectScale and confirm the deprecation warning is logged in the server console
  • setElementScale on an object: verify it behaves exactly as setObjectScale did (uniform, per-axis, and Vector3 forms, plus getElementScale round-trip)
  • setElementScale on a building: verify the building is visually scaled, the value survives a reposition/recreate, and getElementScale returns it

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@FileEX FileEX added the enhancement New feature or request label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building type doesn't support scale argument

2 participants