mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-10 00:43:59 +02:00
Fixes broken client state, e.g. movement. Effectively reverts #1663
This commit is contained in:
parent
02b5edd32d
commit
a3059033f2
@ -54,7 +54,6 @@
|
|||||||
* Hero movement speed now matches H3
|
* Hero movement speed now matches H3
|
||||||
* Improved performance of adventure map rendering
|
* Improved performance of adventure map rendering
|
||||||
* Fixed embarking and disembarking sounds
|
* Fixed embarking and disembarking sounds
|
||||||
* Fixed loading of sleeping status and movement path of heroes
|
|
||||||
* Fixed selection of "new week" animation for status window
|
* Fixed selection of "new week" animation for status window
|
||||||
* Object render order now mostly matches H3
|
* Object render order now mostly matches H3
|
||||||
|
|
||||||
|
@ -202,6 +202,15 @@ void CClient::loadGame(CGameState * initializedGameState)
|
|||||||
|
|
||||||
initPlayerEnvironments();
|
initPlayerEnvironments();
|
||||||
|
|
||||||
|
// Loading of client state - disabled for now
|
||||||
|
// Since client no longer writes or loads its own state and instead receives it from server
|
||||||
|
// client state serializer will serialize its own copies of all pointers, e.g. heroes/towns/objects
|
||||||
|
// and on deserialize will create its own copies (instead of using copies from state received from server)
|
||||||
|
// Potential solutions:
|
||||||
|
// 1) Use server gamestate to deserialize pointers, so any pointer to same object will point to server instance and not our copy
|
||||||
|
// 2) Remove all serialization of pointers with instance ID's and restore them on load (including AI deserializer code)
|
||||||
|
// 3) Completely remove client savegame and send all information, like hero paths and sleeping status to server (either in form of hero properties or as some generic "client options" message
|
||||||
|
#ifdef BROKEN_CLIENT_STATE_SERIALIZATION_HAS_BEEN_FIXED
|
||||||
// try to deserialize client data including sleepingHeroes
|
// try to deserialize client data including sleepingHeroes
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -219,6 +228,7 @@ void CClient::loadGame(CGameState * initializedGameState)
|
|||||||
{
|
{
|
||||||
logGlobal->info("Cannot load client data for game %s. Error: %s", CSH->si->mapname, e.what());
|
logGlobal->info("Cannot load client data for game %s. Error: %s", CSH->si->mapname, e.what());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
initPlayerInterfaces();
|
initPlayerInterfaces();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user