Skip to content

Conversation

sacr1ficez
Copy link
Contributor

@sacr1ficez sacr1ficez commented Nov 2, 2021

Refactored play gamemode.

  • Fixed memory leaks (timer/vehicle data never got cleared from table upon destroying).
  • Optimised code.
  • Disabled OOP (it's not worth to use it for some simple methods, considering that it affects script performance just by enabling it in meta).
  • Improved readability.
  • Logic has been separated per parts, so it will be easier to maintain/work on.

Tested briefly, hope that i didn't missed anything. Would be nice if someone could test it as well.

@Disinterpreter
Copy link
Member

I think it's better to move datasets out, like dataset.lua with arrays.
Player array shouldn't be one liner.

@sacr1ficez
Copy link
Contributor Author

sacr1ficez commented Nov 2, 2021

Moved them to play_config.lua, and fixed one liner.
Do you also need for playerSkins to not be one liner?

@Disinterpreter
Copy link
Member

Do you also need for playerSkins to not be one liner?

yes

@sacr1ficez
Copy link
Contributor Author

Done & waiting for further feedback.

@sacr1ficez
Copy link
Contributor Author

@TheNormalnij, @jlillis updated, re-review please.

@TheNormalnij
Copy link
Member

LGTM. We need test it before merge.

@Dutchman101 Dutchman101 dismissed TheNormalnij’s stale review December 19, 2021 10:49

Already marked as resolved, but somehow still active

@patrikjuvonen patrikjuvonen added this to the 1.6 milestone Apr 22, 2022
@patrikjuvonen
Copy link
Contributor

Thank you.

@patrikjuvonen patrikjuvonen merged commit 7b66c78 into multitheftauto:master Dec 29, 2022
@sacr1ficez sacr1ficez deleted the play-refactor branch December 29, 2022 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants