Network: Add state checksum which is check in network sync
This commit is contained in:
@@ -77,6 +77,7 @@
|
||||
#include "string_func_extra.h"
|
||||
#include "industry.h"
|
||||
#include "cargopacket.h"
|
||||
#include "core/checksum_func.hpp"
|
||||
|
||||
#include "linkgraph/linkgraphschedule.h"
|
||||
#include "tracerestrict.h"
|
||||
@@ -103,6 +104,8 @@ GameEventFlags _game_events_overall;
|
||||
|
||||
time_t _game_load_time;
|
||||
|
||||
SimpleChecksum64 _state_checksum;
|
||||
|
||||
/**
|
||||
* Error handling for fatal user errors.
|
||||
* @param s the string to print.
|
||||
@@ -1749,6 +1752,11 @@ void StateGameLoop()
|
||||
CallWindowGameTickEvent();
|
||||
NewsLoop();
|
||||
cur_company.Restore();
|
||||
|
||||
Company *c;
|
||||
FOR_ALL_COMPANIES(c) {
|
||||
UpdateStateChecksum(c->money);
|
||||
}
|
||||
}
|
||||
|
||||
assert(IsLocalCompany());
|
||||
|
Reference in New Issue
Block a user