| 653 | } |
| 654 | |
| 655 | void SG_ReadServerConfigStrings( void ) |
| 656 | { |
| 657 | // trash the whole table... |
| 658 | // |
| 659 | for (int i=0; i<MAX_CONFIGSTRINGS; i++) |
| 660 | { |
| 661 | if (i!=CS_SYSTEMINFO) |
| 662 | { |
| 663 | if ( sv.configstrings[i] ) |
| 664 | { |
| 665 | Z_Free( sv.configstrings[i] ); |
| 666 | } |
| 667 | sv.configstrings[i] = CopyString(""); |
| 668 | } |
| 669 | } |
| 670 | |
| 671 | // now read the replacement ones... |
| 672 | // |
| 673 | int iCount = 0; |
| 674 | |
| 675 | ojk::SavedGameHelper saved_game( |
| 676 | &ojk::SavedGame::get_instance()); |
| 677 | |
| 678 | saved_game.read_chunk<int32_t>( |
| 679 | INT_ID('C', 'S', 'C', 'N'), |
| 680 | iCount); |
| 681 | |
| 682 | Com_DPrintf( "Reading %d configstrings...\n",iCount); |
| 683 | |
| 684 | for (int i = 0; i<iCount; i++) |
| 685 | { |
| 686 | int iIndex = 0; |
| 687 | const char *psName; |
| 688 | |
| 689 | saved_game.read_chunk<int32_t>( |
| 690 | INT_ID('C', 'S', 'I', 'N'), |
| 691 | iIndex); |
| 692 | |
| 693 | saved_game.read_chunk( |
| 694 | INT_ID('C', 'S', 'D', 'A')); |
| 695 | |
| 696 | psName = reinterpret_cast<const char*>( |
| 697 | saved_game.get_buffer_data()); |
| 698 | |
| 699 | Com_DPrintf( "Cfg str %d = %s\n",iIndex, psName); |
| 700 | |
| 701 | //sv.configstrings[iIndex] = psName; |
| 702 | SV_SetConfigstring(iIndex, psName); |
| 703 | } |
| 704 | } |
| 705 | |
| 706 | static unsigned int SG_UnixTimestamp ( const time_t& t ) |
| 707 | { |
no test coverage detected