View Issue Details

IDProjectCategoryView StatusLast Update
0003106FSSCPHUDpublic2014-09-24 06:37
ReporterYarn Assigned ToYarn  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindows 7 
Product Version3.7.2 RC4 
Target Version3.7.2Fixed in Version3.7.2 
Summary0003106: Font parameter in hud_gauges.tbl not parsed correctly [patch included]
DescriptionWhenever a HUD gauge uses the Font parameter, the value gets assigned to the global variable Hud_font instead of the local variable font_num. This results in the gauge using font index 0 instead of what the Font parameter specifies, along with maybe some other problems.
Additional InformationA fix for this bug is attached.
TagsNo tags attached.

Activities

Yarn

2014-09-13 06:41

developer  

mantis3106.patch (532 bytes)   
Index: code/hud/hudparse.cpp
===================================================================
--- code/hud/hudparse.cpp	(revision 11075)
+++ code/hud/hudparse.cpp	(working copy)
@@ -1196,7 +1196,7 @@
 	}
 
 	if(optional_string("Font:")) {
-		stuff_int(&Hud_font);
+		stuff_int(&font_num);
 	} else {
 		if ( hud_font >=0 ) {
 			font_num = hud_font;
@@ -2929,7 +2929,7 @@
 	}
 
 	if(optional_string("$Font:")) {
-		stuff_int(&Hud_font);
+		stuff_int(&font_num);
 	} else {
 		if ( hud_font >=0 ) {
 			font_num = hud_font;
mantis3106.patch (532 bytes)   

m_m

2014-09-13 19:20

developer   ~0016279

The patch looks good to me.
What are the effects on existing mods? Given that nobody noticed this until now it shouldn't be a big problem. If that is the case I can commit this soon.

Yarn

2014-09-14 00:06

developer   ~0016280

The only problem that I'm aware of is that, if this patch is committed, Blue Planet 2 would no longer display the match-speed icon in the throttle gauge and the arrows in the weapons gauge because that mod configures those gauges to use font 3 (that is, the fourth font). Fortunately, I did make a patch VP to fix this and a few other things:

http://www.hard-light.net/forums/index.php?topic=88351.msg1763237#msg1763237

Goober5000

2014-09-24 02:42

administrator   ~0016290

Nicely spotted, good fix. Committing patch...

Related Changesets

fs2open: trunk r11080

2014-09-23 23:18

Goober5000


Ported: N/A

Details Diff
Yarn's patch for Mantis 0003106 (Font parameter in hud_gauges.tbl not parsed correctly) Affected Issues
0003106
mod - /trunk/fs2_open/code/hud/hudparse.cpp Diff File

Issue History

Date Modified Username Field Change
2014-09-13 06:41 Yarn New Issue
2014-09-13 06:41 Yarn Status new => assigned
2014-09-13 06:41 Yarn Assigned To => Yarn
2014-09-13 06:41 Yarn File Added: mantis3106.patch
2014-09-13 06:41 Yarn Status assigned => code review
2014-09-13 19:20 m_m Note Added: 0016279
2014-09-14 00:06 Yarn Note Added: 0016280
2014-09-24 02:42 Goober5000 Note Added: 0016290
2014-09-24 02:42 Goober5000 Status code review => resolved
2014-09-24 02:42 Goober5000 Resolution open => fixed
2014-09-24 02:42 Goober5000 Changeset attached => fs2open trunk r11080
2014-09-24 06:37 Goober5000 Fixed in Version => 3.7.2