Made missile views from friendly players optional (off by default)
This commit is contained in:
parent
db2ed6d766
commit
69353631f0
|
@ -100,6 +100,7 @@ struct player_config
|
|||
int ReticleSize;
|
||||
#if defined(DXX_BUILD_DESCENT_II)
|
||||
int MissileViewEnabled;
|
||||
int FriendMissileView;
|
||||
int HeadlightActiveDefault;
|
||||
int GuidedInBigWindow;
|
||||
ntstring<GUIDEBOT_NAME_LEN> GuidebotName, GuidebotNameReal;
|
||||
|
|
|
@ -486,7 +486,9 @@ static bool choose_missile_viewer()
|
|||
{
|
||||
if (!better_match(other_player_missile, o))
|
||||
continue;
|
||||
if (game_mode & GM_MULTI_COOP)
|
||||
if (!PlayerCfg.FriendMissileView)
|
||||
continue;
|
||||
else if (game_mode & GM_MULTI_COOP)
|
||||
{
|
||||
/* Always allow missiles of other players */
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#include "multi.h"
|
||||
#include "fwdwall.h"
|
||||
#include "reverse.h"
|
||||
#include "playsave.h"
|
||||
|
||||
#include "compiler-range_for.h"
|
||||
#include "highest_valid.h"
|
||||
|
@ -1380,10 +1381,13 @@ static objptridx_t Laser_player_fire_spread_delay(const vobjptridx_t obj, enum w
|
|||
const auto can_view_missile = [obj]{
|
||||
if (obj->id == Player_num)
|
||||
return true;
|
||||
if (Game_mode & GM_MULTI_COOP)
|
||||
return true;
|
||||
if (Game_mode & GM_TEAM)
|
||||
return get_team(Player_num) == get_team(obj->id);
|
||||
if (PlayerCfg.FriendMissileView)
|
||||
{
|
||||
if (Game_mode & GM_MULTI_COOP)
|
||||
return true;
|
||||
if (Game_mode & GM_TEAM)
|
||||
return get_team(Player_num) == get_team(obj->id);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
if (need_new_missile_viewer() && can_view_missile())
|
||||
|
|
|
@ -1321,6 +1321,7 @@ static void reticle_config()
|
|||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
#define DXX_GAME_SPECIFIC_HUDOPTIONS(VERB) \
|
||||
DXX_##VERB##_CHECK("Missile view",opt_missileview, PlayerCfg.MissileViewEnabled) \
|
||||
DXX_##VERB##_CHECK("Missile view of friendly players",opt_friendmissileview, PlayerCfg.FriendMissileView) \
|
||||
DXX_##VERB##_CHECK("Show guided missile in main display", opt_guidedbigview,PlayerCfg.GuidedInBigWindow ) \
|
||||
|
||||
#endif
|
||||
|
|
|
@ -163,6 +163,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#define TOGGLES_AUTOMAPFREEFLIGHT_NAME_TEXT "automapfreeflight"
|
||||
#define TOGGLES_NOFIREAUTOSELECT_NAME_TEXT "nofireautoselect"
|
||||
#define TOGGLES_CYCLEAUTOSELECTONLY_NAME_TEXT "cycleautoselectonly"
|
||||
#define TOGGLES_FRIENDMISSILEVIEW_NAME_TEXT "friendmissileview"
|
||||
#define GRAPHICS_HEADER_TEXT "[graphics]"
|
||||
#define GRAPHICS_ALPHAEFFECTS_NAME_TEXT "alphaeffects"
|
||||
#define GRAPHICS_DYNLIGHTCOLOR_NAME_TEXT "dynlightcolor"
|
||||
|
@ -237,6 +238,7 @@ int new_player_config()
|
|||
PlayerCfg.Cockpit3DView[0]=CV_NONE;
|
||||
PlayerCfg.Cockpit3DView[1]=CV_NONE;
|
||||
PlayerCfg.MissileViewEnabled = 1;
|
||||
PlayerCfg.FriendMissileView = 0;
|
||||
PlayerCfg.HeadlightActiveDefault = 1;
|
||||
PlayerCfg.GuidedInBigWindow = 0;
|
||||
PlayerCfg.GuidebotName = "GUIDE-BOT";
|
||||
|
@ -445,6 +447,8 @@ static int read_player_dxx(const char *filename)
|
|||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
if(!strcmp(line,TOGGLES_ESCORTHOTKEYS_NAME_TEXT))
|
||||
PlayerCfg.EscortHotKeys = atoi(value);
|
||||
if(!strcmp(line,TOGGLES_FRIENDMISSILEVIEW_NAME_TEXT))
|
||||
PlayerCfg.FriendMissileView = atoi(value);
|
||||
#endif
|
||||
if(!strcmp(line,TOGGLES_PERSISTENTDEBRIS_NAME_TEXT))
|
||||
PlayerCfg.PersistentDebris = atoi(value);
|
||||
|
@ -747,6 +751,7 @@ static int write_player_dxx(const char *filename)
|
|||
PHYSFSX_printf(fout,TOGGLES_BOMBGAUGE_NAME_TEXT "=%i\n",PlayerCfg.BombGauge);
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
PHYSFSX_printf(fout,TOGGLES_ESCORTHOTKEYS_NAME_TEXT "=%i\n",PlayerCfg.EscortHotKeys);
|
||||
PHYSFSX_printf(fout,TOGGLES_FRIENDMISSILEVIEW_NAME_TEXT "=%i\n",PlayerCfg.FriendMissileView);
|
||||
#endif
|
||||
PHYSFSX_printf(fout,TOGGLES_PERSISTENTDEBRIS_NAME_TEXT "=%i\n",PlayerCfg.PersistentDebris);
|
||||
PHYSFSX_printf(fout,TOGGLES_PRSHOT_NAME_TEXT "=%i\n",PlayerCfg.PRShot);
|
||||
|
|
Loading…
Reference in a new issue