MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SaveWeaponsOnClose

Method SaveWeaponsOnClose

editor/WorldWeaponsDialog.cpp:870–883  ·  view source on GitHub ↗

When closing, save all our checked out weapons locally so we know what stuff to flag as "checked out" the next time we start up

Source from the content-addressed store, hash-verified

868// When closing, save all our checked out weapons locally so we know
869// what stuff to flag as "checked out" the next time we start up
870void CWorldWeaponsDialog::SaveWeaponsOnClose() {
871 int i, t;
872
873 if (!Network_up)
874 return; // don't save a damn thing if the network is down
875
876 for (i = 0; i < MAX_TRACKLOCKS; i++) {
877 if (GlobalTrackLocks[i].used == 1 && GlobalTrackLocks[i].pagetype == PAGETYPE_WEAPON) {
878 t = FindWeaponName(GlobalTrackLocks[i].name);
879 ASSERT(t != -1);
880 mng_ReplacePage(Weapons[t].name, Weapons[t].name, t, PAGETYPE_WEAPON, 1);
881 }
882 }
883}
884
885#define NULL_NAME "<none>"
886

Callers

nothing calls this directly

Calls 2

FindWeaponNameFunction · 0.85
mng_ReplacePageFunction · 0.85

Tested by

no test coverage detected