@@ -1826,6 +1826,58 @@ static int entry_index;
1826
1826
static char entry_string_index [ENTRY_STRING_BFR_SIZE ]; // points to new strings while editing
1827
1827
static int choice_value ;
1828
1828
1829
+ /////////////////////////////
1830
+ //
1831
+ // Custom Skill Functions [based off Nugget]
1832
+
1833
+ enum
1834
+ {
1835
+ cskill_new_game ,
1836
+ cskill_pistol_start ,
1837
+ cskill_loadout_current
1838
+ } cskill_mode_e ;
1839
+
1840
+ static void M_StartCustomSkill (int mode )
1841
+ {
1842
+ // Use custom skill (-1 to match gameskill)
1843
+ chosen_skill = num_skills - 1 ;
1844
+
1845
+ dsda_UpdateCustomSkill (chosen_skill );
1846
+
1847
+ if (mode == cskill_new_game || gamestate == GS_DEMOSCREEN )
1848
+ M_FinishGameSelection ();
1849
+ else if (mode == cskill_pistol_start || !in_game )
1850
+ G_DeferedInitNew (chosen_skill , gameepisode , gamemap );
1851
+ else if (mode == cskill_loadout_current )
1852
+ G_RestartWithLoadout ();
1853
+
1854
+ M_ClearMenus ();
1855
+ }
1856
+
1857
+ static void StartCustomSkill (int mode )
1858
+ {
1859
+ M_StartCustomSkill (mode );
1860
+
1861
+ M_LeaveSetupMenu ();
1862
+ M_ClearMenus ();
1863
+ S_StartVoidSound (g_sfx_swtchx );
1864
+ }
1865
+
1866
+ static void CSNewGame (void )
1867
+ {
1868
+ StartCustomSkill (cskill_new_game );
1869
+ }
1870
+
1871
+ static void CSPistolStart (void )
1872
+ {
1873
+ StartCustomSkill (cskill_pistol_start );
1874
+ }
1875
+
1876
+ static void CSCurrentLoadout (void )
1877
+ {
1878
+ StartCustomSkill (cskill_loadout_current );
1879
+ }
1880
+
1829
1881
/////////////////////////////
1830
1882
//
1831
1883
// M_ItemDisabled
@@ -1841,6 +1893,14 @@ static dboolean M_ItemDisabled(const setup_menu_t* s)
1841
1893
if (dsda_StrictMode () && dsda_IsStrictConfig (s -> config_id ))
1842
1894
return true;
1843
1895
1896
+ // Hexen Stuff
1897
+ if (hexen )
1898
+ {
1899
+ // Hexen doesn't allow pistolstart + loadout doesn't work due to key management
1900
+ if (s -> action == CSPistolStart || s -> action == CSCurrentLoadout )
1901
+ return true;
1902
+ }
1903
+
1844
1904
return false;
1845
1905
}
1846
1906
@@ -3616,58 +3676,6 @@ static void M_DrawCompatibility(void)
3616
3676
M_DrawScreenItems (current_setup_menu , DEFAULT_LIST_Y );
3617
3677
}
3618
3678
3619
- /////////////////////////////
3620
- //
3621
- // Custom Skill Functions [based off Nugget]
3622
-
3623
- enum
3624
- {
3625
- cskill_new_game ,
3626
- cskill_pistol_start ,
3627
- cskill_loadout_current
3628
- } cskill_mode_e ;
3629
-
3630
- static void M_StartCustomSkill (int mode )
3631
- {
3632
- // Use custom skill (-1 to match gameskill)
3633
- chosen_skill = num_skills - 1 ;
3634
-
3635
- dsda_UpdateCustomSkill (chosen_skill );
3636
-
3637
- if (mode == cskill_new_game || gamestate == GS_DEMOSCREEN )
3638
- M_FinishGameSelection ();
3639
- else if (mode == cskill_pistol_start || !in_game )
3640
- G_DeferedInitNew (chosen_skill , gameepisode , gamemap );
3641
- else if (mode == cskill_loadout_current )
3642
- G_RestartWithLoadout ();
3643
-
3644
- M_ClearMenus ();
3645
- }
3646
-
3647
- static void StartCustomSkill (int mode )
3648
- {
3649
- M_StartCustomSkill (mode );
3650
-
3651
- M_LeaveSetupMenu ();
3652
- M_ClearMenus ();
3653
- S_StartVoidSound (g_sfx_swtchx );
3654
- }
3655
-
3656
- static void CSNewGame (void )
3657
- {
3658
- StartCustomSkill (cskill_new_game );
3659
- }
3660
-
3661
- static void CSPistolStart (void )
3662
- {
3663
- StartCustomSkill (cskill_pistol_start );
3664
- }
3665
-
3666
- static void CSCurrentLoadout (void )
3667
- {
3668
- StartCustomSkill (cskill_loadout_current );
3669
- }
3670
-
3671
3679
3672
3680
/////////////////////////////
3673
3681
//
@@ -5092,6 +5100,9 @@ static dboolean M_SetupCommonSelectResponder(int ch, int action, event_t* ev)
5092
5100
if (ptr1 -> m_flags & S_FUNC )
5093
5101
{
5094
5102
if (action == MENU_ENTER ) {
5103
+ if (M_ItemDisabled (ptr1 ))
5104
+ return true;
5105
+
5095
5106
if (ptr1 -> action )
5096
5107
ptr1 -> action ();
5097
5108
0 commit comments