Commit 57bf6b2d authored by Fabian Greffrath's avatar Fabian Greffrath

Update upstream source from tag 'upstream/5.5'

Update to upstream version '5.5'
with Debian dir 2acfa70e6863f4798231eb5dc2f3ccf8b4f1ec61
parents 233a3452 9b972342
<!--
Thank you for reporting a bug in Chocolate Doom. Please complete
the following template so that we can better diagnose the source
of your problem.
To save yourself some time, you may want to check the FAQ and the
NOT-BUGS list for solutions to some common problems:
https://www.chocolate-doom.org/wiki/index.php/FAQ
https://www.chocolate-doom.org/not-bugs
Thank you for reporting a bug in Crispy Doom. Please complete the following template
so that we can better diagnose the source of your problem.
-->
### Background
Version of Chocolate Doom:
Version of Crispy Doom:
Operating System and version:
......
#!/bin/sh
set -e
if [ "$ANALYZE" = "true" ] ; then
cppcheck --error-exitcode=1 -j2 -UTESTING -Iopl -Isrc -Isrc/setup opl pcsound src textscreen > /dev/null
cppcheck --error-exitcode=1 -j2 -UTESTING -Iopl -Isrc -Isrc/setup opl pcsound src textscreen 2> stderr.txt
RET=$?
if [ -s stderr.txt ]
then
cat stderr.txt
fi
exit $RET
else
set -e
./autogen.sh --enable-werror
make
make install DESTDIR=/tmp/whatever
......
......@@ -2,10 +2,8 @@ language: c
compiler: gcc
# Travis uses Ubuntu 12.04 (Precise) for builds by default, which is too
# old and missing the SDL2 packages, so use Trusty instead.
sudo: required
dist: trusty
dist: xenial
env:
- ANALYZE=false
......@@ -15,6 +13,7 @@ addons:
apt:
packages:
- cppcheck
- libpng-dev
- libsdl2-dev
- libsdl2-mixer-dev
- libsdl2-net-dev
......
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
cmake_minimum_required(VERSION 3.7.2)
project("Crispy Doom" VERSION 5.4.0 LANGUAGES C)
project("Crispy Doom" VERSION 5.5.0 LANGUAGES C)
# Autotools variables
set(top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -125,6 +125,30 @@ void FunctionName(int argument, int arg2, int arg3, int arg4, int arg5,
}
```
## Editor-specific default settings
If you use vim, you can put this into your `.vimrc` (or install the
`localvimrc` script):
```
set expandtab
set tabstop=8
set softtabstop=4
set shiftwidth=4
```
Or, if you use Emacs, put this in your `.emacs`:
```lisp
(add-hook 'c-mode-hook (lambda ()
(when (and buffer-file-name
(string-match "chocolate-doom" buffer-file-name))
(c-set-style "bsd")
(setq indent-tabs-mode nil)
(setq tab-width 8)
(setq c-basic-offset 4))))
```
## Security
The C standard library has a number of unsafe functions that should be
......
## HEAD
## 3.1.0 (2019-??-??)
### General
* WAD file autoloading was added - WAD and DEH files can be copied into
an autoload folder to be automatically included on every game start.
* Music pack configuration has been significantly simplified. By simply
copying .flac/.ogg music files into a folder they will be automatically
detected by filename and used.
* Music packs can now be used with OPL as a fallback, and music pack
config files can have any name ending in '.cfg'.
* Network synchronization now uses a PID controller by default, which
makes games more smooth and more stable, especially for Internet play.
* UDP hole punching is now used to make servers behind NAT gateways
automatically accessible to the Internet.
* OPL emulation now uses Nuked OPL3 v1.8 (thanks nukeykt)
* The setup tool now uses "Romero Blue" as a background (see the wiki:
<https://doomwiki.org/wiki/Romero_Blue> for more info).
* The 0 and 5 keys on the number pad can now be bound independently
of any other keyboard key. (thanks BlooD2ool)
* Man page generation has been reworked to use autoconf macro
substitution, making it eaiser for downstream forks to change the
project name. (thanks Jon)
* Several functions have been hardened against incomplete reads and
error conditions, and made safer. (thanks turol)
* We now print a meaningful error message when a savegame cannot be
loaded. (thanks Zodomaniac, chungy)
* Fixed an exception thrown by the Windows kernel when debugging with
GDB. (thanks AXDOOMER)
of any other keyboard key (thanks BlooD2ool).
* With aspect ratio correction disabled, the game can scale to any
arbitrary size and remove all black borders in full screen mode.
(thanks chungy)
* The executable's location is now checked when looking for IWADs.
* The IWAD files installed by Steam-on-Linux are now detected (thanks
chungy).
* It's now possible to use `-response` to load response files.
* Default savegame name now includes the WAD filename (thanks Fabian).
### Refactorings
* CMake project files have been added, replacing the Microsoft Visual
Studio and Code::Blocks files. CMake maintains support for multiple
IDEs and versions thereof, and reduces developer overhead when updating
Chocolate Doom (huge thanks to AlexMax for this work).
* Source code has been retrofitted to fix many compiler warnings and
add const annotations to many variables (thanks turol).
* Several functions have been hardened against incomplete reads and
error conditions, and made safer (thanks turol).
* Man page generation has been reworked to use autoconf macro
substitution, making it eaiser for downstream forks to change the
project name (thanks Jon).
* We now print a meaningful error message when a savegame cannot be
loaded (thanks Zodomaniac, chungy).
* There's now a log file feature for the network code to aid in tracking
down multiplayer bugs.
### Build systems
* CMake has been added along with the deprecation of Microsoft
Visual Studio and Code::Blocks files. CMake maintains support for
multiple IDEs and versions thereof, and reduces developer overhead
when updating Chocolate Doom. (thanks AlexMax)
### Bug fixes
* Fixed an exception thrown by the Windows kernel when debugging with
GDB (thanks AXDOOMER).
* Loop metadata now works properly with music packs on Windows.
* Mouse movement is ignored when the game window isn't active (thanks
Julia Nechaevskaya).
* A bug was fixed where music would not play after pausing on an
intermission screen (thanks Julia Nechaevskaya).
* Timeouts when connecting to a network server were fixed (thanks
@bradc6).
* A long-standing bug where some visplane overflows caused crashes was
fixed (thanks Mike Francis).
* A multiplayer deadlock bug where clients would stop sending tics after
missing tics from the server was fixed. There are both client- and
server- side fixes to fix the problem when playing with older versions
(thanks MadDog and Mortrixs for help tracking this down).
### Doom
* Map33 intermission screen and map33-map35 automap names are
emulated. (thanks CapnClever)
emulated (thanks CapnClever).
* We now exit gracefully when player starts are missing (thanks Mike
Francis).
* We now exit gracefully on levels with a boss brain and no boss spitter
things (thanks Jason Benaim).
* It's now possible to play multiplayer with gameversion=1.2.
### Heretic
* P\_FindNextHighestFloor was changed to match vanilla behavior (thanks
Alexandre-Xavier).
* WAD hash table is now generated for speed (thanks Mike Francis).
* HHE level name replacements now apply on the intermission screen
(thanks ETTiNGRiNDER).
### Hexen
* ACS code has been hardened against potential security
vulnerabilities.
* ACS code has been hardened against potential security vulnerabilities.
* WAD hash table is now generated for speed (thanks Alexandre-Xavier).
### Strife
* Sehacked replacements of the "empty slot" string now work.
* VOICES.WAD is now found in a case-insensitive way (thanks Mike Francis).
## 3.0.0 (2017-12-30)
......
This diff is collapsed.
AC_INIT(Crispy Doom, 5.4,
AC_INIT(Crispy Doom, 5.5.0,
fabian@greffrath.com, crispy-doom)
PACKAGE_SHORTNAME=${PACKAGE_NAME% Doom}
......@@ -80,7 +80,7 @@ AS_HELP_STRING([--without-libpng],
[with_libpng=check]
])
AS_IF([test "x$with_libpng" != xno], [
PKG_CHECK_MODULES(PNG, libpng >= 1.6.10, [
PKG_CHECK_MODULES(PNG, libpng >= 1.2.50, [
AC_DEFINE([HAVE_LIBPNG], [1], [libpng installed])
], [
AS_IF([test "x$with_libpng" != xcheck], [AC_MSG_FAILURE(
......@@ -141,11 +141,10 @@ dnl Automake v1.8.0 is required, please upgrade!
AM_INIT_AUTOMAKE([1.8.0 foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION | sed 's/-.*//; s/\./, /g; s/$/, 0, 0/'`
WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION | sed 's/-.*//; s/\./, /g; s/$/, 0/'`
dnl Without a hyphen. This is used for the bash-completion scripts.
PROGRAM_SPREFIX=$(echo $PACKAGE_SHORTNAME | tr A-Z a-z)
PROGRAM_SPREFIX=crispy
dnl With a hyphen, used almost everywhere else.
PROGRAM_PREFIX=${PROGRAM_SPREFIX}-
......
......@@ -38,6 +38,7 @@
- (void) closeConfigWindow: (id)sender;
- (void) openConfigWindow: (id)sender;
- (NSString *) getIWADLocation;
- (NSString *) autoloadPath;
- (void) awakeFromNib;
- (BOOL) setDropdownList;
- (void) setDropdownSelection;
......
......@@ -15,6 +15,8 @@
#include <stdlib.h>
#include <string.h>
#include <AppKit/AppKit.h>
#include "config.h"
#include "IWADController.h"
typedef enum
......@@ -350,6 +352,27 @@ static const char *NameForIWAD(IWAD iwad)
return env;
}
- (NSString *) autoloadPath
{
NSArray *array = NSSearchPathForDirectoriesInDomains(
NSApplicationSupportDirectory, NSUserDomainMask, YES);
if ([array count] == 0)
{
return nil;
}
IWAD selectedIWAD = [self getSelectedIWAD];
if (selectedIWAD == NUM_IWAD_TYPES)
{
return nil;
}
NSString *base = [array objectAtIndex:0];
return [NSString pathWithComponents:
[NSArray arrayWithObjects: base, @PACKAGE_TARNAME, @"autoload",
IWADFilenames[selectedIWAD], nil]];
}
// Set the DOOMWADPATH environment variable to contain the path to each
// of the configured IWAD files.
......
......@@ -367,6 +367,27 @@ static NSString *AppendQuotedFilename(NSString *str, NSString *fileName)
OpenDocumentation("");
}
- (void) openAutoload: (id) sender
{
NSFileManager *fm = [NSFileManager defaultManager];
NSString *path = [self->iwadController autoloadPath];
if (path == nil)
{
return;
}
if (![fm fileExistsAtPath:path])
{
[fm createDirectoryAtPath:path
withIntermediateDirectories:YES
attributes:nil
error:nil];
}
[[NSWorkspace sharedWorkspace] openFile:path withApplication:@"Finder"];
}
- (void) awakeFromNib
{
[self->launcherWindow setTitle: @PACKAGE_NAME " Launcher"];
......
......@@ -55,10 +55,12 @@ typedef struct
int freelook;
int hires;
int jump;
int leveltime;
int mouselook;
int neghealth;
int overunder;
int pitch;
int playercoords;
int recoil;
int secretmessage;
int smoothlight;
......@@ -98,6 +100,14 @@ extern const crispy_t *critical;
extern void CheckCrispySingleplayer (boolean singleplayer);
enum
{
REINIT_FRAMEBUFFERS = 1,
REINIT_RENDERER = 2,
REINIT_TEXTURES = 4,
REINIT_ASPECTRATIO = 8,
};
enum
{
ASPECTRATIO_OFF,
......@@ -185,4 +195,12 @@ enum
NUM_TRANSLUCENCY
};
enum
{
WIDGETS_OFF,
WIDGETS_AUTOMAP,
WIDGETS_ALWAYS,
NUM_WIDGETS
};
#endif
......@@ -451,6 +451,7 @@ boolean D_InitNetGame(net_connect_data_t *connect_data)
net_loop_client_module.InitClient();
addr = net_loop_client_module.ResolveAddress(NULL);
NET_ReferenceAddress(addr);
}
else
{
......@@ -487,6 +488,7 @@ boolean D_InitNetGame(net_connect_data_t *connect_data)
{
net_sdl_module.InitClient();
addr = net_sdl_module.ResolveAddress(myargv[i+1]);
NET_ReferenceAddress(addr);
if (addr == NULL)
{
......@@ -509,6 +511,7 @@ boolean D_InitNetGame(net_connect_data_t *connect_data)
}
printf("D_InitNetGame: Connected to %s\n", NET_AddrToString(addr));
NET_ReleaseAddress(addr);
// Wait for launch message received from server.
......
......@@ -122,6 +122,7 @@ static struct {
GameMission_t mission;
GameVersion_t version;
} valid_versions[] = {
{ doom, exe_doom_1_2 },
{ doom, exe_doom_1_666 },
{ doom, exe_doom_1_7 },
{ doom, exe_doom_1_8 },
......
......@@ -78,7 +78,9 @@
#define CDWALLRANGE YELLOWRANGE
#define THINGCOLORS GREENS
#define THINGRANGE GREENRANGE
#define SECRETWALLCOLORS (crispy->extautomap ? 252 : WALLCOLORS) // [crispy] purple
#define SECRETWALLCOLORS 252 // [crispy] purple
#define CRISPY_HIGHLIGHT_REVEALED_SECRETS
#define REVEALEDSECRETWALLCOLORS 162 // [crispy] gold
#define SECRETWALLRANGE WALLRANGE
#define GRIDCOLORS (GRAYS + GRAYSRANGE/2)
#define GRIDRANGE 0
......@@ -225,7 +227,8 @@ static int f_w;
static int f_h;
static int lightlev; // used for funky strobing effect
static pixel_t* fb; // pseudo-frame buffer
#define fb I_VideoBuffer // [crispy] simplify
//static pixel_t* fb; // pseudo-frame buffer
static int amclock;
static mpoint_t m_paninc; // how far the window pans each tic (map coords)
......@@ -469,7 +472,7 @@ void AM_initVariables(void)
static event_t st_notify = { ev_keyup, AM_MSGENTERED, 0, 0 };
automapactive = true;
fb = I_VideoBuffer;
// fb = I_VideoBuffer; // [crispy] simplify
f_oldloc.x = INT_MAX;
amclock = 0;
......@@ -579,13 +582,8 @@ void AM_LevelInit(void)
scale_ftom = FixedDiv(FRACUNIT, scale_mtof);
}
void AM_ReInit(boolean rescale)
void AM_ReInit (void)
{
fb = I_VideoBuffer;
if (!rescale)
return;
f_w = SCREENWIDTH;
f_h = SCREENHEIGHT - (ST_HEIGHT << crispy->hires);
......@@ -1358,6 +1356,13 @@ void AM_drawWalls(void)
if (crispy->extautomap &&
cheating && (lines[i].frontsector->special == 9))
AM_drawMline(&l, SECRETWALLCOLORS);
#if defined CRISPY_HIGHLIGHT_REVEALED_SECRETS
// [crispy] draw revealed secrets in gold
else
if (crispy->extautomap &&
crispy->secretmessage && (lines[i].frontsector->oldspecial == 9))
AM_drawMline(&l, REVEALEDSECRETWALLCOLORS);
#endif
else
AM_drawMline(&l, WALLCOLORS+lightlev);
}
......@@ -1378,6 +1383,15 @@ void AM_drawWalls(void)
if (false && cheating) AM_drawMline(&l, SECRETWALLCOLORS + lightlev);
else AM_drawMline(&l, WALLCOLORS+lightlev);
}
#if defined CRISPY_HIGHLIGHT_REVEALED_SECRETS
// [crispy] draw revealed secret sector boundaries in gold
else if (crispy->extautomap &&
(lines[i].backsector->oldspecial == 9 ||
lines[i].frontsector->oldspecial == 9))
{
AM_drawMline(&l, REVEALEDSECRETWALLCOLORS);
}
#endif
// [crispy] draw 2S secret sector boundaries in purple
else if (crispy->extautomap && cheating &&
(lines[i].backsector->special == 9 ||
......
......@@ -318,7 +318,6 @@ boolean D_Display (void)
// [crispy] draw neither pause pic nor menu when taking a clean screenshot
if (crispy->cleanscreenshot)
{
I_FinishUpdate (); // page flip or blit buffer
return false;
}
......@@ -391,6 +390,7 @@ void D_BindVariables(void)
NET_BindVariables();
M_BindIntVariable("mouse_sensitivity", &mouseSensitivity);
M_BindIntVariable("mouse_sensitivity_x2", &mouseSensitivity_x2); // [crispy]
M_BindIntVariable("mouse_sensitivity_y", &mouseSensitivity_y); // [crispy]
M_BindIntVariable("sfx_volume", &sfxVolume);
M_BindIntVariable("music_volume", &musicVolume);
......@@ -434,10 +434,12 @@ void D_BindVariables(void)
M_BindIntVariable("crispy_freelook", &crispy->freelook);
M_BindIntVariable("crispy_hires", &crispy->hires);
M_BindIntVariable("crispy_jump", &crispy->jump);
M_BindIntVariable("crispy_leveltime", &crispy->leveltime);
M_BindIntVariable("crispy_mouselook", &crispy->mouselook);
M_BindIntVariable("crispy_neghealth", &crispy->neghealth);
M_BindIntVariable("crispy_overunder", &crispy->overunder);
M_BindIntVariable("crispy_pitch", &crispy->pitch);
M_BindIntVariable("crispy_playercoords", &crispy->playercoords);
M_BindIntVariable("crispy_recoil", &crispy->recoil);
M_BindIntVariable("crispy_secretmessage", &crispy->secretmessage);
M_BindIntVariable("crispy_smoothlight", &crispy->smoothlight);
......@@ -548,7 +550,8 @@ void D_DoomLoop (void)
" may cause demos and network games to get out of sync.\n");
}
if (demorecording)
// [crispy] no need to write a demo header in demo continue mode
if (demorecording && gameaction != ga_playdemo)
G_BeginRecording ();
main_loop_started = true;
......@@ -1283,7 +1286,7 @@ static void LoadIwadDeh(void)
// Look for chex.deh in the same directory as the IWAD file.
dirname = M_DirName(iwadfile);
chex_deh = M_StringJoin(dirname, DIR_SEPARATOR_S, "chex.deh");
chex_deh = M_StringJoin(dirname, DIR_SEPARATOR_S, "chex.deh", NULL);
free(dirname);
// If the dehacked patch isn't found, try searching the WAD
......@@ -1321,8 +1324,8 @@ static void LoadNerveWad(void)
if ((i = W_GetNumForName("map01")) != -1 &&
(j = W_GetNumForName("map09")) != -1 &&
!strcasecmp(lumpinfo[i]->wad_file->basename, "nerve.wad") &&
!strcasecmp(lumpinfo[j]->wad_file->basename, "nerve.wad"))
!strcasecmp(W_WadNameForLump(lumpinfo[i]), "nerve.wad") &&
!strcasecmp(W_WadNameForLump(lumpinfo[j]), "nerve.wad"))
{
gamemission = pack_nerve;
DEH_AddStringReplacement ("TITLEPIC", "INTERPIC");
......@@ -1335,9 +1338,9 @@ static void LoadNerveWad(void)
(j = W_CheckNumForName("M_EPI2")) != -1 &&
(k = W_CheckNumForName("M_EPISOD")) != -1 &&
(gamevariant == bfgedition ||
(!lumpinfo[i]->wad_file->iwad &&
!lumpinfo[j]->wad_file->iwad &&
!lumpinfo[k]->wad_file->iwad)))
(!W_IsIWADLump(lumpinfo[i]) &&
!W_IsIWADLump(lumpinfo[j]) &&
!W_IsIWADLump(lumpinfo[k]))))
{
if (strrchr(iwadfile, DIR_SEPARATOR) != NULL)
{
......@@ -1378,15 +1381,15 @@ static void LoadNerveWad(void)
// [crispy] support loading MASTERLEVELS.WAD alongside DOOM2.WAD
static void LoadMasterlevelsWad(void)
{
int i;
int i, j;
if (gamemission != doom2)
return;
if ((i = W_GetNumForName("map01")),
!strcasecmp(lumpinfo[i]->wad_file->basename, "masterlevels.wad") &&
(i = W_GetNumForName("map21")),
!strcasecmp(lumpinfo[i]->wad_file->basename, "masterlevels.wad"))
if ((i = W_GetNumForName("map01")) != -1 &&
(j = W_GetNumForName("map21")) != -1 &&
!strcasecmp(W_WadNameForLump(lumpinfo[i]), "masterlevels.wad") &&
!strcasecmp(W_WadNameForLump(lumpinfo[j]), "masterlevels.wad"))
{
gamemission = pack_master;
}
......
......@@ -128,7 +128,7 @@ static void DEH_FrameParseLine(deh_context_t *context, char *line, void *tag)
ivalue = atoi(value);
// [crispy] drop the overflow simulation into the frame table
if (false && state == &states[NUMSTATES - 1])
if (state == &states[NUMSTATES - 1] && false)
{
DEH_FrameOverflow(context, variable_name, ivalue);
}
......
......@@ -27,8 +27,6 @@
#include "i_timer.h"
#include "d_mode.h"
#include "crispy.h"
//
// Global parameters/defines.
//
......
......@@ -259,6 +259,7 @@ extern boolean precache;
extern gamestate_t wipegamestate;
extern int mouseSensitivity;
extern int mouseSensitivity_x2;
extern int mouseSensitivity_y;
extern int bodyqueslot;
......
......@@ -210,6 +210,7 @@ static boolean *mousebuttons = &mousearray[1]; // allow [-1]
// mouse values are used once
int mousex;
int mousex2;
int mousey;
static int dclicktime;
......@@ -347,7 +348,8 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
int forward;
int side;
int look;
static char autorunmsg[48];
player_t *const player = &players[consoleplayer];
static char playermessage[48];
memset(cmd, 0, sizeof(ticcmd_t));
......@@ -424,10 +426,10 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
joybspeed = 29;
}
M_snprintf(autorunmsg, sizeof(autorunmsg), "ALWAYS RUN %s%s",
M_snprintf(playermessage, sizeof(playermessage), "ALWAYS RUN %s%s",
crstr[CR_GREEN],
(joybspeed >= MAX_JOY_BUTTONS) ? "ON" : "OFF");
players[consoleplayer].message = autorunmsg;
player->message = playermessage;
S_StartSound(NULL, sfx_swtchn);
gamekeydown[key_toggleautorun] = false;
......@@ -438,16 +440,35 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
{
novert = !novert;
M_snprintf(autorunmsg, sizeof(autorunmsg),
M_snprintf(playermessage, sizeof(playermessage),
"vertical mouse movement %s%s",
crstr[CR_GREEN],
!novert ? "ON" : "OFF");
players[consoleplayer].message = autorunmsg;
player->message = playermessage;
S_StartSound(NULL, sfx_swtchn);
gamekeydown[key_togglenovert] = false;
}
// [crispy] extra high precision IDMYPOS variant, updates for 10 seconds
if (player->powers[pw_mapcoords])
{
M_snprintf(playermessage, sizeof(playermessage),
"X=%.10f Y=%.10f A=%d",
(double)player->mo->x/FRACUNIT,
(double)player->mo->y/FRACUNIT,
player->mo->angle >> 24);
player->message = playermessage;
player->powers[pw_mapcoords]--;
// [crispy] discard instead of going static
if (!player->powers[pw_mapcoords])
{
player->message = "";
}
}
// let movement keys cancel each other out
if (strafe)
{
......@@ -681,7 +702,7 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
// [crispy] released
if (mbmlookctrl)
{
if (crispy->freelook == FREELOOK_SPRING || mbmlookctrl < 6) // [crispy] short click
if (crispy->freelook == FREELOOK_SPRING || mbmlookctrl < SLOWTURNTICS) // [crispy] short click
{
look = TOCENTER;
}
......@@ -690,7 +711,7 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
}
if (strafe)
side += mousex*2;
side += mousex2*2;
else
cmd->angleturn -= mousex*0x8;
......@@ -701,7 +722,7 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
testcontrols_mousespeed = 0;
}
mousex = mousey = 0;
mousex = mousex2 = mousey = 0;
if (forward > MAXPLMOVE)
forward = MAXPLMOVE;
......@@ -716,7 +737,7 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
cmd->sidemove += side;
// [crispy] lookdir delta is stored in the lower 4 bits of the lookfly variable
if (players[consoleplayer].playerstate == PST_LIVE)
if (player->playerstate == PST_LIVE)
{
if (look < 0)
{
......@@ -833,7 +854,7 @@ void G_DoLoadLevel (void)
memset (gamekeydown, 0, sizeof(gamekeydown));
joyxmove = joyymove = joystrafemove = joylook = 0;
mousex = mousey = 0;
mousex = mousex2 = mousey = 0;
sendpause = sendsave = paused = false;
memset(mousearray, 0, sizeof(mousearray));
memset(joyarray, 0, sizeof(joyarray));
......@@ -1006,6 +1027,10 @@ boolean G_Responder (event_t* ev)
mousex = ev->data2*(mouseSensitivity+5)/10;
else
mousex = 0; // [crispy] disable entirely
if (mouseSensitivity_x2)
mousex2 = ev->data2*(mouseSensitivity_x2+5)/10; // [crispy] separate sensitivity for strafe
else
mousex2 = 0; // [crispy] disable entirely
if (mouseSensitivity_y)
mousey = ev->data3*(mouseSensitivity_y+5)/10; // [crispy] separate sensitivity for y-axis
else
......@@ -1041,7 +1066,9 @@ static void G_CrispyScreenShot()
{
// [crispy] increase screenshot filename limit