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
| 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 |
| 870 | void 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 |
nothing calls this directly
no test coverage detected