View Issue Details

IDProjectCategoryView StatusLast Update
0002104FSSCPscriptingpublic2010-01-28 20:29
ReporterThe_E Assigned ToWMCoolmon  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.11 
Summary0002104: $On HUD Draw scripting hook does not work as advertised
DescriptionWhile working on some scripts, it occurred to me that $On HUD Draw does not react correctly to several game camera modes. It is run when the camera is set to external, or to view from a different ship.
It also doesn't react correctly to the hud-disabled-except-messages sexp. Patch is attached.
TagsNo tags attached.

Activities

2010-01-27 02:24

 

On HUD Draw.patch (756 bytes)   
Index: code/freespace2/freespace.cpp
===================================================================
--- code/freespace2/freespace.cpp	(revision 5844)
+++ code/freespace2/freespace.cpp	(working copy)
@@ -4841,9 +4841,13 @@
 				game_render_hud_3d(cid);
 			}
 
+
 			Script_system.SetHookObject("Self", Viewer_obj);
-			Script_system.RunBytecode(Script_hudhook);
-			Script_system.RunCondition(CHA_HUDDRAW, '\0', NULL, Viewer_obj);
+			if (!hud_disabled_except_messages() && !(Viewer_mode & (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY))) 
+			{
+				Script_system.RunBytecode(Script_hudhook);
+				Script_system.RunCondition(CHA_HUDDRAW, '\0', NULL, Viewer_obj);
+			}
 			Script_system.RemHookVar("Self");
 
 			gr_reset_clip();
On HUD Draw.patch (756 bytes)   

Wanderer

2010-01-28 20:29

developer   ~0011595

Patch committed.

Issue History

Date Modified Username Field Change
2010-01-26 15:47 The_E New Issue
2010-01-26 15:47 The_E Status new => assigned
2010-01-26 15:47 The_E Assigned To => WMCoolmon
2010-01-27 02:24 The_E File Added: On HUD Draw.patch
2010-01-28 20:29 Wanderer Note Added: 0011595
2010-01-28 20:29 Wanderer Status assigned => resolved
2010-01-28 20:29 Wanderer Resolution open => fixed