2018-09-22 21:33 EDT


View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0003106FSSCPHUDpublic2014-09-24 02:37
ReporterYarn 
Assigned ToYarn 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Platformx64OSWindows 7OS Version
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.
Attached Files
  • patch file icon mantis3106.patch (532 bytes) 2014-09-13 02:41 -
    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;
    
    patch file icon mantis3106.patch (532 bytes) 2014-09-13 02:41 +

-Relationships
+Relationships

-Notes

~0016279

m_m (developer)

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.

~0016280

Yarn (developer)

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

~0016290

Goober5000 (administrator)

Nicely spotted, good fix. Committing patch...
+Notes

+Related Changesets

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