mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
change "special warp physics" to "supercap warp physics"
Per discussion with @Baezon, this is a more precise term.
This commit is contained in:
1 parent
8c0bc25303
commit
ea5c328c13
11 files changed
+23
-23
No files matched your search
@@ -2865,7 +2865,7 @@ bool p_object::has_display_name() {
|
||||
return flags[Mission::Parse_Object_Flags::SF_Has_display_name];
|
||||
}
|
||||
|
||||
extern int parse_warp_params(const WarpParams *inherit_from, WarpDirection direction, const char *info_type_name, const char *sip_name, bool set_special_warp_physics = false);
|
||||
extern int parse_warp_params(const WarpParams *inherit_from, WarpDirection direction, const char *info_type_name, const char *sip_name, bool set_supercap_warp_physics = false);
|
||||
|
||||
/**
|
||||
* Mp points at the text of an object, which begins with the "$Name:" field.
|
||||
|
||||
+5
-5
@@ -2649,7 +2649,7 @@ static int parse_and_add_briefing_icon_info()
|
||||
*
|
||||
* If we are creating a ship, we want to inherit the parameters of the ship class, then override on a field-by-field basis.
|
||||
*/
|
||||
int parse_warp_params(const WarpParams *inherit_from, WarpDirection direction, const char *info_type_name, const char *info_name, bool set_special_warp_physics)
|
||||
int parse_warp_params(const WarpParams *inherit_from, WarpDirection direction, const char *info_type_name, const char *info_name, bool set_supercap_warp_physics)
|
||||
{
|
||||
Assert(info_type_name != nullptr);
|
||||
Assert(info_name != nullptr);
|
||||
@@ -2757,13 +2757,13 @@ int parse_warp_params(const WarpParams *inherit_from, WarpDirection direction, c
|
||||
}
|
||||
|
||||
// we might need to explicitly set this flag; but if so, the modder has the option of unsetting it
|
||||
if (set_special_warp_physics)
|
||||
params.special_warp_physics = true;
|
||||
if (set_supercap_warp_physics)
|
||||
params.supercap_warp_physics = true;
|
||||
|
||||
sprintf(str, "$Special warp%s physics:", (direction == WarpDirection::WARP_IN) ? "in" : "out");
|
||||
sprintf(str, "$Supercap warp%s physics:", (direction == WarpDirection::WARP_IN) ? "in" : "out");
|
||||
if (optional_string(str))
|
||||
{
|
||||
stuff_boolean(¶ms.special_warp_physics);
|
||||
stuff_boolean(¶ms.supercap_warp_physics);
|
||||
}
|
||||
|
||||
if (direction == WarpDirection::WARP_OUT)
|
||||
|
||||
@@ -3197,7 +3197,7 @@ bool WarpParams::operator==(const WarpParams &other)
|
||||
&& time == other.time
|
||||
&& accel_exp == other.accel_exp
|
||||
&& warp_type == other.warp_type
|
||||
&& special_warp_physics == other.special_warp_physics
|
||||
&& supercap_warp_physics == other.supercap_warp_physics
|
||||
&& warpout_engage_time == other.warpout_engage_time
|
||||
&& warpout_player_speed == other.warpout_player_speed;
|
||||
}
|
||||
@@ -3512,7 +3512,7 @@ int WE_Default::warpStart()
|
||||
objp->phys_info.flags &= ~PF_SUPERCAP_WARP_IN;
|
||||
|
||||
// maybe turn on warpout physics
|
||||
if (params->special_warp_physics) {
|
||||
if (params->supercap_warp_physics) {
|
||||
objp->phys_info.flags |= PF_SUPERCAP_WARP_OUT;
|
||||
}
|
||||
}
|
||||
@@ -3632,7 +3632,7 @@ int WE_Default::warpFrame(float frametime)
|
||||
this->warpEnd();
|
||||
|
||||
// notify physics to slow down
|
||||
if (params->special_warp_physics) {
|
||||
if (params->supercap_warp_physics) {
|
||||
// let physics know this is a special warp in
|
||||
objp->phys_info.flags |= PF_SUPERCAP_WARP_IN;
|
||||
}
|
||||
@@ -3754,7 +3754,7 @@ float shipfx_calculate_arrival_warp_distance(object *objp)
|
||||
|
||||
// the total distance is a full length from its current position, plus the distance it takes to slow down from its warping speed
|
||||
float decel_time_const = objp->phys_info.forward_decel_time_const;
|
||||
if (warpin_params->special_warp_physics) {
|
||||
if (warpin_params->supercap_warp_physics) {
|
||||
// super cap style warpins are annoying, one time constant while above their max speed, a different one while slowing down from there
|
||||
float supercap_slowdown_dist = (warping_speed - (objp->phys_info.max_vel.xyz.z + SUPERCAP_WARP_EXCESS_SPD_THRESHOLD)) * SUPERCAP_WARP_T_CONST;
|
||||
float regular_slowdown_dist = (objp->phys_info.max_vel.xyz.z + SUPERCAP_WARP_EXCESS_SPD_THRESHOLD) * decel_time_const;
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ public:
|
||||
int time = 0; // in ms
|
||||
float accel_exp = 1.0f;
|
||||
int warp_type = WT_DEFAULT;
|
||||
bool special_warp_physics = false;
|
||||
bool supercap_warp_physics = false;
|
||||
|
||||
// only valid for warpout
|
||||
int warpout_engage_time = -1; // in ms
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "ship/shipfx.h"
|
||||
#include "species_defs/species_defs.h"
|
||||
|
||||
extern int parse_warp_params(const WarpParams *inherit_from, WarpDirection direction, const char *info_type_name, const char *info_name, bool set_special_warp_physics = false);
|
||||
extern int parse_warp_params(const WarpParams *inherit_from, WarpDirection direction, const char *info_type_name, const char *info_name, bool set_supercap_warp_physics = false);
|
||||
|
||||
SCP_vector<species_info> Species_info;
|
||||
|
||||
|
||||
+1
-1
@@ -2315,7 +2315,7 @@ BEGIN
|
||||
EDITTEXT IDC_ACCEL_EXP,161,153,103,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_RADIUS,161,172,103,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_ANIM,161,191,103,12,ES_AUTOHSCROLL
|
||||
CONTROL "",IDC_SPECIAL_WARP_PHYSICS,"Button",BS_AUTOCHECKBOX,161,210,103,12
|
||||
CONTROL "",IDC_SUPERCAP_WARP_PHYSICS,"Button",BS_AUTOCHECKBOX,161,210,103,12
|
||||
EDITTEXT IDC_PLAYER_WARPOUT_SPEED,161,229,103,12,ES_AUTOHSCROLL
|
||||
LTEXT "All of these parameters are optional, and a mission designer will usually not need to override more than one or two. These parameters are the same as those found in ships.tbl.",IDC_STATIC,7,7,257,29
|
||||
END
|
||||
|
||||
@@ -3363,9 +3363,9 @@ int CFred_mission_save::save_warp_params(WarpDirection direction, ship *shipp)
|
||||
fout("\n%s animation: %s", prefix, shipp_params->anim);
|
||||
}
|
||||
|
||||
if (shipp_params->special_warp_physics != sip_params->special_warp_physics)
|
||||
if (shipp_params->supercap_warp_physics != sip_params->supercap_warp_physics)
|
||||
{
|
||||
fout("\n$Special warp%s physics: %s", direction == WarpDirection::WARP_IN ? "in" : "out", shipp_params->special_warp_physics ? "YES" : "NO");
|
||||
fout("\n$Supercap warp%s physics: %s", direction == WarpDirection::WARP_IN ? "in" : "out", shipp_params->supercap_warp_physics ? "YES" : "NO");
|
||||
}
|
||||
|
||||
if (direction == WarpDirection::WARP_OUT && shipp_params->warpout_player_speed != sip_params->warpout_player_speed)
|
||||
|
||||
+1
-1
@@ -1228,7 +1228,7 @@
|
||||
#define IDC_SPIN_EM_FALLOFF 1695
|
||||
#define IDC_SPIN_NOISE_COLOR_B 1696
|
||||
#define IDC_NOISE_COLOR_B 1697
|
||||
#define IDC_SPECIAL_WARP_PHYSICS 1698
|
||||
#define IDC_SUPERCAP_WARP_PHYSICS 1698
|
||||
#define IDC_NOISE_INTENSITY 1700
|
||||
#define IDC_SPIN_NOISE_INTENSITY 1701
|
||||
#define IDC_NOISE_RESOLUTION 1702
|
||||
|
||||
@@ -32,7 +32,7 @@ warp_params_dlg::warp_params_dlg(CWnd* pParent) : CDialog(warp_params_dlg::IDD,
|
||||
m_accel_exp = _T("");
|
||||
m_radius = _T("");
|
||||
m_anim = _T("");
|
||||
m_special_warp_physics = FALSE;
|
||||
m_supercap_warp_physics = FALSE;
|
||||
m_player_warpout_speed = _T("");
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
@@ -50,7 +50,7 @@ void warp_params_dlg::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Text(pDX, IDC_ACCEL_EXP, m_accel_exp);
|
||||
DDX_Text(pDX, IDC_RADIUS, m_radius);
|
||||
DDX_Text(pDX, IDC_ANIM, m_anim);
|
||||
DDX_Check(pDX, IDC_SPECIAL_WARP_PHYSICS, m_special_warp_physics);
|
||||
DDX_Check(pDX, IDC_SUPERCAP_WARP_PHYSICS, m_supercap_warp_physics);
|
||||
DDX_Text(pDX, IDC_PLAYER_WARPOUT_SPEED, m_player_warpout_speed);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
@@ -126,7 +126,7 @@ BOOL warp_params_dlg::OnInitDialog()
|
||||
if (strlen(params->anim) > 0)
|
||||
m_anim = params->anim;
|
||||
|
||||
m_special_warp_physics = params->special_warp_physics ? TRUE : FALSE;
|
||||
m_supercap_warp_physics = params->supercap_warp_physics ? TRUE : FALSE;
|
||||
|
||||
if (params->warpout_player_speed > 0.0f)
|
||||
m_player_warpout_speed.Format(_T("%.2f"), params->warpout_player_speed);
|
||||
@@ -233,7 +233,7 @@ void warp_params_dlg::OnOK()
|
||||
if (m_anim.GetLength() > 0)
|
||||
strcpy_s(params.anim, m_anim);
|
||||
|
||||
params.special_warp_physics = (m_special_warp_physics == TRUE);
|
||||
params.supercap_warp_physics = (m_supercap_warp_physics == TRUE);
|
||||
|
||||
if (!m_warp_in && m_player_warpout_speed.GetLength() > 0)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
CString m_accel_exp;
|
||||
CString m_radius;
|
||||
CString m_anim;
|
||||
BOOL m_special_warp_physics;
|
||||
BOOL m_supercap_warp_physics;
|
||||
CString m_player_warpout_speed;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
@@ -3279,9 +3279,9 @@ int CFred_mission_save::save_warp_params(WarpDirection direction, ship *shipp)
|
||||
fout("\n%s animation: %s", prefix, shipp_params->anim);
|
||||
}
|
||||
|
||||
if (shipp_params->special_warp_physics != sip_params->special_warp_physics)
|
||||
if (shipp_params->supercap_warp_physics != sip_params->supercap_warp_physics)
|
||||
{
|
||||
fout("\n$Special warp%s physics: %s", direction == WarpDirection::WARP_IN ? "in" : "out", shipp_params->special_warp_physics ? "YES" : "NO");
|
||||
fout("\n$Supercap warp%s physics: %s", direction == WarpDirection::WARP_IN ? "in" : "out", shipp_params->supercap_warp_physics ? "YES" : "NO");
|
||||
}
|
||||
|
||||
if (direction == WarpDirection::WARP_OUT && shipp_params->warpout_player_speed != sip_params->warpout_player_speed)
|
||||
|
||||
Reference in new issue
Block a user