View Issue Details

IDProjectCategoryView StatusLast Update
0006232The Dark ModFeature proposalpublic16.02.2023 21:37
ReporterDaft Mugi Assigned Tostgatilov  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.10 
Target VersionTDM 2.11Fixed in VersionTDM 2.11 
Summary0006232: Allow player choice of "put away weapons" behavior
Description0003747 changed the behavior of "put away weapons" to make it draw the last used weapon.

Not all players, especially Thief players, will like that changed behavior.

Add a cvar that allows the player to choose which behavior they want:
1. Original TDM behavior. Only holster weapon.
2. TDM 2.03+ behavior. Holster weapon or equip last used weapon when holstered.

Forum: https://forums.thedarkmod.com/index.php?/topic/21724-allow-player-choice-of-put-away-weapons-behavior/
TagsNo tags attached.

Relationships

related to 0003747 resolvedgrayman Holster key used to draw the last weapon 

Activities

stgatilov

stgatilov

21.01.2023 08:38

administrator   ~0015836

I committed the patch in svn rev 10254.
It adds the cvar AND changed the default back to how original TDM worked.
stgatilov

stgatilov

21.01.2023 17:00

administrator   ~0015837

Added option to menu settings:
  r10255 Adjusted name of cvar and description to "Sheathe" term.
  r16753 Added "Toggle Sheathe" option in Controls menu.
Daft Mugi

Daft Mugi

21.01.2023 18:16

developer   ~0015838

Looks good.

How about making the cvar name match the other toggle cvars?
    tdm_sheathe_weapon_behavior -> tdm_toggle_sheathe

To match:
    tdm_toggle_courch
    tdm_toggle_creep
    etc.
Daft Mugi

Daft Mugi

21.01.2023 18:17

developer   ~0015839

I cannot edit my message above.

typo correction: tdm_toggle_crouch
Daft Mugi

Daft Mugi

22.01.2023 20:24

developer   ~0015850

@stgatilov How about changing the "Settings->Controls->General" screen to more closely match 2.10?

I've attached a patch that does that. As well as:
1. Group "toggle" items together.
2. Move "Free Look" next to mouse settings again.
3. Restore spacing between mouse settings and bindings again.
r16758-settings-controls-general-v2.diff (5,065 bytes)   
diff --git guis/mainmenu_settings_controls.gui guis/mainmenu_settings_controls.gui
index f6ad6f6..3edcfbf 100644
--- guis/mainmenu_settings_controls.gui
+++ guis/mainmenu_settings_controls.gui
@@ -1209,14 +1209,14 @@ windowDef SettingsControlsCanvas
 		windowDef SCGeneralText1
 		{
 			rect		TEXT_X_OFFSET, 0, 230, MM_LINE_H
-			text		"#str_02382"	// Toggle Crouch
+			text		"#str_02383"	// Always Run
 			SETTINGS_TEXT
 		}
 
 		windowDef SCGeneralText2
 		{
 			rect		TEXT_X_OFFSET, 17, 230, MM_LINE_H
-			text		"#str_02383"	// Always Run
+			text		"#str_02382"	// Toggle Crouch
 			SETTINGS_TEXT
 		}
 
@@ -1230,86 +1230,79 @@ windowDef SettingsControlsCanvas
 		windowDef SCGeneralText4
 		{
 			rect		TEXT_X_OFFSET, 51, 230, MM_LINE_H
-			text		"#str_02385"	// Free Look
+			text		"#str_menu_ToggleSheathe"	// Toggle Sheathe
 			SETTINGS_TEXT
 		}
 
-		windowDef SCGeneralText41
+		windowDef SCGeneralText5
 		{
 			rect		TEXT_X_OFFSET, 68, 230, MM_LINE_H
-			text		"#str_menu_ToggleSheathe"	// Toggle Sheathe
+			text		"#str_02385"	// Free Look
 			SETTINGS_TEXT
 		}
 
-		windowDef SCGeneralText5
+		windowDef SCGeneralText6
 		{
 			rect		TEXT_X_OFFSET, 85, 230, MM_LINE_H
 			text		"#str_02441"		// Invert Mouse
 			SETTINGS_TEXT
 		}
 
-		windowDef SCGeneralText6
+		windowDef SCGeneralText7
 		{
 			rect		TEXT_X_OFFSET, 102, 230, MM_LINE_H
 			text		"#str_02442"		// Smooth Mouse
 			SETTINGS_TEXT
 		}
 
-		windowDef SCGeneralText7
+		windowDef SCGeneralText8
 		{
 			rect		TEXT_X_OFFSET, 119, 230, MM_LINE_H
 			text		"#str_02443"		// Mouse Sensitivity
 			SETTINGS_TEXT
 		}
 
-		/*windowDef SCGeneralText8
+		/*windowDef SCGeneralText9
 		{
-			rect		TEXT_X_OFFSET, 119, 230, MM_LINE_H
+			rect		TEXT_X_OFFSET, 136, 230, MM_LINE_H
 			text		"Empty"
 			SETTINGS_TEXT
 		}*/
 
-		windowDef SCGeneralText9
-		{
-			rect		TEXT_X_OFFSET, 136, 230, MM_LINE_H
-			text		"#str_07312"		// Objectives
-			SETTINGS_TEXT
-		}
-
 		windowDef SCGeneralText10
 		{
 			rect		TEXT_X_OFFSET, 153, 230, MM_LINE_H
-			text		"#str_07178"	// Quicksave
+			text		"#str_07312"		// Objectives
 			SETTINGS_TEXT
 		}
 
 		windowDef SCGeneralText11
 		{
 			rect		TEXT_X_OFFSET, 170, 230, MM_LINE_H
-			text		"#str_07177"	// Quickload
+			text		"#str_07178"	// Quicksave
 			SETTINGS_TEXT
 		}
 
 		windowDef SCGeneralText12
 		{
 			rect		TEXT_X_OFFSET, 187, 230, MM_LINE_H
- 			text		"#str_02917"	// Save Screenshot
+			text		"#str_07177"	// Quickload
 			SETTINGS_TEXT
 		}
 
-		/*windowDef SCGeneralText13
+		windowDef SCGeneralText13
 		{
-			rect		TEXT_X_OFFSET, 203, 230, MM_LINE_H
-			text		"Empty"
+			rect		TEXT_X_OFFSET, 204, 230, MM_LINE_H
+ 			text		"#str_02917"	// Save Screenshot
 			SETTINGS_TEXT
-		}*/
+		}
 
 		choiceDef SCGeneralBind1
 		{
 			rect		SETTINGS_X_OFFSET, 0, 80, MM_LINE_H
 			choices		"#str_07300"		// Disabled;Enabled
 			values		"0;1"
-			cvar		"tdm_toggle_crouch"
+			cvar		"in_alwaysRun"
 			CHOICE_DEF
 		}
 
@@ -1318,7 +1311,7 @@ windowDef SettingsControlsCanvas
 			rect		SETTINGS_X_OFFSET, 17, 80, MM_LINE_H
 			choices		"#str_07300"		// Disabled;Enabled
 			values		"0;1"
-			cvar		"in_alwaysRun"
+			cvar		"tdm_toggle_crouch"
 			CHOICE_DEF
 		}
 
@@ -1336,20 +1329,20 @@ windowDef SettingsControlsCanvas
 			rect		SETTINGS_X_OFFSET, 51, 80, MM_LINE_H
 			choices		"#str_07300"		// Disabled;Enabled
 			values		"0;1"
-			cvar		"in_freeLook"
+			cvar		"tdm_toggle_sheathe"
 			CHOICE_DEF
 		}
 
-		choiceDef SCGeneralBind41
+		choiceDef SCGeneralBind5
 		{
 			rect		SETTINGS_X_OFFSET, 68, 80, MM_LINE_H
 			choices		"#str_07300"		// Disabled;Enabled
 			values		"0;1"
-			cvar		"tdm_toggle_sheathe"
+			cvar		"in_freeLook"
 			CHOICE_DEF
 		}
 
-		choiceDef SCGeneralBind5
+		choiceDef SCGeneralBind6
 		{
 			rect		SETTINGS_X_OFFSET, 85, 80, MM_LINE_H
 			choices		"#str_04221"		// No;Yes
@@ -1398,46 +1391,39 @@ windowDef SettingsControlsCanvas
 			cvar		"sensitivity"
 		}
 
-		/*bindDef SCGeneralBind8
+		/*bindDef SCGeneralBind9
 		{
-			rect		SETTINGS_X_OFFSET_CONTROLS_GENERAL, 119, 110, MM_LINE_H
-			bind		"_impulse51"
+			rect		SETTINGS_X_OFFSET_CONTROLS_GENERAL, 136, 110, MM_LINE_H
+			bind		"none"
 			BINDINGS_TEXT
 		}*/
 
-		bindDef SCGeneralBind9
-		{
-			rect		SETTINGS_X_OFFSET_CONTROLS, 136, 110, MM_LINE_H
-			bind		"_impulse19"
-			BINDINGS_TEXT
-		}
-
 		bindDef SCGeneralBind10
 		{
 			rect		SETTINGS_X_OFFSET_CONTROLS, 153, 110, MM_LINE_H
-			bind		"savegame quick"
+			bind		"_impulse19"
 			BINDINGS_TEXT
 		}
 
 		bindDef SCGeneralBind11
 		{
 			rect		SETTINGS_X_OFFSET_CONTROLS, 170, 110, MM_LINE_H
-			bind		"loadgame quick"
+			bind		"savegame quick"
 			BINDINGS_TEXT
 		}
 
 		bindDef SCGeneralBind12
 		{
 			rect		SETTINGS_X_OFFSET_CONTROLS, 187, 110, MM_LINE_H
-			bind		"screenshot"
+			bind		"loadgame quick"
 			BINDINGS_TEXT
 		}
 
-		/*bindDef SCGeneralBind13
+		bindDef SCGeneralBind13
 		{
-			rect		SETTINGS_X_OFFSET_CONTROLS, 203, 110, MM_LINE_H
-			bind		"none"
+			rect		SETTINGS_X_OFFSET_CONTROLS, 204, 110, MM_LINE_H
+			bind		"screenshot"
 			BINDINGS_TEXT
-		}*/
+		}
 	}
 }
Daft Mugi

Daft Mugi

24.01.2023 16:39

developer   ~0015877

The last patch (r16758-settings-controls-general-v2.diff) I provided here is no longer necessary.

A different bug tracker (0006242) patch includes those changes and has been committed to SVN assets as rev 16760.
Daft Mugi

Daft Mugi

24.01.2023 22:57

developer   ~0015879

Comment needs updating to reference current cvar name.
r10261-fix-comment.diff (555 bytes)   
diff --git game/Player.cpp game/Player.cpp
index c6f71dd..8dcbccc 100644
--- game/Player.cpp
+++ game/Player.cpp
@@ -3916,7 +3916,7 @@ bool idPlayer::SelectWeapon( int num, bool force )
 
 	CInventoryWeaponItemPtr item = GetCurrentWeaponItem();
 
-	// #6232 - if 'tdm_holster_weapon_behavior' is 1 and
+	// #6232 - if 'tdm_toggle_sheathe' is 1 and
 	// grayman #3747 - if the current and desired indices are zero,
 	// bring back the previous weapon if it's non-zero
 	if ( cv_tdm_toggle_sheathe.GetBool() && (num == 0) && (item->GetWeaponIndex() == 0) )
r10261-fix-comment.diff (555 bytes)   
nbohr1more

nbohr1more

25.01.2023 02:10

developer   ~0015880

Rev 10262
Daft Mugi

Daft Mugi

15.02.2023 20:01

developer   ~0015942

The cvar description should match settings menu.

Patch: https://gist.github.com/daftmugi/300168c0b74553d490db62b5c577507b
stgatilov

stgatilov

16.02.2023 21:37

administrator   ~0015950

Committed in svn rev 10275.

Issue History

Date Modified Username Field Change
15.01.2023 03:36 Daft Mugi New Issue
15.01.2023 03:38 Daft Mugi Relationship added related to 0003747
15.01.2023 03:49 Daft Mugi Description Updated
21.01.2023 08:38 stgatilov Note Added: 0015836
21.01.2023 17:00 stgatilov Note Added: 0015837
21.01.2023 17:00 stgatilov Fixed in Version => TDM 2.11
21.01.2023 17:00 stgatilov Target Version => TDM 2.11
21.01.2023 17:00 stgatilov Assigned To => stgatilov
21.01.2023 17:00 stgatilov Status new => suspended
21.01.2023 17:00 stgatilov Status suspended => resolved
21.01.2023 17:00 stgatilov Resolution open => fixed
21.01.2023 18:16 Daft Mugi Note Added: 0015838
21.01.2023 18:17 Daft Mugi Note Added: 0015839
22.01.2023 20:24 Daft Mugi Note Added: 0015850
22.01.2023 20:24 Daft Mugi File Added: r16758-settings-controls-general-v2.diff
22.01.2023 20:24 Daft Mugi File Added: settings-controls-general-v2.jpg
24.01.2023 16:39 Daft Mugi Note Added: 0015877
24.01.2023 22:57 Daft Mugi Note Added: 0015879
24.01.2023 22:57 Daft Mugi File Added: r10261-fix-comment.diff
25.01.2023 02:10 nbohr1more Note Added: 0015880
15.02.2023 20:01 Daft Mugi Note Added: 0015942
16.02.2023 21:37 stgatilov Note Added: 0015950