multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.3k stars 412 forks source link

Fix engineRestoreModelPhysicalPropertiesGroup restores incorrect group #3477

Closed TheNormalnij closed 1 week ago

TheNormalnij commented 1 week ago

Fixes #3476

For some reason GetObjectPropertiesGroup returns 0 for models without a physical group. It's incorrect because group 0 is a valid group.

After this PR engineGetModelPhysicalPropertiesGroup will return -1 for models without a physical group.