mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-15 01:01:43 +00:00
Merge v1
This commit is contained in:
commit
201466b1c1
24 changed files with 204 additions and 113 deletions
|
@ -3,7 +3,7 @@ jobs:
|
|||
build:
|
||||
working_directory: /root/SRB2
|
||||
docker:
|
||||
- image: debian:jessie
|
||||
- image: debian:stretch
|
||||
environment:
|
||||
CC: ccache gcc -m32
|
||||
PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
|
@ -36,17 +36,20 @@ jobs:
|
|||
- v1-SRB2-APT
|
||||
- run:
|
||||
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:
|
||||
key: v1-SRB2-APT
|
||||
paths:
|
||||
- /var/cache/apt/archives
|
||||
- checkout
|
||||
- run:
|
||||
name: Compile without network support
|
||||
command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1
|
||||
name: Compile without network support and BLUA
|
||||
command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1
|
||||
- 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
|
||||
- restore_cache:
|
||||
keys:
|
||||
|
|
35
.travis.yml
35
.travis.yml
|
@ -254,17 +254,21 @@ matrix:
|
|||
# osx_image: xcode7.2
|
||||
# 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)
|
||||
# - 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
|
||||
osx_image: xcode7.3
|
||||
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
|
||||
################################
|
||||
- os: osx
|
||||
osx_image: xcode7.3
|
||||
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 env(DPL_TERMINATE_MAIN) != "1"
|
||||
|
@ -564,6 +568,16 @@ addons:
|
|||
- libgme-dev
|
||||
- zlib1g-dev
|
||||
- p7zip-full
|
||||
homebrew:
|
||||
taps:
|
||||
- mazmazz/srb2
|
||||
packages:
|
||||
- sdl2_mixer
|
||||
- game-music-emu
|
||||
- p7zip
|
||||
- cmake
|
||||
update: true
|
||||
|
||||
|
||||
|
||||
before_install:
|
||||
|
@ -596,18 +610,10 @@ install:
|
|||
# * `sdl2_mixer` requires options from the formula tap https://github.com/mazmazz/homebrew-srb2
|
||||
# * `brew postinstall` runs post-install scripts after building a bottle
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
brew update;
|
||||
brew tap mazmazz/srb2;
|
||||
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;
|
||||
if [[ "$__DPL_ACTIVE" == "1" ]]; then
|
||||
brew install --build-bottle sdl2 game-music-emu;
|
||||
brew install --build-bottle mazmazz/srb2/sdl2_mixer --with-flac --with-mpg123;
|
||||
brew postinstall sdl2 game-music-emu p7zip mazmazz/srb2/sdl2_mixer;
|
||||
brew install cmake||true;
|
||||
brew postinstall sdl2 game-music-emu mazmazz/srb2/sdl2_mixer;
|
||||
fi;
|
||||
fi
|
||||
- mkdir -p $HOME/srb2_cache
|
||||
|
@ -672,7 +678,6 @@ before_script:
|
|||
-DCPACK_PACKAGE_VENDOR="${PROGRAM_VENDOR}"
|
||||
-DSRB2_SDL2_EXE_NAME="${PROGRAM_FILENAME}"
|
||||
|
||||
|
||||
script:
|
||||
# Build our Makefile from Cmake!
|
||||
- if [[ "$__DPL_ACTIVE" == "1" ]]; then
|
||||
|
|
|
@ -50,6 +50,7 @@ static void COM_Exec_f(void);
|
|||
static void COM_Wait_f(void);
|
||||
static void COM_Help_f(void);
|
||||
static void COM_Toggle_f(void);
|
||||
static void COM_Add_f(void);
|
||||
|
||||
static void CV_EnforceExecVersion(void);
|
||||
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("help", COM_Help_f);
|
||||
COM_AddCommand("toggle", COM_Toggle_f);
|
||||
COM_AddCommand("add", COM_Add_f);
|
||||
RegisterNetXCmd(XD_NETVAR, Got_NetVar);
|
||||
}
|
||||
|
||||
|
@ -855,6 +857,27 @@ static void COM_Toggle_f(void)
|
|||
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
|
||||
// =========================================================================
|
||||
|
|
|
@ -168,7 +168,7 @@ ticcmd_t netcmds[BACKUPTICS][MAXPLAYERS];
|
|||
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}};
|
||||
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;
|
||||
}
|
||||
|
||||
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);
|
||||
netbuffer->u.playerinfo[i].name[MAXPLAYERNAME] = '\0';
|
||||
|
||||
//fetch IP address
|
||||
{
|
||||
const char *claddress;
|
||||
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:
|
||||
//No, don't do that, you fuckface.
|
||||
memset(netbuffer->u.playerinfo[i].address, 0, 4);
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
|
|
25
src/d_main.c
25
src/d_main.c
|
@ -1369,10 +1369,9 @@ void D_SRB2Main(void)
|
|||
midi_disabled = true;
|
||||
#endif
|
||||
}
|
||||
if (M_CheckParm("-nosound"))
|
||||
sound_disabled = true;
|
||||
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
|
||||
if (M_CheckParm("-noaudio")) // combines -nosound and -nomusic
|
||||
{
|
||||
sound_disabled = true;
|
||||
digital_disabled = true;
|
||||
#ifndef NO_MIDI
|
||||
midi_disabled = true;
|
||||
|
@ -1380,12 +1379,24 @@ void D_SRB2Main(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (M_CheckParm("-nosound"))
|
||||
sound_disabled = true;
|
||||
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
|
||||
{
|
||||
digital_disabled = true;
|
||||
#ifndef NO_MIDI
|
||||
if (M_CheckParm("-nomidimusic"))
|
||||
midi_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
|
||||
midi_disabled = true;
|
||||
#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
|
||||
#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}};
|
||||
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_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)
|
||||
{
|
||||
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_WEAPONPREF, Got_WeaponPref);
|
||||
RegisterNetXCmd(XD_MAP, Got_Mapcmd);
|
||||
|
@ -5369,27 +5380,11 @@ static void Command_Archivetest_f(void)
|
|||
|
||||
/** 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
|
||||
* \author Graue <graue@oceanbase.org>
|
||||
*/
|
||||
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!
|
||||
if (!(netgame || multiplayer))
|
||||
return;
|
||||
|
@ -5398,7 +5393,7 @@ static void ForceSkin_OnChange(void)
|
|||
CONS_Printf("The server has lifted the forced skin restrictions.\n");
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -644,20 +644,34 @@ void F_CreditDrawer(void)
|
|||
if (((y>>FRACBITS) * vid.dupy) > vid.height)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// draw song credits
|
||||
if (cv_songcredits.value)
|
||||
HU_DrawSongCredits();
|
||||
void F_CreditTicker(void)
|
||||
{
|
||||
// "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)
|
||||
{
|
||||
timetonext = 5*TICRATE+1;
|
||||
finalecount = 5*TICRATE;
|
||||
}
|
||||
}
|
||||
|
||||
void F_CreditTicker(void)
|
||||
{
|
||||
if (timetonext)
|
||||
timetonext--;
|
||||
else
|
||||
|
|
|
@ -1239,6 +1239,8 @@ void G_ClearAllControlKeys(void)
|
|||
{
|
||||
G_ClearControlKeys(gamecontrol, 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)
|
||||
{
|
||||
// 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);
|
||||
else
|
||||
HWR_DrawMD2(spr);
|
||||
|
|
|
@ -81,6 +81,7 @@ extern consvar_t cv_grcoronas;
|
|||
extern consvar_t cv_grcoronasize;
|
||||
#endif
|
||||
extern consvar_t cv_grmd2;
|
||||
extern consvar_t cv_grfallbackplayermodel;
|
||||
extern consvar_t cv_grfog;
|
||||
extern consvar_t cv_grfogcolor;
|
||||
extern consvar_t cv_grfogdensity;
|
||||
|
|
|
@ -219,6 +219,7 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] =
|
|||
SKINCOLOR_SUNSET,10, // SKINCOLOR_MOONSLAM
|
||||
SKINCOLOR_MAUVE,10, // SKINCOLOR_ULTRAVIOLET
|
||||
SKINCOLOR_DAWN,6, // SKINCOLOR_DUSK
|
||||
SKINCOLOR_POPCORN,12, // SKINCOLOR_BUBBLEGUM
|
||||
SKINCOLOR_EMERALD,8, // SKINCOLOR_PURPLE
|
||||
SKINCOLOR_PASTEL,11, // SKINCOLOR_FUCHSIA
|
||||
SKINCOLOR_MAROON,8, // SKINCOLOR_TOXIC
|
||||
|
@ -3505,7 +3506,6 @@ void K_DoSneaker(player_t *player, INT32 type)
|
|||
{
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
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])
|
||||
|| (!player->cmd.driftturn)
|
||||
|| (!player->kartstuff[k_aizdriftstrat])
|
||||
|| (player->cmd.driftturn > 0) != (player->kartstuff[k_aizdriftstrat] > 0))
|
||||
{
|
||||
if (!player->kartstuff[k_drift])
|
||||
|
|
|
@ -2759,7 +2759,7 @@ static luaL_Reg lib[] = {
|
|||
// k_kart
|
||||
{"K_PlayAttackTaunt", lib_kAttackSound},
|
||||
{"K_PlayBoostTaunt", lib_kBoostSound},
|
||||
{"K_PlayPowerGloatSund", lib_kGloatSound},
|
||||
{"K_PlayPowerGloatSound", lib_kGloatSound},
|
||||
{"K_PlayOvertakeSound", lib_kOvertakeSound},
|
||||
{"K_PlayLossSound", lib_kLossSound},
|
||||
{"K_PlayHitEmSound", lib_kHitEmSound},
|
||||
|
|
|
@ -51,6 +51,7 @@ enum hook {
|
|||
hook_PlayerExplode, //SRB2KART
|
||||
hook_PlayerSquish, //SRB2KART
|
||||
hook_PlayerCmd, //SRB2KART
|
||||
hook_IntermissionThinker, //SRB2KART
|
||||
|
||||
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.
|
||||
|
||||
void LUAh_IntermissionThinker(void); // Hook for Y_Ticker
|
||||
|
||||
#endif
|
||||
|
|
|
@ -62,6 +62,7 @@ const char *const hookNames[hook_MAX+1] = {
|
|||
"PlayerExplode",
|
||||
"PlayerSquish",
|
||||
"PlayerCmd",
|
||||
"IntermissionThinker",
|
||||
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
|
||||
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
|
||||
{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
|
||||
};
|
||||
|
||||
|
@ -8415,7 +8416,10 @@ static void M_ConnectMenu(INT32 choice)
|
|||
|
||||
// first page of servers
|
||||
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;
|
||||
M_Refresh(0);
|
||||
}
|
||||
|
@ -8488,7 +8492,15 @@ static void M_ChooseRoom(INT32 choice)
|
|||
}
|
||||
|
||||
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)
|
||||
M_Refresh(0);
|
||||
}
|
||||
|
|
|
@ -8434,6 +8434,9 @@ void A_SPBChase(mobj_t *actor)
|
|||
wspeed = (3*defspeed)/2;
|
||||
if (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);
|
||||
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 (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_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_SpinPlayer(thing->player, tmthing, 0, thing, false);
|
||||
|
|
|
@ -1562,6 +1562,7 @@ void R_RegisterEngineStuff(void)
|
|||
CV_RegisterVar(&cv_grcoronasize);
|
||||
#endif
|
||||
CV_RegisterVar(&cv_grmd2);
|
||||
CV_RegisterVar(&cv_grfallbackplayermodel);
|
||||
#endif
|
||||
|
||||
#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;
|
||||
rightheight -= viewz;
|
||||
|
||||
#define OVERFLOWTEST(height, scale) \
|
||||
overflow_test = (INT64)centeryfrac - (((INT64)height*scale)>>FRACBITS); \
|
||||
if (overflow_test < 0) overflow_test = -overflow_test; \
|
||||
if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) continue;
|
||||
#define CLAMPMAX INT32_MAX
|
||||
#define CLAMPMIN (-INT32_MAX) // This is not INT32_MIN on purpose! INT32_MIN makes the drawers freak out.
|
||||
// Monster Iestyn (25/03/18): do not skip these lights if they fail overflow test, just clamp them instead so they behave.
|
||||
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)
|
||||
OVERFLOWTEST(rightheight, ds->scale2)
|
||||
|
||||
rlight->height = (centeryfrac) - FixedMul(leftheight, ds->scale1);
|
||||
rlight->heightstep = (centeryfrac) - FixedMul(rightheight, ds->scale2);
|
||||
overflow_test = (INT64)centeryfrac - (((INT64)rightheight*ds->scale2)>>FRACBITS);
|
||||
if (overflow_test > (INT64)CLAMPMAX) rlight->heightstep = CLAMPMAX;
|
||||
else if (overflow_test > (INT64)CLAMPMIN) rlight->heightstep = (fixed_t)overflow_test;
|
||||
else rlight->heightstep = CLAMPMIN;
|
||||
rlight->heightstep = (rlight->heightstep-rlight->height)/(range);
|
||||
#else
|
||||
if (light->height < *pfloor->bottomheight)
|
||||
|
@ -901,12 +903,16 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
leftheight -= viewz;
|
||||
rightheight -= viewz;
|
||||
|
||||
OVERFLOWTEST(leftheight, ds->scale1)
|
||||
OVERFLOWTEST(rightheight, ds->scale2)
|
||||
#undef OVERFLOWTEST
|
||||
// Monster Iestyn (25/03/18): do not skip these lights if they fail overflow test, just clamp them instead so they behave.
|
||||
overflow_test = (INT64)centeryfrac - (((INT64)leftheight*ds->scale1)>>FRACBITS);
|
||||
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);
|
||||
rlight->botheightstep = (centeryfrac) - FixedMul(rightheight, ds->scale2);
|
||||
overflow_test = (INT64)centeryfrac - (((INT64)rightheight*ds->scale2)>>FRACBITS);
|
||||
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);
|
||||
#else
|
||||
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
|
||||
|
||||
#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
|
||||
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);
|
||||
#endif
|
||||
|
||||
CV_PossibleValue_t Forceskin_cons_t[MAXSKINS+2];
|
||||
|
||||
static void R_InitSkins(void);
|
||||
|
||||
#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))
|
||||
{
|
||||
for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext)
|
||||
|
@ -1819,13 +1821,6 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel)
|
|||
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;
|
||||
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.
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
|
@ -2981,6 +2980,10 @@ next_token:
|
|||
skin_cons_t[numskins].strvalue = skin->name;
|
||||
#endif
|
||||
|
||||
// Update the forceskin possiblevalues
|
||||
Forceskin_cons_t[numskins+1].value = numskins;
|
||||
Forceskin_cons_t[numskins+1].strvalue = skins[numskins].name;
|
||||
|
||||
// add face graphics
|
||||
ST_LoadFaceGraphics(skin->facerank, skin->facewant, skin->facemmap, numskins);
|
||||
|
||||
|
|
|
@ -97,6 +97,8 @@ typedef struct
|
|||
sfxenum_t soundsid[NUMSKINSOUNDS]; // sound # in S_sfx table
|
||||
} skin_t;
|
||||
|
||||
extern CV_PossibleValue_t Forceskin_cons_t[];
|
||||
|
||||
// -----------
|
||||
// NOT SKINS STUFF !
|
||||
// -----------
|
||||
|
|
|
@ -2181,7 +2181,7 @@ static void Command_RestartAudio_f(void)
|
|||
|
||||
void GameSounds_OnChange(void)
|
||||
{
|
||||
if (M_CheckParm("-nosound"))
|
||||
if (M_CheckParm("-nosound") || M_CheckParm("-noaudio"))
|
||||
return;
|
||||
|
||||
if (sound_disabled)
|
||||
|
@ -2195,7 +2195,7 @@ void GameSounds_OnChange(void)
|
|||
|
||||
void GameDigiMusic_OnChange(void)
|
||||
{
|
||||
if (M_CheckParm("-nomusic"))
|
||||
if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio"))
|
||||
return;
|
||||
else if (M_CheckParm("-nodigmusic"))
|
||||
return;
|
||||
|
@ -2238,7 +2238,7 @@ void GameDigiMusic_OnChange(void)
|
|||
#ifndef NO_MIDI
|
||||
void GameMIDIMusic_OnChange(void)
|
||||
{
|
||||
if (M_CheckParm("-nomusic"))
|
||||
if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio"))
|
||||
return;
|
||||
else if (M_CheckParm("-nomidimusic"))
|
||||
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}};
|
||||
// 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_grfallbackplayermodel = {"gr_fallbackplayermodel", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
|
||||
const UINT8 gammatable[5][256] =
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "g_input.h" // PLAYER1INPUTDOWN
|
||||
#include "k_kart.h" // colortranslations
|
||||
#include "console.h" // cons_menuhighlight
|
||||
#include "lua_hook.h" // IntermissionThinker hook
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_main.h"
|
||||
|
@ -618,6 +619,10 @@ void Y_Ticker(void)
|
|||
if (paused || P_AutoPause())
|
||||
return;
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
LUAh_IntermissionThinker();
|
||||
#endif
|
||||
|
||||
intertic++;
|
||||
|
||||
// Team scramble code for team match and CTF.
|
||||
|
@ -1548,11 +1553,11 @@ void Y_EndVote(void)
|
|||
//
|
||||
static void Y_UnloadVoteData(void)
|
||||
{
|
||||
voteclient.loaded = false;
|
||||
|
||||
if (rendermode != render_soft)
|
||||
return;
|
||||
|
||||
voteclient.loaded = false;
|
||||
|
||||
UNLOAD(widebgpatch);
|
||||
UNLOAD(bgpatch);
|
||||
UNLOAD(cursor);
|
||||
|
|
Loading…
Reference in a new issue