mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- mapped the remaining Shadow Warrior options to the CVARs.
This commit is contained in:
parent
2e7ba30068
commit
bfea07570a
19 changed files with 85 additions and 305 deletions
|
@ -42,7 +42,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "sound.h"
|
||||
#include "view.h"
|
||||
|
||||
EXTERN_CVAR(Bool, hud_messages)
|
||||
EXTERN_CVAR(Bool, hud_powerupduration)
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
|
|
@ -61,11 +61,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "warp.h"
|
||||
#include "weapon.h"
|
||||
|
||||
CUSTOM_CVARD(Bool, hud_messages, true, CVAR_ARCHIVE|CVAR_FRONTEND_BLOOD, "enable/disable showing messages")
|
||||
{
|
||||
Blood::gGameMessageMgr.SetState(self);
|
||||
}
|
||||
|
||||
CVARD(Bool, hud_powerupduration, true, CVAR_ARCHIVE|CVAR_FRONTEND_BLOOD, "enable/disable displaying the remaining seconds for power-ups")
|
||||
|
||||
|
||||
|
|
|
@ -245,6 +245,11 @@ CVARD(Bool, hud_showmapname, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disab
|
|||
CVARD(Bool, hud_position, false, CVAR_ARCHIVE, "aligns the status bar to the bottom/top")
|
||||
CVARD(Bool, hud_bgstretch, false, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "enable/disable background image stretching in wide resolutions")
|
||||
CVARD(Int, hud_messagetime, 120, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "length of time to display multiplayer chat messages")
|
||||
// Should be available to all games - the message handling should also be consolidated into a game independent feature.
|
||||
/*CUSTOM_*/CVARD(Bool, hud_messages, true, CVAR_ARCHIVE | CVAR_FRONTEND_BLOOD|CVAR_FRONTEND_SHADOWWARRIOR, "enable/disable showing messages")
|
||||
//{
|
||||
//Blood::gGameMessageMgr.SetState(self); // this is for terminaing an active message. Cannot be done like this because CVARs are global.
|
||||
//}
|
||||
|
||||
CVARD_NAMED(Int, hud_numbertile, althud_numbertile, 2930, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "first tile in alt hud number set")
|
||||
CVARD_NAMED(Int, hud_numberpal, althud_numberpal, 0, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "pal for alt hud numbers")
|
||||
|
|
|
@ -62,6 +62,7 @@ EXTERN_CVAR(Int, hud_messagetime)
|
|||
EXTERN_CVAR(Bool, hud_glowingquotes)
|
||||
EXTERN_CVAR(Int, hud_textscale)
|
||||
EXTERN_CVAR(Int, hud_weaponscale)
|
||||
EXTERN_CVAR(Bool, hud_messages)
|
||||
|
||||
EXTERN_CVAR(Int, althud_numbertile)
|
||||
EXTERN_CVAR(Int, althud_numberpal)
|
||||
|
|
|
@ -68,7 +68,7 @@ void RoomCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
|||
|
||||
void SecretCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||
{
|
||||
gs.Stats = !gs.Stats;
|
||||
hud_stats = !hud_stats;
|
||||
}
|
||||
|
||||
void NextCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
|
||||
|
|
|
@ -756,7 +756,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
|
|||
}
|
||||
}
|
||||
|
||||
if (gs.Shadows && TEST(tu->Flags, SPR_SHADOW))
|
||||
if (r_shadows && TEST(tu->Flags, SPR_SHADOW))
|
||||
{
|
||||
DoShadows(tsp, viewz);
|
||||
}
|
||||
|
@ -1432,7 +1432,7 @@ void SecretInfo(PLAYERp pp)
|
|||
x = x / (xdim/320.0);
|
||||
y = y / (ydim/200.0);
|
||||
|
||||
if (gs.Stats)
|
||||
if (hud_stats)
|
||||
{
|
||||
sprintf(ds, "Kills %d/%d", Player->Kills, TotalKillable);
|
||||
DisplayMiniBarSmString(pp, x, y, PAL_XLAT_BROWN, ds);
|
||||
|
@ -1805,7 +1805,7 @@ void DrawCrosshair(PLAYERp pp)
|
|||
extern int CrosshairX, CrosshairY;
|
||||
extern SWBOOL DemoMode,CameraTestMode;
|
||||
|
||||
if (!gs.Crosshair)
|
||||
if (!cl_crosshair)
|
||||
return;
|
||||
|
||||
if (DemoMode || CameraTestMode)
|
||||
|
|
|
@ -92,6 +92,7 @@ Things required to make savegames work:
|
|||
|
||||
#include "common.h"
|
||||
#include "common_game.h"
|
||||
#include "gameconfigfile.h"
|
||||
|
||||
//#include "crc32.h"
|
||||
|
||||
|
@ -198,21 +199,8 @@ uint8_t AutoColor;
|
|||
|
||||
const GAME_SET gs_defaults =
|
||||
{
|
||||
32768, // mouse speed
|
||||
128, // music vol
|
||||
192, // fx vol
|
||||
2, // border
|
||||
0, // border tile
|
||||
FALSE, // mouse aiming
|
||||
FALSE, // mouse look
|
||||
FALSE, // mouse invert
|
||||
TRUE, // bobbing
|
||||
FALSE, // tilting
|
||||
TRUE, // shadows
|
||||
FALSE, // auto run
|
||||
TRUE, // crosshair
|
||||
TRUE, // auto aim
|
||||
TRUE, // messages
|
||||
|
||||
// Network game settings
|
||||
0, // GameType
|
||||
|
@ -225,9 +213,6 @@ const GAME_SET gs_defaults =
|
|||
0, // Time Limit
|
||||
0, // Color
|
||||
TRUE, // nuke
|
||||
TRUE, // voxels
|
||||
FALSE, // stats
|
||||
FALSE, // mouse aiming on
|
||||
"Track??", // waveform track name
|
||||
};
|
||||
GAME_SET gs;
|
||||
|
@ -685,7 +670,7 @@ TerminateGame(void)
|
|||
KB_Shutdown();
|
||||
|
||||
engineUnInit();
|
||||
TermSetup();
|
||||
G_SaveConfig();
|
||||
|
||||
//Terminate3DSounds(); // Kill the sounds linked list
|
||||
UnInitSound();
|
||||
|
@ -795,30 +780,6 @@ void Set_GameMode(void)
|
|||
//MONO_PRINT(ds);
|
||||
result = COVERsetgamemode(ScreenMode, ScreenWidth, ScreenHeight, ScreenBPP);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
buildprintf("Failure setting video mode %dx%dx%d %s! Attempting safer mode...",
|
||||
*ScreenWidth,*ScreenHeight,*ScreenBPP,*ScreenMode ? "fullscreen" : "windowed");
|
||||
ScreenMode = 0;
|
||||
ScreenWidth = 640;
|
||||
ScreenHeight = 480;
|
||||
ScreenBPP = 8;
|
||||
|
||||
result = COVERsetgamemode(ScreenMode, ScreenWidth, ScreenHeight, ScreenBPP);
|
||||
if (result < 0)
|
||||
{
|
||||
//uninitmultiplayers();
|
||||
//uninitkeys();
|
||||
KB_Shutdown();
|
||||
engineUnInit();
|
||||
TermSetup();
|
||||
UnInitSound();
|
||||
timerUninit();
|
||||
DosScreen();
|
||||
uninitgroupfile();
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MultiSharewareCheck(void)
|
||||
|
@ -836,13 +797,13 @@ void MultiSharewareCheck(void)
|
|||
#endif
|
||||
//uninitmultiplayers();
|
||||
//uninitkeys();
|
||||
G_SaveConfig();
|
||||
KB_Shutdown();
|
||||
engineUnInit();
|
||||
TermSetup();
|
||||
UnInitSound();
|
||||
timerUninit();
|
||||
uninitgroupfile();
|
||||
exit(0);
|
||||
Bexit(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1448,10 +1409,10 @@ InitLevel(void)
|
|||
|
||||
if (ArgCheat)
|
||||
{
|
||||
SWBOOL bak = gs.Messages;
|
||||
gs.Messages = FALSE;
|
||||
SWBOOL bak = hud_messages;
|
||||
hud_messages = FALSE;
|
||||
EveryCheatToggle(&Player[0],NULL);
|
||||
gs.Messages = bak;
|
||||
hud_messages = bak;
|
||||
GodMode = TRUE;
|
||||
}
|
||||
|
||||
|
@ -3046,10 +3007,7 @@ void InitPlayerGameSettings(void)
|
|||
RESET(Player[myconnectindex].Flags, PF_AUTO_AIM);
|
||||
}
|
||||
|
||||
if (gs.MouseAimingOn)
|
||||
SET(Player[myconnectindex].Flags, PF_MOUSE_AIMING_ON);
|
||||
else
|
||||
RESET(Player[myconnectindex].Flags, PF_MOUSE_AIMING_ON);
|
||||
g_MyAimMode = in_aimmode;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3137,7 +3095,7 @@ void InitRunLevel(void)
|
|||
|
||||
snd_reversestereo.Callback();
|
||||
snd_fxvolume.Callback();
|
||||
FX_SetVolume(gs.SoundVolume); // Turn volume back up
|
||||
FX_SetVolume(snd_fxvolume); // Turn volume back up
|
||||
if (snd_ambience)
|
||||
StartAmbientSound();
|
||||
}
|
||||
|
@ -3148,7 +3106,7 @@ RunLevel(void)
|
|||
int i;
|
||||
InitRunLevel();
|
||||
|
||||
FX_SetVolume(gs.SoundVolume);
|
||||
FX_SetVolume(snd_fxvolume);
|
||||
SetSongVolume(mus_volume);
|
||||
|
||||
#if 0
|
||||
|
@ -4587,9 +4545,9 @@ FunctionKeys(PLAYERp pp)
|
|||
{
|
||||
KEY_PRESSED(KEYSC_F8) = 0;
|
||||
|
||||
gs.Messages ^= 1;
|
||||
hud_messages = !hud_messages;
|
||||
|
||||
if (gs.Messages)
|
||||
if (hud_messages)
|
||||
PutStringInfoLine(pp, "Messages ON");
|
||||
else
|
||||
PutStringInfoLine(pp, "Messages OFF");
|
||||
|
@ -4994,56 +4952,28 @@ getinput(SW_PACKET *loc)
|
|||
// MAKE SURE THIS WILL GET SET
|
||||
SET_LOC_KEY(loc->bits, SK_QUIT_GAME, MultiPlayQuitFlag);
|
||||
|
||||
#if 0 // What kind of crap is this...?
|
||||
if (gs.MouseAimingType == 1) // while held
|
||||
{
|
||||
if (BUTTON(gamefunc_Mouse_Aiming))
|
||||
{
|
||||
SET(pp->Flags, PF_MOUSE_AIMING_ON);
|
||||
gs.MouseAimingOn = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TEST(pp->Flags, PF_MOUSE_AIMING_ON))
|
||||
{
|
||||
SET_LOC_KEY(loc->bits, SK_LOOK_UP, TRUE);
|
||||
RESET(pp->Flags, PF_MOUSE_AIMING_ON);
|
||||
gs.MouseAimingOn = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (gs.MouseAimingType == 0) // togglable button
|
||||
{
|
||||
if (BUTTON(gamefunc_Mouse_Aiming) && !BUTTONHELD(gamefunc_Mouse_Aiming))
|
||||
{
|
||||
FLIP(pp->Flags, PF_MOUSE_AIMING_ON);
|
||||
gs.MouseAimingOn = !gs.MouseAimingOn;
|
||||
if (!TEST(pp->Flags, PF_MOUSE_AIMING_ON))
|
||||
{
|
||||
SET_LOC_KEY(loc->bits, SK_LOOK_UP, TRUE);
|
||||
PutStringInfo(pp, "Mouse Aiming Off");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutStringInfo(pp, "Mouse Aiming On");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (in_aimmode)
|
||||
g_MyAimMode = 0;
|
||||
|
||||
if (BUTTON(gamefunc_Mouse_Aiming))
|
||||
{
|
||||
if (in_aimmode)
|
||||
g_MyAimMode = 1;
|
||||
else
|
||||
{
|
||||
CONTROL_ClearButton(gamefunc_Mouse_Aiming);
|
||||
g_MyAimMode = !g_MyAimMode;
|
||||
if (g_MyAimMode)
|
||||
{
|
||||
PutStringInfo(pp, "Mouse Aiming Off");
|
||||
}
|
||||
else
|
||||
{
|
||||
PutStringInfo(pp, "Mouse Aiming On");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (TEST(pp->Flags, PF_MOUSE_AIMING_ON))
|
||||
{
|
||||
mouseaxis = analog_lookingupanddown;
|
||||
}
|
||||
else
|
||||
{
|
||||
mouseaxis = MouseAnalogAxes[1];
|
||||
}
|
||||
if (mouseaxis != MouseYAxisMode)
|
||||
{
|
||||
CONTROL_MapAnalogAxis(1, mouseaxis, controldevice_mouse);
|
||||
MouseYAxisMode = mouseaxis;
|
||||
}
|
||||
#endif
|
||||
|
||||
CONTROL_GetInput(&info);
|
||||
|
||||
|
@ -5123,7 +5053,7 @@ getinput(SW_PACKET *loc)
|
|||
aimvel = info.dpitch;
|
||||
aimvel = min(127, aimvel);
|
||||
aimvel = max(-128, aimvel);
|
||||
if (gs.MouseInvert)
|
||||
if (in_mouseflip)
|
||||
aimvel = -aimvel;
|
||||
|
||||
svel -= info.dx;
|
||||
|
|
|
@ -2330,8 +2330,6 @@ void SetupMirrorTiles(void); // rooms.c
|
|||
SWBOOL FAF_Sector(short sectnum); // rooms.c
|
||||
int GetZadjustment(short sectnum,short hitag); // rooms.c
|
||||
|
||||
void TermSetup(void); // swconfig.c
|
||||
|
||||
void InitSetup(void); // setup.c
|
||||
|
||||
void LoadKVXFromScript(const char *filename); // scrip2.c
|
||||
|
|
|
@ -1082,7 +1082,7 @@ JAnalyzeSprites(uspritetype * tspr)
|
|||
|
||||
// Check for voxels
|
||||
//if (bVoxelsOn)
|
||||
if (gs.Voxels)
|
||||
if (r_voxels)
|
||||
{
|
||||
if (aVoxelArray[tspr->picnum].Voxel >= 0)
|
||||
{
|
||||
|
|
|
@ -2085,9 +2085,9 @@ MNU_InitMenus(void)
|
|||
{
|
||||
pClearTextLine(Player + myconnectindex, TEXT_INFO_LINE(0));
|
||||
|
||||
slidersettings[sldr_mouse] = gs.MouseSpeed/(MOUSE_SENS_MAX_VALUE/SLDR_MOUSESENSEMAX);
|
||||
slidersettings[sldr_mouse] = in_mousesensitivity; // (MOUSE_SENS_MAX_VALUE / SLDR_MOUSESENSEMAX);
|
||||
|
||||
slidersettings[sldr_sndfxvolume] = gs.SoundVolume / (FX_VOL_MAX_VALUE/SLDR_SNDFXVOLMAX);
|
||||
slidersettings[sldr_sndfxvolume] = snd_fxvolume / (FX_VOL_MAX_VALUE/SLDR_SNDFXVOLMAX);
|
||||
slidersettings[sldr_musicvolume] = mus_volume / (MUSIC_VOL_MAX_VALUE/SLDR_MUSICVOLMAX);
|
||||
slidersettings[sldr_scrsize] = gs.BorderNum;
|
||||
slidersettings[sldr_brightness] = 10;
|
||||
|
@ -2110,24 +2110,24 @@ MNU_InitMenus(void)
|
|||
slidersettings[sldr_videores] = i;
|
||||
}
|
||||
|
||||
buttonsettings[btn_auto_run] = gs.AutoRun;
|
||||
buttonsettings[btn_auto_run] = cl_autorun;
|
||||
buttonsettings[btn_auto_aim] = cl_autoaim;
|
||||
buttonsettings[btn_messages] = gs.Messages;
|
||||
buttonsettings[btn_crosshair] = gs.Crosshair;
|
||||
// buttonsettings[btn_bobbing] = gs.Bobbing;
|
||||
buttonsettings[btn_shadows] = gs.Shadows;
|
||||
buttonsettings[btn_messages] = hud_messages;
|
||||
buttonsettings[btn_crosshair] = cl_crosshair;
|
||||
buttonsettings[btn_bobbing] = cl_viewbob;
|
||||
buttonsettings[btn_shadows] = r_shadows;
|
||||
|
||||
buttonsettings[btn_mouse_aim] = gs.MouseAimingType;
|
||||
buttonsettings[btn_mouse_invert] = gs.MouseInvert;
|
||||
buttonsettings[btn_mouse_aim] = in_aimmode;
|
||||
buttonsettings[btn_mouse_invert] = in_mouseflip;
|
||||
buttonsettings[btn_sound] = snd_enabled;
|
||||
buttonsettings[btn_music] = mus_enabled;
|
||||
buttonsettings[btn_talking] = snd_speech;
|
||||
|
||||
buttonsettings[btn_voxels] = gs.Voxels;
|
||||
buttonsettings[btn_voxels] = r_voxels;
|
||||
buttonsettings[btn_ambience] = snd_ambience;
|
||||
buttonsettings[btn_playcd] = true;// gs.PlayCD;
|
||||
buttonsettings[btn_flipstereo] = snd_reversestereo;
|
||||
buttonsettings[btn_stats] = gs.Stats;
|
||||
buttonsettings[btn_stats] = hud_stats;
|
||||
|
||||
slidersettings[sldr_gametype] = gs.NetGameType;
|
||||
slidersettings[sldr_netlevel] = gs.NetLevel;
|
||||
|
@ -3231,10 +3231,10 @@ MNU_DoButton(MenuItem_p item, SWBOOL draw)
|
|||
gs.NetNuke = state = buttonsettings[item->button];
|
||||
break;
|
||||
case btn_voxels:
|
||||
gs.Voxels = state = buttonsettings[item->button];
|
||||
r_voxels = state = buttonsettings[item->button];
|
||||
break;
|
||||
case btn_stats:
|
||||
gs.Stats = state = buttonsettings[item->button];
|
||||
hud_stats = state = buttonsettings[item->button];
|
||||
break;
|
||||
case btn_markers:
|
||||
gs.NetSpawnMarkers = state = buttonsettings[item->button];
|
||||
|
@ -3246,7 +3246,7 @@ MNU_DoButton(MenuItem_p item, SWBOOL draw)
|
|||
gs.NetHurtTeammate = state = buttonsettings[item->button];
|
||||
break;
|
||||
case btn_crosshair:
|
||||
gs.Crosshair = state = buttonsettings[item->button];
|
||||
cl_crosshair = state = buttonsettings[item->button];
|
||||
break;
|
||||
case btn_auto_aim:
|
||||
last_value = cl_autoaim;
|
||||
|
@ -3255,30 +3255,24 @@ MNU_DoButton(MenuItem_p item, SWBOOL draw)
|
|||
MenuButtonAutoAim = TRUE;
|
||||
break;
|
||||
case btn_messages:
|
||||
gs.Messages = state = buttonsettings[item->button];
|
||||
hud_messages = state = buttonsettings[item->button];
|
||||
break;
|
||||
case btn_auto_run:
|
||||
last_value = gs.AutoRun;
|
||||
gs.AutoRun = state = buttonsettings[item->button];
|
||||
if (gs.AutoRun != last_value)
|
||||
last_value = cl_autorun;
|
||||
cl_autorun = state = buttonsettings[item->button];
|
||||
if (cl_autorun != last_value)
|
||||
MenuButtonAutoRun = TRUE;
|
||||
break;
|
||||
case btn_mouse_aim:
|
||||
last_value = gs.MouseAimingType;
|
||||
gs.MouseAimingType = state = buttonsettings[item->button];
|
||||
if (gs.MouseAimingType != last_value)
|
||||
{
|
||||
//RESET(pp->Flags, PF_MOUSE_AIMING_ON);
|
||||
//gs.MouseAimingOn = FALSE;
|
||||
}
|
||||
//extra_text = gs.MouseAimingType ? "Momentary" : "Toggle";
|
||||
last_value = in_aimmode;
|
||||
in_aimmode = state = buttonsettings[item->button];
|
||||
break;
|
||||
case btn_mouse_invert:
|
||||
gs.MouseInvert = state = buttonsettings[item->button];
|
||||
in_mouseflip = state = buttonsettings[item->button];
|
||||
break;
|
||||
case btn_bobbing:
|
||||
cl_viewbob = state = buttonsettings[item->button];
|
||||
break;
|
||||
// case btn_bobbing:
|
||||
// gs.Bobbing = state = buttonsettings[item->button];
|
||||
// break;
|
||||
case btn_sound:
|
||||
|
||||
if (!FxInitialized)
|
||||
|
@ -3348,7 +3342,7 @@ MNU_DoButton(MenuItem_p item, SWBOOL draw)
|
|||
snd_reversestereo = state = buttonsettings[item->button];
|
||||
break;
|
||||
case btn_shadows:
|
||||
gs.Shadows = state = buttonsettings[item->button];
|
||||
r_shadows = state = buttonsettings[item->button];
|
||||
break;
|
||||
|
||||
case btn_parental:
|
||||
|
@ -3406,7 +3400,7 @@ MNU_DoButton(MenuItem_p item, SWBOOL draw)
|
|||
switch (item->button)
|
||||
{
|
||||
case btn_mouse_aim:
|
||||
extra_text = gs.MouseAimingType ? "Momentary" : "Toggle";
|
||||
extra_text = in_aimmode ? "Momentary" : "Toggle";
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
@ -3486,8 +3480,7 @@ MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw)
|
|||
|
||||
slidersettings[sldr_mouse] = offset;
|
||||
|
||||
gs.MouseSpeed = offset * (MOUSE_SENS_MAX_VALUE/SLDR_MOUSESENSEMAX);
|
||||
in_mousesensitivity = float(gs.MouseSpeed); // [JM] Will need to verify this. !CHECKME!
|
||||
in_mousesensitivity = float(offset * (MOUSE_SENS_MAX_VALUE/SLDR_MOUSESENSEMAX));// [JM] Will need to verify this. !CHECKME!
|
||||
break;
|
||||
|
||||
case sldr_sndfxvolume:
|
||||
|
@ -3501,8 +3494,8 @@ MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw)
|
|||
offset = min(offset, short(SLDR_SNDFXVOLMAX-1));
|
||||
|
||||
slidersettings[sldr_sndfxvolume] = offset;
|
||||
gs.SoundVolume = FX_MIN + (offset * VOL_MUL);
|
||||
FX_SetVolume(gs.SoundVolume);
|
||||
snd_fxvolume = FX_MIN + (offset * VOL_MUL);
|
||||
FX_SetVolume(snd_fxvolume);
|
||||
break;
|
||||
|
||||
case sldr_musicvolume:
|
||||
|
|
|
@ -466,7 +466,7 @@ InitNetPlayerOptions(void)
|
|||
if (CommEnabled)
|
||||
{
|
||||
p.PacketType = PACKET_TYPE_PLAYER_OPTIONS;
|
||||
p.AutoRun = gs.AutoRun;
|
||||
p.AutoRun = cl_autorun;
|
||||
p.Color = gs.NetColor;
|
||||
strncpy(p.PlayerName, playername, 32);
|
||||
|
||||
|
|
|
@ -251,10 +251,7 @@ void pSetSuicide(PANEL_SPRITEp psp)
|
|||
|
||||
void pToggleCrosshair(PLAYERp pp)
|
||||
{
|
||||
if (gs.Crosshair)
|
||||
gs.Crosshair = FALSE;
|
||||
else
|
||||
gs.Crosshair = TRUE;
|
||||
cl_crosshair = !cl_crosshair;
|
||||
}
|
||||
|
||||
// Player has a chance of yelling out during combat, when firing a weapon.
|
||||
|
|
|
@ -1819,7 +1819,7 @@ PlayerAutoLook(PLAYERp pp)
|
|||
|
||||
if (!TEST(pp->Flags, PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING))
|
||||
{
|
||||
if (!TEST(pp->Flags, PF_MOUSE_AIMING_ON) && TEST(sector[pp->cursectnum].floorstat, FLOOR_STAT_SLOPE)) // If the floor is sloped
|
||||
if (!g_MyAimMode && TEST(sector[pp->cursectnum].floorstat, FLOOR_STAT_SLOPE)) // If the floor is sloped
|
||||
{
|
||||
// Get a point, 512 units ahead of player's position
|
||||
x = pp->posx + (sintable[(pp->pang + 512) & 2047] >> 5);
|
||||
|
@ -1876,6 +1876,7 @@ DoPlayerHorizon(PLAYERp pp)
|
|||
// //DSPRINTF(ds,"pp->horizoff, %d", pp->horizoff);
|
||||
// MONO_PRINT(ds);
|
||||
|
||||
// Fixme: This should probably be made optional.
|
||||
PlayerAutoLook(pp);
|
||||
|
||||
if (pp->input.aimvel)
|
||||
|
@ -1886,17 +1887,8 @@ DoPlayerHorizon(PLAYERp pp)
|
|||
|
||||
if (TEST_SYNC_KEY(pp, SK_CENTER_VIEW))
|
||||
{
|
||||
// if (TEST(pp->Flags, PF_MOUSE_AIMING_ON))
|
||||
{
|
||||
pp->horiz = pp->horizbase = 100;
|
||||
pp->horizoff = 0;
|
||||
}
|
||||
// else
|
||||
{
|
||||
//gs.MouseAimingOn = FALSE;
|
||||
// RESET(pp->Flags, PF_LOCK_HORIZ);
|
||||
// SET(pp->Flags, PF_LOOKING);
|
||||
}
|
||||
pp->horiz = pp->horizbase = 100;
|
||||
pp->horizoff = 0;
|
||||
}
|
||||
|
||||
// this is the locked type
|
||||
|
|
|
@ -1279,7 +1279,7 @@ int LoadGame(short save_num)
|
|||
PlaySong(LevelSong, RedBookSong[Level], TRUE, TRUE);
|
||||
if (snd_ambience)
|
||||
StartAmbientSound();
|
||||
FX_SetVolume(gs.SoundVolume);
|
||||
FX_SetVolume(snd_fxvolume);
|
||||
SetSongVolume(mus_volume);
|
||||
|
||||
TRAVERSE_CONNECT(i)
|
||||
|
|
|
@ -31,21 +31,8 @@ BEGIN_SW_NS
|
|||
|
||||
typedef struct
|
||||
{
|
||||
int MouseSpeed;
|
||||
int mus_volume;
|
||||
int SoundVolume;
|
||||
int8_t BorderNum;
|
||||
int8_t BorderTile;
|
||||
SWBOOL MouseAimingType;
|
||||
SWBOOL MouseLook;
|
||||
SWBOOL MouseInvert;
|
||||
SWBOOL Bobbing;
|
||||
SWBOOL Tilting;
|
||||
SWBOOL Shadows;
|
||||
SWBOOL AutoRun;
|
||||
SWBOOL Crosshair;
|
||||
SWBOOL AutoAim;
|
||||
SWBOOL Messages;
|
||||
int8_t BorderTile; // Network only - disabled
|
||||
// Net Options from Menus
|
||||
uint8_t NetGameType; // 0=DeathMatch [spawn], 1=Cooperative 2=DeathMatch [no spawn]
|
||||
uint8_t NetLevel; // 1-28
|
||||
|
@ -57,9 +44,6 @@ typedef struct
|
|||
uint8_t NetTimeLimit; // Limit time of game
|
||||
uint8_t NetColor; // Chosen color for player
|
||||
SWBOOL NetNuke;
|
||||
SWBOOL Voxels;
|
||||
SWBOOL Stats;
|
||||
SWBOOL MouseAimingOn; // whether it was on or off - NOT the type of mouse aiming
|
||||
//SWBOOL PlayCD; // Not implemented and no idea how to support it without the music assets.
|
||||
char WaveformTrackName[MAXWAVEFORMTRACKLENGTH];
|
||||
} GAME_SET, *GAME_SETp;
|
||||
|
|
|
@ -343,9 +343,6 @@ InitFX(void)
|
|||
// Select which cards to use
|
||||
SoundStartup();
|
||||
|
||||
// Get the current volume of the music and sound fx
|
||||
gs.SoundVolume = FX_GetVolume();
|
||||
|
||||
for (vp = voc; vp < &voc[SIZ(voc)]; vp++)
|
||||
{
|
||||
vp->playing = 0;
|
||||
|
|
|
@ -5786,7 +5786,7 @@ KeyMain:
|
|||
PlayerUpdateHealth(pp, InventoryDecls[InvDecl_Booster].amount); // This is for health
|
||||
// over 100%
|
||||
// Say something witty
|
||||
if (pp == Player+myconnectindex && gs.Messages)
|
||||
if (pp == Player+myconnectindex && hud_messages)
|
||||
{
|
||||
if (adult_lockout || Global_PLock)
|
||||
sprintf(ds,"Fortune Say: %s\n",ReadFortune[STD_RANDOM_RANGE(10)]);
|
||||
|
|
|
@ -100,120 +100,9 @@ void DecodePassword(char *pw)
|
|||
DrawScreen = bak_DrawScreen;
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
=
|
||||
= ReadGameSetup
|
||||
=
|
||||
===================
|
||||
*/
|
||||
|
||||
void ReadGameSetup(int32_t scripthandle)
|
||||
{
|
||||
int dummy;
|
||||
int ret;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "BorderTile",&dummy);
|
||||
if (dummy != -1) gs.BorderTile = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "Bobbing",&dummy);
|
||||
if (dummy != -1) gs.Bobbing = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "Tilting",&dummy);
|
||||
if (dummy != -1) gs.Tilting = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "Shadows",&dummy);
|
||||
if (dummy != -1) gs.Shadows = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "AutoRun",&dummy);
|
||||
if (dummy != -1) gs.AutoRun = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "Crosshair",&dummy);
|
||||
if (dummy != -1) gs.Crosshair = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "Messages",&dummy);
|
||||
if (dummy != -1) gs.Messages = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Controls", "MouseAiming",&dummy);
|
||||
if (dummy != -1) gs.MouseAimingType = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "NetGameType",&dummy);
|
||||
if (dummy != -1) gs.NetGameType = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "NetLevel",&dummy);
|
||||
if (dummy != -1) gs.NetLevel = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "NetMonsters",&dummy);
|
||||
if (dummy != -1) gs.NetMonsters = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "NetHurtTeammate",&dummy);
|
||||
if (dummy != -1) gs.NetHurtTeammate = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "NetSpawnMarkers",&dummy);
|
||||
if (dummy != -1) gs.NetSpawnMarkers = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "NetTeamPlay",&dummy);
|
||||
if (dummy != -1) gs.NetTeamPlay = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "NetKillLimit",&dummy);
|
||||
if (dummy != -1) gs.NetKillLimit = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "NetTimeLimit",&dummy);
|
||||
if (dummy != -1) gs.NetTimeLimit = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "NetColor",&dummy);
|
||||
if (dummy != -1) gs.NetColor = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "Voxels",&dummy);
|
||||
if (dummy != -1) gs.Voxels = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "Stats",&dummy);
|
||||
if (dummy != -1) gs.Stats = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "MouseAimingOn",&dummy);
|
||||
if (dummy != -1) gs.MouseAimingOn = dummy;
|
||||
|
||||
dummy = -1;
|
||||
SCRIPT_GetNumber(scripthandle, "Options", "MouseInvert",&dummy);
|
||||
if (dummy != -1) gs.MouseInvert = dummy;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
=
|
||||
= WriteGameSetup
|
||||
=
|
||||
===================
|
||||
*/
|
||||
|
||||
void WriteGameSetup(int32_t scripthandle)
|
||||
{
|
||||
}
|
||||
|
||||
void TermSetup(void)
|
||||
{
|
||||
extern SWBOOL BotMode;
|
||||
//CONFIG_WriteSetup();
|
||||
}
|
||||
END_SW_NS
|
||||
|
|
|
@ -461,7 +461,7 @@ void PutStringInfo(PLAYERp pp, const char *string)
|
|||
if (pp-Player != myconnectindex)
|
||||
return;
|
||||
|
||||
if (!gs.Messages)
|
||||
if (!hud_messages)
|
||||
return;
|
||||
|
||||
CON_ConMessage("%s", string); // Put it in the console too
|
||||
|
@ -526,7 +526,7 @@ void PutStringPlayerInfo(PLAYERp pp, const char *string)
|
|||
if (pp-Player != myconnectindex)
|
||||
return;
|
||||
|
||||
if (!gs.Messages)
|
||||
if (!hud_messages)
|
||||
return;
|
||||
|
||||
MNU_MeasureString(string, &w, &h);
|
||||
|
|
Loading…
Reference in a new issue