HomeWildfire Games

Move `GetEngineInfo` to Mod.[h|cpp]
AuditedrP21242

Description

Move GetEngineInfo to Mod.[h|cpp]

Suggested by: elexis
refs rP21239

Details

Event Timeline

elexis added a subscriber: elexis.Feb 20 2018, 1:13 AM

Thanks

/ps/trunk/source/ps/Mod.cpp
134

I wonder if we can't replace these Evals with actual object constructors.

/ps/trunk/source/ps/Mod.h
36

I wouldn't say it's saved game data

/ps/trunk/source/ps/scripting/JSInterface_Mod.cpp
1

8

/ps/trunk/source/ps/scripting/JSInterface_SavedGame.cpp
1

8

/ps/trunk/source/ps/scripting/JSInterface_SavedGame.h
1

8

Imarok added inline comments.Feb 21 2018, 7:19 PM
/ps/trunk/source/ps/Mod.cpp
134

Looks like we use this everywhere.
I don't know the cause...

elexis added inline comments.Feb 21 2018, 7:21 PM
/ps/trunk/source/ps/Mod.cpp
134

We should try to find the best choice when adding new code.

ffffffff raised a concern with this commit.EditedMay 19 2018, 1:53 PM
ffffffff added a subscriber: ffffffff.

lead to immersive lags in the lobby (Engine.GetEngineInfo().mods command) (only when public mod is zipped to public.zip, unzipped all fine)

to test replace Engine.GetEngineInfo().mods in lobby.js and gamesetup.js with [] so it wont be executed

will be much faster then
but i dont know why atm

This commit now has outstanding concerns.May 19 2018, 1:53 PM
Imarok added a comment.EditedMay 20 2018, 12:54 AM

lead to immersive lags in the lobby (Engine.GetEngineInfo().mods command) (only when public mod is zipped to public.zip, unzipped all fine)

to test replace Engine.GetEngineInfo().mods in lobby.js and gamesetup.js with [] so it wont be executed

will be much faster then
but i dont know why atm

I guess you mean rP21301?
If it is really the cause, we could just cache the answer of Engine.GetEngineInfo() on lobby.js init.

ffffffff accepted this commit.May 20 2018, 1:34 AM

yes goes to rP21301

All concerns with this commit have now been addressed.May 20 2018, 1:34 AM