mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Merge v1
This commit is contained in:
commit
f1f664e9b1
24 changed files with 204 additions and 113 deletions
|
|
@ -3,7 +3,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
working_directory: /root/SRB2
|
working_directory: /root/SRB2
|
||||||
docker:
|
docker:
|
||||||
- image: debian:jessie
|
- image: debian:stretch
|
||||||
environment:
|
environment:
|
||||||
CC: ccache gcc -m32
|
CC: ccache gcc -m32
|
||||||
PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
|
PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
|
||||||
|
|
@ -36,17 +36,20 @@ jobs:
|
||||||
- v1-SRB2-APT
|
- v1-SRB2-APT
|
||||||
- run:
|
- run:
|
||||||
name: Install SDK
|
name: Install SDK
|
||||||
command: apt-get -qq -y --no-install-recommends install git build-essential nasm libpng12-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib upx openssh-client
|
command: apt-get -qq -y --no-install-recommends install git build-essential nasm libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib upx openssh-client
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: v1-SRB2-APT
|
key: v1-SRB2-APT
|
||||||
paths:
|
paths:
|
||||||
- /var/cache/apt/archives
|
- /var/cache/apt/archives
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
name: Compile without network support
|
name: Compile without network support and BLUA
|
||||||
command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1
|
command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1
|
||||||
- run:
|
- run:
|
||||||
name: Clean build
|
name: wipe build
|
||||||
|
command: make -C src LINUX=1 cleandep
|
||||||
|
- run:
|
||||||
|
name: rebuild depend
|
||||||
command: make -C src LINUX=1 clean
|
command: make -C src LINUX=1 clean
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
|
|
|
||||||
35
.travis.yml
35
.travis.yml
|
|
@ -254,17 +254,21 @@ matrix:
|
||||||
# osx_image: xcode7.2
|
# osx_image: xcode7.2
|
||||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||||
# #Apple LLVM version 7.0.2 (clang-700.1.81)
|
# #Apple LLVM version 7.0.2 (clang-700.1.81)
|
||||||
|
# - os: osx
|
||||||
|
# osx_image: xcode7.3
|
||||||
|
# #Apple LLVM version 7.3.0 (clang-703.0.31)
|
||||||
|
# - os: osx
|
||||||
|
# osx_image: xcode7.3
|
||||||
|
# #Apple LLVM version 7.3.0 (clang-703.0.31)
|
||||||
- os: osx
|
- os: osx
|
||||||
osx_image: xcode7.3
|
|
||||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||||
#Apple LLVM version 7.3.0 (clang-703.0.31)
|
#Default: macOS 10.13 and Xcode 9.4.1
|
||||||
|
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# Deployer Buildbots - OSX
|
# Deployer Buildbots - OSX
|
||||||
################################
|
################################
|
||||||
- os: osx
|
- os: osx
|
||||||
osx_image: xcode7.3
|
|
||||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||||
|
|
@ -564,6 +568,16 @@ addons:
|
||||||
- libgme-dev
|
- libgme-dev
|
||||||
- zlib1g-dev
|
- zlib1g-dev
|
||||||
- p7zip-full
|
- p7zip-full
|
||||||
|
homebrew:
|
||||||
|
taps:
|
||||||
|
- mazmazz/srb2
|
||||||
|
packages:
|
||||||
|
- sdl2_mixer
|
||||||
|
- game-music-emu
|
||||||
|
- p7zip
|
||||||
|
- cmake
|
||||||
|
update: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
|
@ -596,18 +610,10 @@ install:
|
||||||
# * `sdl2_mixer` requires options from the formula tap https://github.com/mazmazz/homebrew-srb2
|
# * `sdl2_mixer` requires options from the formula tap https://github.com/mazmazz/homebrew-srb2
|
||||||
# * `brew postinstall` runs post-install scripts after building a bottle
|
# * `brew postinstall` runs post-install scripts after building a bottle
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
brew update;
|
if [[ "$__DPL_ACTIVE" == "1" ]]; then
|
||||||
brew tap mazmazz/srb2;
|
brew install --build-bottle sdl2 game-music-emu;
|
||||||
fi;
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
||||||
if [[ "$__DPL_ACTIVE" != "1" ]]; then
|
|
||||||
brew install sdl2 sdl2_mixer game-music-emu p7zip;
|
|
||||||
brew install cmake||true;
|
|
||||||
else
|
|
||||||
brew install --build-bottle sdl2 game-music-emu p7zip;
|
|
||||||
brew install --build-bottle mazmazz/srb2/sdl2_mixer --with-flac --with-mpg123;
|
brew install --build-bottle mazmazz/srb2/sdl2_mixer --with-flac --with-mpg123;
|
||||||
brew postinstall sdl2 game-music-emu p7zip mazmazz/srb2/sdl2_mixer;
|
brew postinstall sdl2 game-music-emu mazmazz/srb2/sdl2_mixer;
|
||||||
brew install cmake||true;
|
|
||||||
fi;
|
fi;
|
||||||
fi
|
fi
|
||||||
- mkdir -p $HOME/srb2_cache
|
- mkdir -p $HOME/srb2_cache
|
||||||
|
|
@ -672,7 +678,6 @@ before_script:
|
||||||
-DCPACK_PACKAGE_VENDOR="${PROGRAM_VENDOR}"
|
-DCPACK_PACKAGE_VENDOR="${PROGRAM_VENDOR}"
|
||||||
-DSRB2_SDL2_EXE_NAME="${PROGRAM_FILENAME}"
|
-DSRB2_SDL2_EXE_NAME="${PROGRAM_FILENAME}"
|
||||||
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Build our Makefile from Cmake!
|
# Build our Makefile from Cmake!
|
||||||
- if [[ "$__DPL_ACTIVE" == "1" ]]; then
|
- if [[ "$__DPL_ACTIVE" == "1" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ static void COM_Exec_f(void);
|
||||||
static void COM_Wait_f(void);
|
static void COM_Wait_f(void);
|
||||||
static void COM_Help_f(void);
|
static void COM_Help_f(void);
|
||||||
static void COM_Toggle_f(void);
|
static void COM_Toggle_f(void);
|
||||||
|
static void COM_Add_f(void);
|
||||||
|
|
||||||
static void CV_EnforceExecVersion(void);
|
static void CV_EnforceExecVersion(void);
|
||||||
static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr);
|
static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr);
|
||||||
|
|
@ -291,6 +292,7 @@ void COM_Init(void)
|
||||||
COM_AddCommand("wait", COM_Wait_f);
|
COM_AddCommand("wait", COM_Wait_f);
|
||||||
COM_AddCommand("help", COM_Help_f);
|
COM_AddCommand("help", COM_Help_f);
|
||||||
COM_AddCommand("toggle", COM_Toggle_f);
|
COM_AddCommand("toggle", COM_Toggle_f);
|
||||||
|
COM_AddCommand("add", COM_Add_f);
|
||||||
RegisterNetXCmd(XD_NETVAR, Got_NetVar);
|
RegisterNetXCmd(XD_NETVAR, Got_NetVar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -855,6 +857,27 @@ static void COM_Toggle_f(void)
|
||||||
CV_AddValue(cvar, +1);
|
CV_AddValue(cvar, +1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Command variant of CV_AddValue
|
||||||
|
*/
|
||||||
|
static void COM_Add_f(void)
|
||||||
|
{
|
||||||
|
consvar_t *cvar;
|
||||||
|
|
||||||
|
if (COM_Argc() != 3)
|
||||||
|
{
|
||||||
|
CONS_Printf(M_GetText("Add <cvar_name> <value>: Add to the value of a cvar. Negative values work too!\n"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cvar = CV_FindVar(COM_Argv(1));
|
||||||
|
if (!cvar)
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_NOTICE, M_GetText("%s is not a cvar\n"), COM_Argv(1));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
CV_AddValue(cvar, atoi(COM_Argv(2)));
|
||||||
|
}
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
// VARIABLE SIZE BUFFERS
|
// VARIABLE SIZE BUFFERS
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ ticcmd_t netcmds[BACKUPTICS][MAXPLAYERS];
|
||||||
static textcmdtic_t *textcmds[TEXTCMD_HASH_SIZE] = {NULL};
|
static textcmdtic_t *textcmds[TEXTCMD_HASH_SIZE] = {NULL};
|
||||||
|
|
||||||
|
|
||||||
consvar_t cv_showjoinaddress = {"showjoinaddress", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_showjoinaddress = {"showjoinaddress", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
static CV_PossibleValue_t playbackspeed_cons_t[] = {{1, "MIN"}, {10, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t playbackspeed_cons_t[] = {{1, "MIN"}, {10, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_playbackspeed = {"playbackspeed", "1", 0, playbackspeed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_playbackspeed = {"playbackspeed", "1", 0, playbackspeed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
@ -1452,33 +1452,13 @@ static void SV_SendPlayerInfo(INT32 node)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
netbuffer->u.playerinfo[i].node = (UINT8)playernode[i];
|
netbuffer->u.playerinfo[i].node = i;
|
||||||
strncpy(netbuffer->u.playerinfo[i].name, (const char *)&player_names[i], MAXPLAYERNAME+1);
|
strncpy(netbuffer->u.playerinfo[i].name, (const char *)&player_names[i], MAXPLAYERNAME+1);
|
||||||
netbuffer->u.playerinfo[i].name[MAXPLAYERNAME] = '\0';
|
netbuffer->u.playerinfo[i].name[MAXPLAYERNAME] = '\0';
|
||||||
|
|
||||||
//fetch IP address
|
//fetch IP address
|
||||||
{
|
//No, don't do that, you fuckface.
|
||||||
const char *claddress;
|
memset(netbuffer->u.playerinfo[i].address, 0, 4);
|
||||||
UINT32 numericaddress[4];
|
|
||||||
|
|
||||||
memset(netbuffer->u.playerinfo[i].address, 0, 4);
|
|
||||||
if (playernode[i] == 0)
|
|
||||||
{
|
|
||||||
//127.0.0.1
|
|
||||||
netbuffer->u.playerinfo[i].address[0] = 127;
|
|
||||||
netbuffer->u.playerinfo[i].address[3] = 1;
|
|
||||||
}
|
|
||||||
else if (playernode[i] > 0 && I_GetNodeAddress && (claddress = I_GetNodeAddress(playernode[i])) != NULL)
|
|
||||||
{
|
|
||||||
if (sscanf(claddress, "%d.%d.%d.%d", &numericaddress[0], &numericaddress[1], &numericaddress[2], &numericaddress[3]) < 4)
|
|
||||||
goto badaddress;
|
|
||||||
netbuffer->u.playerinfo[i].address[0] = (UINT8)numericaddress[0];
|
|
||||||
netbuffer->u.playerinfo[i].address[1] = (UINT8)numericaddress[1];
|
|
||||||
netbuffer->u.playerinfo[i].address[2] = (UINT8)numericaddress[2];
|
|
||||||
netbuffer->u.playerinfo[i].address[3] = (UINT8)numericaddress[3];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
badaddress:
|
|
||||||
|
|
||||||
if (G_GametypeHasTeams())
|
if (G_GametypeHasTeams())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
25
src/d_main.c
25
src/d_main.c
|
|
@ -1369,10 +1369,9 @@ void D_SRB2Main(void)
|
||||||
midi_disabled = true;
|
midi_disabled = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (M_CheckParm("-nosound"))
|
if (M_CheckParm("-noaudio")) // combines -nosound and -nomusic
|
||||||
sound_disabled = true;
|
|
||||||
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
|
|
||||||
{
|
{
|
||||||
|
sound_disabled = true;
|
||||||
digital_disabled = true;
|
digital_disabled = true;
|
||||||
#ifndef NO_MIDI
|
#ifndef NO_MIDI
|
||||||
midi_disabled = true;
|
midi_disabled = true;
|
||||||
|
|
@ -1380,12 +1379,24 @@ void D_SRB2Main(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (M_CheckParm("-nosound"))
|
||||||
|
sound_disabled = true;
|
||||||
|
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
|
||||||
|
{
|
||||||
|
digital_disabled = true;
|
||||||
#ifndef NO_MIDI
|
#ifndef NO_MIDI
|
||||||
if (M_CheckParm("-nomidimusic"))
|
midi_disabled = true;
|
||||||
midi_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
|
|
||||||
#endif
|
#endif
|
||||||
if (M_CheckParm("-nodigmusic"))
|
}
|
||||||
digital_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
|
else
|
||||||
|
{
|
||||||
|
#ifndef NO_MIDI
|
||||||
|
if (M_CheckParm("-nomidimusic"))
|
||||||
|
midi_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
|
||||||
|
#endif
|
||||||
|
if (M_CheckParm("-nodigmusic"))
|
||||||
|
digital_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!( sound_disabled && digital_disabled
|
if (!( sound_disabled && digital_disabled
|
||||||
#ifndef NO_MIDI
|
#ifndef NO_MIDI
|
||||||
|
|
|
||||||
|
|
@ -426,7 +426,7 @@ consvar_t cv_numlaps = {"numlaps", "3", CV_NETVAR|CV_CALL|CV_NOINIT, numlaps_con
|
||||||
static CV_PossibleValue_t basenumlaps_cons_t[] = {{1, "MIN"}, {50, "MAX"}, {0, "Map default"}, {0, NULL}};
|
static CV_PossibleValue_t basenumlaps_cons_t[] = {{1, "MIN"}, {50, "MAX"}, {0, "Map default"}, {0, NULL}};
|
||||||
consvar_t cv_basenumlaps = {"basenumlaps", "Map default", CV_NETVAR|CV_CALL|CV_CHEAT, basenumlaps_cons_t, BaseNumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_basenumlaps = {"basenumlaps", "Map default", CV_NETVAR|CV_CALL|CV_CHEAT, basenumlaps_cons_t, BaseNumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_forceskin = {"forceskin", "-1", CV_NETVAR|CV_CALL|CV_CHEAT, NULL, ForceSkin_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_forceskin = {"forceskin", "Off", CV_NETVAR|CV_CALL|CV_CHEAT, Forceskin_cons_t, ForceSkin_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_downloading = {"downloading", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_downloading = {"downloading", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_allowexitlevel = {"allowexitlevel", "No", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_allowexitlevel = {"allowexitlevel", "No", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
|
@ -517,6 +517,17 @@ const char *netxcmdnames[MAXNETXCMD - 1] =
|
||||||
*/
|
*/
|
||||||
void D_RegisterServerCommands(void)
|
void D_RegisterServerCommands(void)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
Forceskin_cons_t[0].value = -1;
|
||||||
|
Forceskin_cons_t[0].strvalue = "Off";
|
||||||
|
|
||||||
|
// Set the values to 0/NULl, it will be overwritten later when a skin is assigned to the slot.
|
||||||
|
for (i = 1; i < MAXSKINS; i++)
|
||||||
|
{
|
||||||
|
Forceskin_cons_t[i].value = 0;
|
||||||
|
Forceskin_cons_t[i].strvalue = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
RegisterNetXCmd(XD_NAMEANDCOLOR, Got_NameAndColor);
|
RegisterNetXCmd(XD_NAMEANDCOLOR, Got_NameAndColor);
|
||||||
RegisterNetXCmd(XD_WEAPONPREF, Got_WeaponPref);
|
RegisterNetXCmd(XD_WEAPONPREF, Got_WeaponPref);
|
||||||
RegisterNetXCmd(XD_MAP, Got_Mapcmd);
|
RegisterNetXCmd(XD_MAP, Got_Mapcmd);
|
||||||
|
|
@ -5369,27 +5380,11 @@ static void Command_Archivetest_f(void)
|
||||||
|
|
||||||
/** Makes a change to ::cv_forceskin take effect immediately.
|
/** Makes a change to ::cv_forceskin take effect immediately.
|
||||||
*
|
*
|
||||||
* \todo Move the enforcement code out of SendNameAndColor() so this hack
|
|
||||||
* isn't needed.
|
|
||||||
* \sa Command_SetForcedSkin_f, cv_forceskin, forcedskin
|
* \sa Command_SetForcedSkin_f, cv_forceskin, forcedskin
|
||||||
* \author Graue <graue@oceanbase.org>
|
* \author Graue <graue@oceanbase.org>
|
||||||
*/
|
*/
|
||||||
static void ForceSkin_OnChange(void)
|
static void ForceSkin_OnChange(void)
|
||||||
{
|
{
|
||||||
if ((server || IsPlayerAdmin(consoleplayer)) && (cv_forceskin.value < -1 || cv_forceskin.value >= numskins))
|
|
||||||
{
|
|
||||||
if (cv_forceskin.value == -2)
|
|
||||||
CV_SetValue(&cv_forceskin, numskins-1);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// hack because I can't restrict this and still allow added skins to be used with forceskin.
|
|
||||||
if (!menuactive)
|
|
||||||
CONS_Printf(M_GetText("Valid skin numbers are 0 to %d (-1 disables)\n"), numskins - 1);
|
|
||||||
CV_SetValue(&cv_forceskin, -1);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOT in SP, silly!
|
// NOT in SP, silly!
|
||||||
if (!(netgame || multiplayer))
|
if (!(netgame || multiplayer))
|
||||||
return;
|
return;
|
||||||
|
|
@ -5398,7 +5393,7 @@ static void ForceSkin_OnChange(void)
|
||||||
CONS_Printf("The server has lifted the forced skin restrictions.\n");
|
CONS_Printf("The server has lifted the forced skin restrictions.\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CONS_Printf("The server is restricting all players to skin \"%s\".\n",skins[cv_forceskin.value].name);
|
CONS_Printf("The server is restricting all players to skin \"%s\".\n",cv_forceskin.string);
|
||||||
ForceAllSkins(cv_forceskin.value);
|
ForceAllSkins(cv_forceskin.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -644,20 +644,34 @@ void F_CreditDrawer(void)
|
||||||
if (((y>>FRACBITS) * vid.dupy) > vid.height)
|
if (((y>>FRACBITS) * vid.dupy) > vid.height)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// draw song credits
|
void F_CreditTicker(void)
|
||||||
if (cv_songcredits.value)
|
{
|
||||||
HU_DrawSongCredits();
|
// "Simulate" the drawing of the credits so that dedicated mode doesn't get stuck
|
||||||
|
UINT16 i;
|
||||||
|
fixed_t y = (80<<FRACBITS) - 5*(animtimer<<FRACBITS)/8;
|
||||||
|
|
||||||
|
// Draw credits text on top
|
||||||
|
for (i = 0; credits[i]; i++)
|
||||||
|
{
|
||||||
|
switch(credits[i][0])
|
||||||
|
{
|
||||||
|
case 0: y += 80<<FRACBITS; break;
|
||||||
|
case 1: y += 30<<FRACBITS; break;
|
||||||
|
default: y += 12<<FRACBITS; break;
|
||||||
|
}
|
||||||
|
if (FixedMul(y,vid.dupy) > vid.height)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do this here rather than in the drawer you doofus! (this is why dedicated mode broke at credits)
|
||||||
if (!credits[i] && y <= 120<<FRACBITS && !finalecount)
|
if (!credits[i] && y <= 120<<FRACBITS && !finalecount)
|
||||||
{
|
{
|
||||||
timetonext = 5*TICRATE+1;
|
timetonext = 5*TICRATE+1;
|
||||||
finalecount = 5*TICRATE;
|
finalecount = 5*TICRATE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void F_CreditTicker(void)
|
|
||||||
{
|
|
||||||
if (timetonext)
|
if (timetonext)
|
||||||
timetonext--;
|
timetonext--;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1239,6 +1239,8 @@ void G_ClearAllControlKeys(void)
|
||||||
{
|
{
|
||||||
G_ClearControlKeys(gamecontrol, i);
|
G_ClearControlKeys(gamecontrol, i);
|
||||||
G_ClearControlKeys(gamecontrolbis, i);
|
G_ClearControlKeys(gamecontrolbis, i);
|
||||||
|
G_ClearControlKeys(gamecontrol3, i);
|
||||||
|
G_ClearControlKeys(gamecontrol4, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5261,7 +5261,7 @@ static void HWR_DrawSprites(void)
|
||||||
if (spr->mobj && spr->mobj->skin && spr->mobj->sprite == SPR_PLAY)
|
if (spr->mobj && spr->mobj->skin && spr->mobj->sprite == SPR_PLAY)
|
||||||
{
|
{
|
||||||
// 8/1/19: Only don't display player models if no default SPR_PLAY is found.
|
// 8/1/19: Only don't display player models if no default SPR_PLAY is found.
|
||||||
if (!cv_grmd2.value || ((md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound || md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale < 0.0f) && (md2_models[SPR_PLAY].notfound || md2_models[SPR_PLAY].scale < 0.0f)))
|
if (!cv_grmd2.value || ((md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound || md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale < 0.0f) && ((!cv_grfallbackplayermodel.value) || md2_models[SPR_PLAY].notfound || md2_models[SPR_PLAY].scale < 0.0f)))
|
||||||
HWR_DrawSprite(spr);
|
HWR_DrawSprite(spr);
|
||||||
else
|
else
|
||||||
HWR_DrawMD2(spr);
|
HWR_DrawMD2(spr);
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ extern consvar_t cv_grcoronas;
|
||||||
extern consvar_t cv_grcoronasize;
|
extern consvar_t cv_grcoronasize;
|
||||||
#endif
|
#endif
|
||||||
extern consvar_t cv_grmd2;
|
extern consvar_t cv_grmd2;
|
||||||
|
extern consvar_t cv_grfallbackplayermodel;
|
||||||
extern consvar_t cv_grfog;
|
extern consvar_t cv_grfog;
|
||||||
extern consvar_t cv_grfogcolor;
|
extern consvar_t cv_grfogcolor;
|
||||||
extern consvar_t cv_grfogdensity;
|
extern consvar_t cv_grfogdensity;
|
||||||
|
|
|
||||||
|
|
@ -219,6 +219,7 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] =
|
||||||
SKINCOLOR_SUNSET,10, // SKINCOLOR_MOONSLAM
|
SKINCOLOR_SUNSET,10, // SKINCOLOR_MOONSLAM
|
||||||
SKINCOLOR_MAUVE,10, // SKINCOLOR_ULTRAVIOLET
|
SKINCOLOR_MAUVE,10, // SKINCOLOR_ULTRAVIOLET
|
||||||
SKINCOLOR_DAWN,6, // SKINCOLOR_DUSK
|
SKINCOLOR_DAWN,6, // SKINCOLOR_DUSK
|
||||||
|
SKINCOLOR_POPCORN,12, // SKINCOLOR_BUBBLEGUM
|
||||||
SKINCOLOR_EMERALD,8, // SKINCOLOR_PURPLE
|
SKINCOLOR_EMERALD,8, // SKINCOLOR_PURPLE
|
||||||
SKINCOLOR_PASTEL,11, // SKINCOLOR_FUCHSIA
|
SKINCOLOR_PASTEL,11, // SKINCOLOR_FUCHSIA
|
||||||
SKINCOLOR_MAROON,8, // SKINCOLOR_TOXIC
|
SKINCOLOR_MAROON,8, // SKINCOLOR_TOXIC
|
||||||
|
|
@ -3505,7 +3506,6 @@ void K_DoSneaker(player_t *player, INT32 type)
|
||||||
{
|
{
|
||||||
player->pflags |= PF_ATTACKDOWN;
|
player->pflags |= PF_ATTACKDOWN;
|
||||||
K_PlayBoostTaunt(player->mo);
|
K_PlayBoostTaunt(player->mo);
|
||||||
player->powers[pw_flashing] = 0; // Stop flashing after boosting
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5008,6 +5008,7 @@ static void K_KartDrift(player_t *player, boolean onground)
|
||||||
|
|
||||||
if ((!player->kartstuff[k_sneakertimer])
|
if ((!player->kartstuff[k_sneakertimer])
|
||||||
|| (!player->cmd.driftturn)
|
|| (!player->cmd.driftturn)
|
||||||
|
|| (!player->kartstuff[k_aizdriftstrat])
|
||||||
|| (player->cmd.driftturn > 0) != (player->kartstuff[k_aizdriftstrat] > 0))
|
|| (player->cmd.driftturn > 0) != (player->kartstuff[k_aizdriftstrat] > 0))
|
||||||
{
|
{
|
||||||
if (!player->kartstuff[k_drift])
|
if (!player->kartstuff[k_drift])
|
||||||
|
|
|
||||||
|
|
@ -2759,7 +2759,7 @@ static luaL_Reg lib[] = {
|
||||||
// k_kart
|
// k_kart
|
||||||
{"K_PlayAttackTaunt", lib_kAttackSound},
|
{"K_PlayAttackTaunt", lib_kAttackSound},
|
||||||
{"K_PlayBoostTaunt", lib_kBoostSound},
|
{"K_PlayBoostTaunt", lib_kBoostSound},
|
||||||
{"K_PlayPowerGloatSund", lib_kGloatSound},
|
{"K_PlayPowerGloatSound", lib_kGloatSound},
|
||||||
{"K_PlayOvertakeSound", lib_kOvertakeSound},
|
{"K_PlayOvertakeSound", lib_kOvertakeSound},
|
||||||
{"K_PlayLossSound", lib_kLossSound},
|
{"K_PlayLossSound", lib_kLossSound},
|
||||||
{"K_PlayHitEmSound", lib_kHitEmSound},
|
{"K_PlayHitEmSound", lib_kHitEmSound},
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ enum hook {
|
||||||
hook_PlayerExplode, //SRB2KART
|
hook_PlayerExplode, //SRB2KART
|
||||||
hook_PlayerSquish, //SRB2KART
|
hook_PlayerSquish, //SRB2KART
|
||||||
hook_PlayerCmd, //SRB2KART
|
hook_PlayerCmd, //SRB2KART
|
||||||
|
hook_IntermissionThinker, //SRB2KART
|
||||||
|
|
||||||
hook_MAX // last hook
|
hook_MAX // last hook
|
||||||
};
|
};
|
||||||
|
|
@ -99,4 +100,6 @@ boolean LUAh_PlayerSquish(player_t *player, mobj_t *inflictor, mobj_t *source);
|
||||||
|
|
||||||
boolean LUAh_PlayerCmd(player_t *player, ticcmd_t *cmd); // Allows to write to player cmd before the game does anything with them.
|
boolean LUAh_PlayerCmd(player_t *player, ticcmd_t *cmd); // Allows to write to player cmd before the game does anything with them.
|
||||||
|
|
||||||
|
void LUAh_IntermissionThinker(void); // Hook for Y_Ticker
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ const char *const hookNames[hook_MAX+1] = {
|
||||||
"PlayerExplode",
|
"PlayerExplode",
|
||||||
"PlayerSquish",
|
"PlayerSquish",
|
||||||
"PlayerCmd",
|
"PlayerCmd",
|
||||||
|
"IntermissionThinker",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -420,6 +421,28 @@ void LUAh_ThinkFrame(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hook for Y_Ticker
|
||||||
|
void LUAh_IntermissionThinker(void)
|
||||||
|
{
|
||||||
|
hook_p hookp;
|
||||||
|
if (!gL || !(hooksAvailable[hook_IntermissionThinker/8] & (1<<(hook_IntermissionThinker%8))))
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (hookp = roothook; hookp; hookp = hookp->next)
|
||||||
|
if (hookp->type == hook_IntermissionThinker)
|
||||||
|
{
|
||||||
|
lua_pushfstring(gL, FMT_HOOKID, hookp->id);
|
||||||
|
lua_gettable(gL, LUA_REGISTRYINDEX);
|
||||||
|
if (lua_pcall(gL, 0, 0, 0)) {
|
||||||
|
if (!hookp->error || cv_debug & DBG_LUA)
|
||||||
|
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
|
||||||
|
lua_pop(gL, 1);
|
||||||
|
hookp->error = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Hook for mobj collisions
|
// Hook for mobj collisions
|
||||||
UINT8 LUAh_MobjCollideHook(mobj_t *thing1, mobj_t *thing2, enum hook which)
|
UINT8 LUAh_MobjCollideHook(mobj_t *thing1, mobj_t *thing2, enum hook which)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
18
src/m_menu.c
18
src/m_menu.c
|
|
@ -1299,7 +1299,8 @@ static menuitem_t OP_VideoOptionsMenu[] =
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
{IT_STRING | IT_CVAR, NULL, "3D models", &cv_grmd2, 105},
|
{IT_STRING | IT_CVAR, NULL, "3D models", &cv_grmd2, 105},
|
||||||
{IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 115},
|
{IT_STRING | IT_CVAR, NULL, "Fallback Player 3D Model", &cv_grfallbackplayermodel, 115},
|
||||||
|
{IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 125},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -8415,7 +8416,10 @@ static void M_ConnectMenu(INT32 choice)
|
||||||
|
|
||||||
// first page of servers
|
// first page of servers
|
||||||
serverlistpage = 0;
|
serverlistpage = 0;
|
||||||
M_SetupNextMenu(&MP_ConnectDef);
|
if (ms_RoomId < 0)
|
||||||
|
M_RoomMenu(0); // Select a room instead of staring at an empty list
|
||||||
|
else
|
||||||
|
M_SetupNextMenu(&MP_ConnectDef);
|
||||||
itemOn = 0;
|
itemOn = 0;
|
||||||
M_Refresh(0);
|
M_Refresh(0);
|
||||||
}
|
}
|
||||||
|
|
@ -8488,7 +8492,15 @@ static void M_ChooseRoom(INT32 choice)
|
||||||
}
|
}
|
||||||
|
|
||||||
serverlistpage = 0;
|
serverlistpage = 0;
|
||||||
M_SetupNextMenu(currentMenu->prevMenu);
|
/*
|
||||||
|
We were on the Multiplayer menu? That means that we must have been trying to
|
||||||
|
view the server browser, but we hadn't selected a room yet. So we need to go
|
||||||
|
to the browser next, not back there.
|
||||||
|
*/
|
||||||
|
if (currentMenu->prevMenu == &MP_MainDef)
|
||||||
|
M_SetupNextMenu(&MP_ConnectDef);
|
||||||
|
else
|
||||||
|
M_SetupNextMenu(currentMenu->prevMenu);
|
||||||
if (currentMenu == &MP_ConnectDef)
|
if (currentMenu == &MP_ConnectDef)
|
||||||
M_Refresh(0);
|
M_Refresh(0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8434,6 +8434,9 @@ void A_SPBChase(mobj_t *actor)
|
||||||
wspeed = (3*defspeed)/2;
|
wspeed = (3*defspeed)/2;
|
||||||
if (wspeed < 20*actor->tracer->scale)
|
if (wspeed < 20*actor->tracer->scale)
|
||||||
wspeed = 20*actor->tracer->scale;
|
wspeed = 20*actor->tracer->scale;
|
||||||
|
if (actor->tracer->player->pflags & PF_SLIDING)
|
||||||
|
wspeed = actor->tracer->player->speed/2;
|
||||||
|
// ^^^^ current section: These are annoying, and grand metropolis in particular needs this.
|
||||||
|
|
||||||
hang = R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y);
|
hang = R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y);
|
||||||
vang = R_PointToAngle2(0, actor->z, dist, actor->tracer->z);
|
vang = R_PointToAngle2(0, actor->z, dist, actor->tracer->z);
|
||||||
|
|
|
||||||
|
|
@ -1580,12 +1580,12 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
|
|
||||||
if (G_BattleGametype())
|
if (G_BattleGametype())
|
||||||
{
|
{
|
||||||
if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]))
|
if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]) && !(thing->player->powers[pw_flashing])) // Don't steal bumpers while intangible
|
||||||
{
|
{
|
||||||
K_StealBumper(thing->player, tmthing->player, false);
|
K_StealBumper(thing->player, tmthing->player, false);
|
||||||
K_SpinPlayer(tmthing->player, thing, 0, tmthing, false);
|
K_SpinPlayer(tmthing->player, thing, 0, tmthing, false);
|
||||||
}
|
}
|
||||||
else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]))
|
else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]) && !(tmthing->player->powers[pw_flashing]))
|
||||||
{
|
{
|
||||||
K_StealBumper(tmthing->player, thing->player, false);
|
K_StealBumper(tmthing->player, thing->player, false);
|
||||||
K_SpinPlayer(thing->player, tmthing, 0, thing, false);
|
K_SpinPlayer(thing->player, tmthing, 0, thing, false);
|
||||||
|
|
|
||||||
|
|
@ -1562,6 +1562,7 @@ void R_RegisterEngineStuff(void)
|
||||||
CV_RegisterVar(&cv_grcoronasize);
|
CV_RegisterVar(&cv_grcoronasize);
|
||||||
#endif
|
#endif
|
||||||
CV_RegisterVar(&cv_grmd2);
|
CV_RegisterVar(&cv_grmd2);
|
||||||
|
CV_RegisterVar(&cv_grfallbackplayermodel);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
|
|
|
||||||
37
src/r_segs.c
37
src/r_segs.c
|
|
@ -870,16 +870,18 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
leftheight -= viewz;
|
leftheight -= viewz;
|
||||||
rightheight -= viewz;
|
rightheight -= viewz;
|
||||||
|
|
||||||
#define OVERFLOWTEST(height, scale) \
|
#define CLAMPMAX INT32_MAX
|
||||||
overflow_test = (INT64)centeryfrac - (((INT64)height*scale)>>FRACBITS); \
|
#define CLAMPMIN (-INT32_MAX) // This is not INT32_MIN on purpose! INT32_MIN makes the drawers freak out.
|
||||||
if (overflow_test < 0) overflow_test = -overflow_test; \
|
// Monster Iestyn (25/03/18): do not skip these lights if they fail overflow test, just clamp them instead so they behave.
|
||||||
if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) continue;
|
overflow_test = (INT64)centeryfrac - (((INT64)leftheight*ds->scale1)>>FRACBITS);
|
||||||
|
if (overflow_test > (INT64)CLAMPMAX) rlight->height = CLAMPMAX;
|
||||||
|
else if (overflow_test > (INT64)CLAMPMIN) rlight->height = (fixed_t)overflow_test;
|
||||||
|
else rlight->height = CLAMPMIN;
|
||||||
|
|
||||||
OVERFLOWTEST(leftheight, ds->scale1)
|
overflow_test = (INT64)centeryfrac - (((INT64)rightheight*ds->scale2)>>FRACBITS);
|
||||||
OVERFLOWTEST(rightheight, ds->scale2)
|
if (overflow_test > (INT64)CLAMPMAX) rlight->heightstep = CLAMPMAX;
|
||||||
|
else if (overflow_test > (INT64)CLAMPMIN) rlight->heightstep = (fixed_t)overflow_test;
|
||||||
rlight->height = (centeryfrac) - FixedMul(leftheight, ds->scale1);
|
else rlight->heightstep = CLAMPMIN;
|
||||||
rlight->heightstep = (centeryfrac) - FixedMul(rightheight, ds->scale2);
|
|
||||||
rlight->heightstep = (rlight->heightstep-rlight->height)/(range);
|
rlight->heightstep = (rlight->heightstep-rlight->height)/(range);
|
||||||
#else
|
#else
|
||||||
if (light->height < *pfloor->bottomheight)
|
if (light->height < *pfloor->bottomheight)
|
||||||
|
|
@ -901,12 +903,16 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
leftheight -= viewz;
|
leftheight -= viewz;
|
||||||
rightheight -= viewz;
|
rightheight -= viewz;
|
||||||
|
|
||||||
OVERFLOWTEST(leftheight, ds->scale1)
|
// Monster Iestyn (25/03/18): do not skip these lights if they fail overflow test, just clamp them instead so they behave.
|
||||||
OVERFLOWTEST(rightheight, ds->scale2)
|
overflow_test = (INT64)centeryfrac - (((INT64)leftheight*ds->scale1)>>FRACBITS);
|
||||||
#undef OVERFLOWTEST
|
if (overflow_test > (INT64)CLAMPMAX) rlight->botheight = CLAMPMAX;
|
||||||
|
else if (overflow_test > (INT64)CLAMPMIN) rlight->botheight = (fixed_t)overflow_test;
|
||||||
|
else rlight->botheight = CLAMPMIN;
|
||||||
|
|
||||||
rlight->botheight = (centeryfrac) - FixedMul(leftheight, ds->scale1);
|
overflow_test = (INT64)centeryfrac - (((INT64)rightheight*ds->scale2)>>FRACBITS);
|
||||||
rlight->botheightstep = (centeryfrac) - FixedMul(rightheight, ds->scale2);
|
if (overflow_test > (INT64)CLAMPMAX) rlight->botheightstep = CLAMPMAX;
|
||||||
|
else if (overflow_test > (INT64)CLAMPMIN) rlight->botheightstep = (fixed_t)overflow_test;
|
||||||
|
else rlight->botheightstep = CLAMPMIN;
|
||||||
rlight->botheightstep = (rlight->botheightstep-rlight->botheight)/(range);
|
rlight->botheightstep = (rlight->botheightstep-rlight->botheight)/(range);
|
||||||
#else
|
#else
|
||||||
lheight = *light->caster->bottomheight;// > *pfloor->topheight ? *pfloor->topheight + FRACUNIT : *light->caster->bottomheight;
|
lheight = *light->caster->bottomheight;// > *pfloor->topheight ? *pfloor->topheight + FRACUNIT : *light->caster->bottomheight;
|
||||||
|
|
@ -1079,9 +1085,6 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CLAMPMAX INT32_MAX
|
|
||||||
#define CLAMPMIN (-INT32_MAX) // This is not INT32_MIN on purpose! INT32_MIN makes the drawers freak out.
|
|
||||||
|
|
||||||
// draw the columns
|
// draw the columns
|
||||||
for (dc_x = x1; dc_x <= x2; dc_x++)
|
for (dc_x = x1; dc_x <= x2; dc_x++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
|
||||||
//int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
|
//int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
CV_PossibleValue_t Forceskin_cons_t[MAXSKINS+2];
|
||||||
|
|
||||||
static void R_InitSkins(void);
|
static void R_InitSkins(void);
|
||||||
|
|
||||||
#define MINZ (FRACUNIT*4)
|
#define MINZ (FRACUNIT*4)
|
||||||
|
|
@ -1803,7 +1805,7 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Someone seriously wants infinite draw distance for precipitation?
|
// no, no infinite draw distance for precipitation. this option at zero is supposed to turn it off
|
||||||
if ((limit_dist = (fixed_t)cv_drawdist_precip.value << FRACBITS))
|
if ((limit_dist = (fixed_t)cv_drawdist_precip.value << FRACBITS))
|
||||||
{
|
{
|
||||||
for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext)
|
for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext)
|
||||||
|
|
@ -1819,13 +1821,6 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel)
|
||||||
R_ProjectPrecipitationSprite(precipthing);
|
R_ProjectPrecipitationSprite(precipthing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// Draw everything in sector, no checks
|
|
||||||
for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext)
|
|
||||||
if (!(precipthing->precipflags & PCF_INVISIBLE))
|
|
||||||
R_ProjectPrecipitationSprite(precipthing);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -2595,6 +2590,10 @@ void R_InitSkins(void)
|
||||||
skin->spritedef.spriteframes = sprites[SPR_PLAY].spriteframes;
|
skin->spritedef.spriteframes = sprites[SPR_PLAY].spriteframes;
|
||||||
ST_LoadFaceGraphics(skin->facerank, skin->facewant, skin->facemmap, 0);
|
ST_LoadFaceGraphics(skin->facerank, skin->facewant, skin->facemmap, 0);
|
||||||
|
|
||||||
|
// Set values for Sonic skin
|
||||||
|
Forceskin_cons_t[1].value = 0;
|
||||||
|
Forceskin_cons_t[1].strvalue = skin->name;
|
||||||
|
|
||||||
//MD2 for sonic doesn't want to load in Linux.
|
//MD2 for sonic doesn't want to load in Linux.
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (rendermode == render_opengl)
|
if (rendermode == render_opengl)
|
||||||
|
|
@ -2981,6 +2980,10 @@ next_token:
|
||||||
skin_cons_t[numskins].strvalue = skin->name;
|
skin_cons_t[numskins].strvalue = skin->name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Update the forceskin possiblevalues
|
||||||
|
Forceskin_cons_t[numskins+1].value = numskins;
|
||||||
|
Forceskin_cons_t[numskins+1].strvalue = skins[numskins].name;
|
||||||
|
|
||||||
// add face graphics
|
// add face graphics
|
||||||
ST_LoadFaceGraphics(skin->facerank, skin->facewant, skin->facemmap, numskins);
|
ST_LoadFaceGraphics(skin->facerank, skin->facewant, skin->facemmap, numskins);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,8 @@ typedef struct
|
||||||
sfxenum_t soundsid[NUMSKINSOUNDS]; // sound # in S_sfx table
|
sfxenum_t soundsid[NUMSKINSOUNDS]; // sound # in S_sfx table
|
||||||
} skin_t;
|
} skin_t;
|
||||||
|
|
||||||
|
extern CV_PossibleValue_t Forceskin_cons_t[];
|
||||||
|
|
||||||
// -----------
|
// -----------
|
||||||
// NOT SKINS STUFF !
|
// NOT SKINS STUFF !
|
||||||
// -----------
|
// -----------
|
||||||
|
|
|
||||||
|
|
@ -2181,7 +2181,7 @@ static void Command_RestartAudio_f(void)
|
||||||
|
|
||||||
void GameSounds_OnChange(void)
|
void GameSounds_OnChange(void)
|
||||||
{
|
{
|
||||||
if (M_CheckParm("-nosound"))
|
if (M_CheckParm("-nosound") || M_CheckParm("-noaudio"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (sound_disabled)
|
if (sound_disabled)
|
||||||
|
|
@ -2195,7 +2195,7 @@ void GameSounds_OnChange(void)
|
||||||
|
|
||||||
void GameDigiMusic_OnChange(void)
|
void GameDigiMusic_OnChange(void)
|
||||||
{
|
{
|
||||||
if (M_CheckParm("-nomusic"))
|
if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio"))
|
||||||
return;
|
return;
|
||||||
else if (M_CheckParm("-nodigmusic"))
|
else if (M_CheckParm("-nodigmusic"))
|
||||||
return;
|
return;
|
||||||
|
|
@ -2238,7 +2238,7 @@ void GameDigiMusic_OnChange(void)
|
||||||
#ifndef NO_MIDI
|
#ifndef NO_MIDI
|
||||||
void GameMIDIMusic_OnChange(void)
|
void GameMIDIMusic_OnChange(void)
|
||||||
{
|
{
|
||||||
if (M_CheckParm("-nomusic"))
|
if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio"))
|
||||||
return;
|
return;
|
||||||
else if (M_CheckParm("-nomidimusic"))
|
else if (M_CheckParm("-nomidimusic"))
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ consvar_t cv_grcoronasize = {"gr_coronasize", "1", CV_SAVE| CV_FLOAT, 0, NULL, 0
|
||||||
//static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NULL}};
|
//static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NULL}};
|
||||||
// console variables in development
|
// console variables in development
|
||||||
consvar_t cv_grmd2 = {"gr_md2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_grmd2 = {"gr_md2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
consvar_t cv_grfallbackplayermodel = {"gr_fallbackplayermodel", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const UINT8 gammatable[5][256] =
|
const UINT8 gammatable[5][256] =
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
#include "g_input.h" // PLAYER1INPUTDOWN
|
#include "g_input.h" // PLAYER1INPUTDOWN
|
||||||
#include "k_kart.h" // colortranslations
|
#include "k_kart.h" // colortranslations
|
||||||
#include "console.h" // cons_menuhighlight
|
#include "console.h" // cons_menuhighlight
|
||||||
|
#include "lua_hook.h" // IntermissionThinker hook
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
#include "hardware/hw_main.h"
|
#include "hardware/hw_main.h"
|
||||||
|
|
@ -618,6 +619,10 @@ void Y_Ticker(void)
|
||||||
if (paused || P_AutoPause())
|
if (paused || P_AutoPause())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef HAVE_BLUA
|
||||||
|
LUAh_IntermissionThinker();
|
||||||
|
#endif
|
||||||
|
|
||||||
intertic++;
|
intertic++;
|
||||||
|
|
||||||
// Team scramble code for team match and CTF.
|
// Team scramble code for team match and CTF.
|
||||||
|
|
@ -1548,11 +1553,11 @@ void Y_EndVote(void)
|
||||||
//
|
//
|
||||||
static void Y_UnloadVoteData(void)
|
static void Y_UnloadVoteData(void)
|
||||||
{
|
{
|
||||||
|
voteclient.loaded = false;
|
||||||
|
|
||||||
if (rendermode != render_soft)
|
if (rendermode != render_soft)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
voteclient.loaded = false;
|
|
||||||
|
|
||||||
UNLOAD(widebgpatch);
|
UNLOAD(widebgpatch);
|
||||||
UNLOAD(bgpatch);
|
UNLOAD(bgpatch);
|
||||||
UNLOAD(cursor);
|
UNLOAD(cursor);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue