View Issue Details

IDProjectCategoryView StatusLast Update
0002327FSSCPgameplaypublic2012-05-02 11:35
ReporterAxem Assigned ToEli2  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.12 
Summary0002327: Strange behavior with key-press
DescriptionIn an attempt to make a toggle with key-press, using keys such as 1,2,3,4 show odd behavior compared to keys like T or L or what have you.

See attached mission to see the problem. In this case pressing 1 will cause the toggling sexp to sometimes run twice or run once. It seems to be random when it runs twice. Pressing T will cause the a different toggling sexp to run normally.

In some cases in other missions, the number keys just toggle indefinitely but using more normal keys won't show any problems.

My only guess at any sort of problem source is that the number keys are multiplayer only keys.
TagsNo tags attached.

Activities

2010-10-14 23:39

 

toggletest.fs2 (4,230 bytes)

ni1s

2010-10-15 01:13

reporter   ~0012410

I can't reproduce this with neither debug or release builds(r6607) on Linux.

Eli2

2012-01-25 03:10

developer   ~0013152

Attaced fix, testing of message code required.

Eli2

2012-01-27 16:05

developer  

0001-Fix-for-mantis-2327.svn.patch (1,918 bytes)   
Index: code/controlconfig/controlsconfig.cpp
===================================================================
--- code/controlconfig/controlsconfig.cpp
+++ code/controlconfig/controlsconfig.cpp
@@ -2152,10 +2152,8 @@ int check_control(int id, int key)
 			z &= KEY_MASK;
 
 			if (keyd_pressed[z] || key_down_count(z)) {
-				if ( !hud_squadmsg_read_key(z) ) {
-					control_used(id);
-					return 1;
-				}
+				control_used(id);
+				return 1;
 			}
 		}

Index: code/controlconfig/controlsconfigcommon.cpp
===================================================================
--- code/controlconfig/controlsconfigcommon.cpp
+++ code/controlconfig/controlsconfigcommon.cpp
@@ -163,10 +163,10 @@ config_item Control_config[CCFG_MAX + 1] = {
 	{             KEY_SHIFTED | KEY_B,				-1, TARGET_TAB,	true, "Target Previous Hostile Bomb or Bomber" },
 
 	// multiplayer messaging keys
-	{									 KEY_1,				-1, COMPUTER_TAB, true, "(Multiplayer) Message All", CC_TYPE_CONTINUOUS },
-	{									 KEY_2,				-1, COMPUTER_TAB, true, "(Multiplayer) Message Friendly", CC_TYPE_CONTINUOUS },
-	{									 KEY_3,				-1, COMPUTER_TAB, true, "(Multiplayer) Message Hostile", CC_TYPE_CONTINUOUS },
-	{									 KEY_4,				-1, COMPUTER_TAB, true, "(Multiplayer) Message Target", CC_TYPE_CONTINUOUS },
+	{									 KEY_1,				-1, COMPUTER_TAB, true, "(Multiplayer) Message All" },
+	{									 KEY_2,				-1, COMPUTER_TAB, true, "(Multiplayer) Message Friendly" },
+	{									 KEY_3,				-1, COMPUTER_TAB, true, "(Multiplayer) Message Hostile" },
+	{									 KEY_4,				-1, COMPUTER_TAB, true, "(Multiplayer) Message Target" },
 	{ KEY_ALTED	|					 KEY_X,				-1, COMPUTER_TAB, true, "(Multiplayer) Observer Zoom to Target"},	
 	{             KEY_SHIFTED | KEY_PERIOD,		-1, COMPUTER_TAB,	true, "Increase Time Compression" },
 	{             KEY_SHIFTED | KEY_COMMA,			-1, COMPUTER_TAB,	true, "Decrease Time Compression" },
-- 
1.7.5.4

Eli2

2012-01-27 16:06

developer   ~0013167

Attached new minimal fix.

karajorma

2012-02-23 05:05

administrator   ~0013345

The patch looks good. I think those keys were set to CC_TYPE_CONTINUOUS so that they could be used with the in-game voice transmission code. But that hasn't worked for years as far as I'm aware so that shouldn't be an issue.

Echelon9

2012-02-24 09:14

developer   ~0013354

Patch looks good

MjnMixael

2012-02-27 14:28

manager   ~0013364

Patch worked for me.

Echelon9

2012-03-04 13:05

developer   ~0013384

Fix committed to trunk@8563.

niffiwan

2012-05-02 11:35

developer   ~0013499

Fix committed to fs2_open_3_6_14@8715.

Related Changesets

fs2open: trunk r8563

2012-03-04 08:05

Echelon9


Ported: N/A

Details Diff
Fix for Mantis 2327 - Strange behavior with key-press, patch from Eli2 Affected Issues
0002327
mod - /trunk/fs2_open/code/controlconfig/controlsconfigcommon.cpp Diff File
mod - /trunk/fs2_open/code/controlconfig/controlsconfig.cpp Diff File

fs2open: fs2_open_3_6_14 r8715

2012-05-02 07:36

niffiwan


Ported: N/A

Details Diff
Backport: Trunk r8563; Fix for Mantis 2327 - Strange behavior with key-press, patch from Eli2 Affected Issues
0002327
mod - /branches/fs2_open_3_6_14/code/controlconfig/controlsconfigcommon.cpp Diff File
mod - /branches/fs2_open_3_6_14/code/controlconfig/controlsconfig.cpp Diff File

Issue History

Date Modified Username Field Change
2010-10-14 23:39 Axem New Issue
2010-10-14 23:39 Axem File Added: toggletest.fs2
2010-10-15 01:13 ni1s Note Added: 0012410
2010-11-12 23:56 The_E Priority normal => high
2012-01-24 01:26 Eli2 Assigned To => Eli2
2012-01-24 01:26 Eli2 Status new => assigned
2012-01-24 01:26 Eli2 Priority high => normal
2012-01-25 03:09 Eli2 File Added: 0001-Fix-for-2327-and-cleanups.svn.patch
2012-01-25 03:10 Eli2 Note Added: 0013152
2012-01-25 03:11 Eli2 Assigned To Eli2 =>
2012-01-25 03:11 Eli2 Status assigned => feedback
2012-01-25 03:17 Eli2 File Deleted: 0001-Fix-for-2327-and-cleanups.svn.patch
2012-01-25 03:17 Eli2 File Added: 0001-Fix-for-2327-and-cleanups.svn.patch
2012-01-25 03:51 Valathil Assigned To => Eli2
2012-01-25 03:51 Valathil Status feedback => code review
2012-01-27 16:05 Eli2 File Deleted: 0001-Fix-for-2327-and-cleanups.svn.patch
2012-01-27 16:05 Eli2 File Added: 0001-Fix-for-mantis-2327.svn.patch
2012-01-27 16:06 Eli2 Note Added: 0013167
2012-02-23 05:05 karajorma Note Added: 0013345
2012-02-24 09:14 Echelon9 Note Added: 0013354
2012-02-27 14:28 MjnMixael Note Added: 0013364
2012-03-04 13:05 Echelon9 Changeset attached => fs2open trunk r8563
2012-03-04 13:05 Echelon9 Note Added: 0013384
2012-03-04 13:05 Echelon9 Status code review => resolved
2012-03-04 13:05 Echelon9 Resolution open => fixed
2012-05-02 11:35 niffiwan Changeset attached => fs2open fs2_open_3_6_14 r8715
2012-05-02 11:35 niffiwan Note Added: 0013499