Rework hash checking code #3618
Comments
dak180 changed milestone from |
NoQ commented How about
Would this help solving the issues? This also allows including map-mods with the game in case anybody likes this idea. This also cleans up the addon.lev file in the mp.wz folder, keeping only tileset data definitions in it (which is friendly to the tileset4 support). |
Per commented I vote for option 2. The last map option is pretty buggy anyhow. |
vexed commented Something like this ? |
vexed uploaded file |
Per commented Yeah. Except I'd prefer if you just removed all trace of the default map/maxplayer stuff while you were at it. |
vexed commented While that patch seems to work, it won't work if there is a mod of a SP game with a custom map. |
Per Inge Mathisen changed status from |
Per Inge Mathisen changed resolution from `` to |
Per Inge Mathisen commented No longer save default map, max players and map hash. Patch originally by vexed. Closes #3618
|
Per Inge Mathisen commented No longer save default map, max players and map hash. Patch originally by vexed. Closes #3618
|
2 similar comments
Per Inge Mathisen commented No longer save default map, max players and map hash. Patch originally by vexed. Closes #3618
|
Per Inge Mathisen commented No longer save default map, max players and map hash. Patch originally by vexed. Closes #3618
|
resolution_fixed
type_bug
| by vexedOn the commits that were shown here:
Fix: Sensibly handle multiple maps with the same name (#3531, #3180, 15c04ab10f, 2056093027, 1461b3a5a8)
(and others that try to fix that)
We still don't have a good way to differentiate between "internal" (comes with the game, aka hash = NULL) vs external (hash is whatever), and it is causing lots of issues.
If person hosts a external map, and comes back to do anything that uses a internal map, then the game exits out since it is using the old hash it has stored from the previous run.
Since that hash is also saved & loaded on exit, (so MP games will have the hash of the last used map) it fubars pretty much everything, in all ways you can start a SP game / tutorial / fastplay and mod overrides of the aforementioned things.
We should do one of these options:
revert hash checking code --will cause desyncs if people have different maps with the same name.
Don't bother saving the hash and the last map used for MP/Skirmish games. (Would only be slightly inconvenient, since we use the default map)
Run around the code base and try to figure out the best location to reset the hash, while not breaking anything else.
Only use hashes for (true) MP games (or in other words, host sends a checksum of the map they got hosted, and we try to find that specific hash on client's machine, if not, we download it. Hash is only calculated when they hit the map host button.)
The other problem with this is, (besides the odd crashing of the game with map transfers and people getting map files that end up with all 0 hashes in their names) people are ending up with lots of files in the map directories as people apparently host maps that have been altered at one point, without changing the name of the map as was warned about.
That, and of course the limited GUI interface that we have that makes it almost impossible to tell which map is the original author's map.
Issue migrated from trac:3618 at 2022-04-16 09:58:05 -0700
The text was updated successfully, but these errors were encountered: