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

engineRestoreModelPhysicalPropertiesGroup restores wrong physical group #3476

Closed TheNormalnij closed 1 week ago

TheNormalnij commented 1 week ago

Describe the bug

engineRestoreModelPhysicalPropertiesGroup restores wrong physical group

This breaks createBuilding on another servers

Steps to reproduce

WTR 1:

createBuilding(1337, 0, 0, 4, 0, 0, 0)                 -- ok
engineSetModelPhysicalPropertiesGroup(1337, 4)
engineRestoreModelPhysicalPropertiesGroup(1337)
createBuilding(1337, 0, 0, 4, 0, 0, 0)                 -- doesn't work: invalid model id

WTR 2:

  1. Connect to your server
  2. Run command: crun engineSetModelPhysicalPropertiesGroup(1337, 4)
  3. Reconnect to your server.
  4. Run command: crun createBuilding(1337, 0, 0, 4, 0, 0, 0). You'll get a error message, but a new building expected.

Version

No response

Additional context

No response

Relevant log output

No response

Security Policy