View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002104 | FSSCP | scripting | public | 2010-01-26 15:47 | 2010-01-28 20:29 |
| Reporter | The_E | Assigned To | WMCoolmon | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.6.11 | ||||
| Summary | 0002104: $On HUD Draw scripting hook does not work as advertised | ||||
| Description | While 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. | ||||
| Tags | No tags attached. | ||||
|
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();
|
|
|
Patch committed. |
| 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 |