View Issue Details

IDProjectCategoryView StatusLast Update
0003023FSSCPuser interfacepublic2014-04-28 11:22
ReporterYarn Assigned ToYarn  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindows 7 
Product Version3.7.1 
Fixed in Version3.7.1 
Summary0003023: [patch] Fix for Vasudan heads cheat
DescriptionCurrently, the heads cheat (activated by typing "humanheadsinside.", including the period, at the Vasudan main hall) does not work properly because the graphic and sound changes are done during mainhall.tbl parsing.

The attached patch fixes this by moving this function from parse_main_hall_table() to main_hall_init(). It also checks the name of the background bitmap 1) to check whether the current main hall is really compatible with the cheat, and 2) to pick the appropriate background bitmap and options animation.
Additional InformationIt's probably a better idea to make this customizable in mainhall.tbl. If such a thing is desirable, I think I can code that up.
TagsNo tags attached.

Activities

Yarn

2014-03-18 20:56

developer  

VasudanHeadsFix.patch (2,123 bytes)   
Index: code/menuui/mainhallmenu.cpp
===================================================================
--- code/menuui/mainhallmenu.cpp	(revision 10506)
+++ code/menuui/mainhallmenu.cpp	(working copy)
@@ -445,6 +445,29 @@
 	// init tooltip shader						// nearly black
 	gr_create_shader(&Main_hall_tooltip_shader, 5, 5, 5, 168);
 
+	// are we funny?
+	if (Vasudan_funny && main_hall_is_vasudan()) {
+		if (!stricmp(Main_hall->bitmap.c_str(), "vhall")) {
+			Main_hall->door_sounds.at(OPTIONS_REGION).at(0) = SND_VASUDAN_BUP;
+			Main_hall->door_sounds.at(OPTIONS_REGION).at(1) = SND_VASUDAN_BUP;
+			
+			// set head anim. hehe
+			Main_hall->door_anim_name.at(OPTIONS_REGION) = "vhallheads";
+			
+			// set the background
+			Main_hall->bitmap = "vhallhead";
+		} else if (!stricmp(Main_hall->bitmap.c_str(), "2_vhall")) {
+			Main_hall->door_sounds.at(OPTIONS_REGION).at(0) = SND_VASUDAN_BUP;
+			Main_hall->door_sounds.at(OPTIONS_REGION).at(1) = SND_VASUDAN_BUP;
+			
+			// set head anim. hehe
+			Main_hall->door_anim_name.at(OPTIONS_REGION) = "2_vhallheads";
+			
+			// set the background
+			Main_hall->bitmap = "2_vhallhead";
+		}
+	}
+
 	// load the background bitmap
 	Main_hall_bitmap = bm_load(Main_hall->bitmap);
 	if (Main_hall_bitmap < 0) {
@@ -2065,23 +2088,6 @@
 		count++;
 	}
 
-	// are we funny?
-	if (Vasudan_funny) {
-		int hall = main_hall_id();
-
-		Main_hall_defines.at(GR_640).at(hall).door_sounds.at(OPTIONS_REGION).at(0) = SND_VASUDAN_BUP;
-		Main_hall_defines.at(GR_640).at(hall).door_sounds.at(OPTIONS_REGION).at(1) = SND_VASUDAN_BUP;
-		Main_hall_defines.at(GR_1024).at(hall).door_sounds.at(OPTIONS_REGION).at(0) = SND_VASUDAN_BUP;
-		Main_hall_defines.at(GR_1024).at(hall).door_sounds.at(OPTIONS_REGION).at(1) = SND_VASUDAN_BUP;
-
-		// set head anim. hehe
-		Main_hall_defines.at(GR_1024).at(hall).door_anim_name.at(OPTIONS_REGION) = "2_vhallheads";
-
-		// set the background
-		Main_hall_defines.at(GR_640).at(hall).bitmap = "vhallhead";
-		Main_hall_defines.at(GR_1024).at(hall).bitmap = "2_vhallhead";
-	}
-
 	// free up memory from parsing the mainhall tbl
 	stop_parse();
 }
VasudanHeadsFix.patch (2,123 bytes)   

The_E

2014-03-23 15:39

administrator   ~0015676

Fix committed to trunk@10519.

niffiwan

2014-04-28 11:22

developer   ~0015717

Attribution

Related Changesets

fs2open: trunk r10519

2014-03-23 10:43

The_E


Ported: N/A

Details Diff
Fix for Mantis 3023 by Yarn: Make sure the vasudan mainhall fun cheat works again
Affected Issues
0003023
mod - /trunk/fs2_open/code/menuui/mainhallmenu.cpp Diff File

Issue History

Date Modified Username Field Change
2014-03-18 20:56 Yarn New Issue
2014-03-18 20:56 Yarn File Added: VasudanHeadsFix.patch
2014-03-23 15:39 The_E Changeset attached => fs2open trunk r10519
2014-03-23 15:39 The_E Note Added: 0015676
2014-03-23 15:39 The_E Status new => resolved
2014-03-23 15:39 The_E Resolution open => fixed
2014-04-28 11:22 niffiwan Assigned To => Yarn
2014-04-28 11:22 niffiwan Note Added: 0015717
2014-04-28 11:22 niffiwan Status resolved => feedback
2014-04-28 11:22 niffiwan Resolution fixed => reopened
2014-04-28 11:22 niffiwan Status feedback => resolved
2014-04-28 11:22 niffiwan Fixed in Version => 3.7.1
2014-04-28 11:22 niffiwan Resolution reopened => fixed