The warp camera being the external camera which shows your ship warp out. This is an extremely simple patch adding an optional ai_profiles flag to disable it.
Making it an ai_profiles flag might sound odd, but the reasons for this are:
- It's really simple. Adding a SEXP is more complicated.
- I have no idea how to add such an option to FRED.
- It seems very unlikely that one would want to mix both behaviours in the same mod anyway.
- I didn't dare to simply remove the external camera from the hyperspace warp type.
It's a useful option to have, because overriding the warp camera while retaining the HUD on-screen is either impossible or really messy even using scripting.
Index: ai/ai_profiles.cpp
===================================================================
--- ai/ai_profiles.cpp (revision 7892)
+++ ai/ai_profiles.cpp (working copy)
@@ -462,6 +462,8 @@
Default_ship_select_effect = 0;
}
+ set_flag(profile, "$no warp camera:", AIPF2_NO_WARP_CAMERA, AIP_FLAG2);
+
// if we've been through once already and are at the same place, force a move
if ( saved_Mp && (saved_Mp == Mp) )
{
Index: ai/ai_profiles.h
===================================================================
--- ai/ai_profiles.h (revision 7892)
+++ ai/ai_profiles.h (working copy)
@@ -61,6 +61,7 @@
#define AIPF2_ALLOW_PRIMARY_LINK_DELAY (1 << 7)
#define AIPF2_BEAMS_DAMAGE_WEAPONS (1 << 8)
#define AIPF2_PLAYER_WEAPON_SCALE_FIX (1 << 9)
+#define AIPF2_NO_WARP_CAMERA (1 << 10)
// AI Path types
#define AI_PATH_MODE_NORMAL 0
Index: freespace2/freespace.cpp
===================================================================
--- freespace2/freespace.cpp (revision 7892)
+++ freespace2/freespace.cpp (working copy)
@@ -5394,10 +5394,12 @@
mprintf(( "Hit target speed. Starting warp effect and moving to stage 2!\n" ));
shipfx_warpout_start( Player_obj );
Player->control_mode = PCM_WARPOUT_STAGE2;
- Player->saved_viewer_mode = Viewer_mode;
- Viewer_mode |= VM_WARP_CHASE;
-
- Warp_camera = warp_camera(Player_obj);
+
+ if (!(The_mission.ai_profile->flags2 & AIPF2_NO_WARP_CAMERA)) {
+ Player->saved_viewer_mode = Viewer_mode;
+ Viewer_mode |= VM_WARP_CHASE;
+ Warp_camera = warp_camera(Player_obj);
+ }
}
break;
Of course, if there's a strong sentiment that it should really be a SEXP, then I can make it one.
EDIT: Committed to trunk in r7982.