07.07.2012, 01:58
I got around to finally being able to test this (was locked up in jail meh long story, anyhow) I got a new dedicated so I am able to continue testing/devin on linux. I found out the problems with maps on linux.
There is a try catch block in map_insert that is causing an infinite loop. It works fine on windows but on linux it has different results. To be honest that block of code is not even needed, seeing that maps will automatically add a new key value or if it exists just update the keys data. So you can get this working on linux with maps just comment out (or remove) this from n_map_insert.....
You can find that at lines 439-441, removing that has normal functioning maps on linux. I have not tested all the other map functions I only needed to use map_insert, map_contains and map_clear.
Seeing that Teprey doesn't seem to be active developing this anymore I may give it a rewrite adding more of the cstl containers. I can see a real benefit to having multi maps available to server owners saving lots of file loads or SQL queries by keeping data chunks loaded in memory (If you have it available such as I do...). No point in having to reread account data when a player crashes just store it in the map check if they exist in the map load the map data. Not sure how the speed would end up but I think it warrants some testing.
There is a try catch block in map_insert that is causing an infinite loop. It works fine on windows but on linux it has different results. To be honest that block of code is not even needed, seeing that maps will automatically add a new key value or if it exists just update the keys data. So you can get this working on linux with maps just comment out (or remove) this from n_map_insert.....
Код:
try { maps[amx][mapid].erase(maps[amx][mapid].find(key)); } catch(std::exception e) { }
Seeing that Teprey doesn't seem to be active developing this anymore I may give it a rewrite adding more of the cstl containers. I can see a real benefit to having multi maps available to server owners saving lots of file loads or SQL queries by keeping data chunks loaded in memory (If you have it available such as I do...). No point in having to reread account data when a player crashes just store it in the map check if they exist in the map load the map data. Not sure how the speed would end up but I think it warrants some testing.