MCPcopy Create free account
hub / github.com/diasurgical/devilution / pfile_update

Function pfile_update

Source/pfile.cpp:572–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570}
571
572void pfile_update(BOOL force_save)
573{
574 // BUGFIX: these tick values should be treated as unsigned to handle overflows correctly
575 static int save_prev_tc;
576
577 if (gbMaxPlayers != 1) {
578 int tick = SDL_GetTicks();
579 if (force_save || tick - save_prev_tc > 60000) {
580 save_prev_tc = tick;
581 pfile_write_hero();
582 }
583 }
584}
585
586DEVILUTION_END_NAMESPACE

Callers 2

check_update_plrFunction · 0.85
game_logicFunction · 0.85

Calls 1

pfile_write_heroFunction · 0.85

Tested by

no test coverage detected