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.42k stars 437 forks source link

Fix min_mta_version 'server' not working as expected #3853

Closed Fernando-A-Rocha closed 2 weeks ago

Fernando-A-Rocha commented 2 weeks ago

Fixes #3852 Caused by: https://github.com/multitheftauto/mtasa-blue/pull/3853#issuecomment-2472903077

I found that 2 missing includes were preventing the script from checking if a server's version is too low to start a certain resource that requires a higher version.

image

image

PlatinMTA commented 2 weeks ago

Can we just send a warning instead of not letting the resource start since its serversided?

(edit: nvm its checked in the same if statement)

Fernando-A-Rocha commented 2 weeks ago

If a dev defines a certain min server version in the meta.xml, their intention is to prevent a server with an inferior server from starting the resource.

If the server owner wants to go crazy and execute the resource anyway, then they can easily edit meta.xml to get rid of the min_mta_version setting.

TracerDS commented 2 weeks ago

How does including 2 headers fix this issue?

Fernando-A-Rocha commented 2 weeks ago

How does including 2 headers fix this issue?

Fernando-A-Rocha commented 2 weeks ago

After some digging, I found that this commit actually broke it https://github.com/multitheftauto/mtasa-blue/commit/693976b7131a87df71d81256a80cc48b22ab7bcf ("Clean up precompiled headers for Server" with 435 files changed) @botder removed CStaticFunctionDefinitions.h and version.h includes from Server/mods/deathmatch/StdInc.h

TheNormalnij commented 2 weeks ago

thx