equal
deleted
inserted
replaced
1580 |
1580 |
1581 if (flags & DC_EXEC) { |
1581 if (flags & DC_EXEC) { |
1582 Patches *patches_ptr = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches; |
1582 Patches *patches_ptr = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches; |
1583 void *var = ini_get_variable(&sd->save, patches_ptr); |
1583 void *var = ini_get_variable(&sd->save, patches_ptr); |
1584 Write_ValidateSetting(var, sd, (int32)p2); |
1584 Write_ValidateSetting(var, sd, (int32)p2); |
|
1585 if (sd->desc.proc != NULL) sd->desc.proc((int32)ReadValue(var, sd->save.conv)); |
1585 |
1586 |
1586 InvalidateWindow(WC_GAME_OPTIONS, 0); |
1587 InvalidateWindow(WC_GAME_OPTIONS, 0); |
1587 } |
1588 } |
1588 |
1589 |
1589 return 0; |
1590 return 0; |
1609 |
1610 |
1610 if (_game_mode != GM_MENU) { |
1611 if (_game_mode != GM_MENU) { |
1611 void *var2 = ini_get_variable(&sd->save, &_patches_newgame); |
1612 void *var2 = ini_get_variable(&sd->save, &_patches_newgame); |
1612 Write_ValidateSetting(var2, sd, value); |
1613 Write_ValidateSetting(var2, sd, value); |
1613 } |
1614 } |
|
1615 if (sd->desc.proc != NULL) sd->desc.proc((int32)ReadValue(var, sd->save.conv)); |
1614 InvalidateWindow(WC_GAME_OPTIONS, 0); |
1616 InvalidateWindow(WC_GAME_OPTIONS, 0); |
1615 return true; |
1617 return true; |
1616 } |
1618 } |
1617 |
1619 |
1618 /* send non-player-based settings over the network */ |
1620 /* send non-player-based settings over the network */ |
1651 |
1653 |
1652 patches_ptr = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches; |
1654 patches_ptr = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches; |
1653 ptr = ini_get_variable(&sd->save, patches_ptr); |
1655 ptr = ini_get_variable(&sd->save, patches_ptr); |
1654 |
1656 |
1655 success = SetPatchValue(index, patches_ptr, value); |
1657 success = SetPatchValue(index, patches_ptr, value); |
1656 if (success && sd->desc.proc != NULL) sd->desc.proc(value); |
|
1657 return success; |
1658 return success; |
1658 } |
1659 } |
1659 |
1660 |
1660 void IConsoleGetPatchSetting(const char *name) |
1661 void IConsoleGetPatchSetting(const char *name) |
1661 { |
1662 { |