mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 13:10:55 +00:00
Merge branch 'next' into the-colors-feel-so-right
This commit is contained in:
commit
0299f21dc7
21 changed files with 219 additions and 116 deletions
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
|
|||
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
|
||||
# Version change is fine.
|
||||
project(SRB2
|
||||
VERSION 2.2.0
|
||||
VERSION 2.2.1
|
||||
LANGUAGES C)
|
||||
|
||||
if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version: 2.2.0.{branch}-{build}
|
||||
version: 2.2.1.{branch}-{build}
|
||||
os: MinGW
|
||||
|
||||
environment:
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
#else
|
||||
|
||||
/* Manually defined asset hashes for non-CMake builds
|
||||
* Last updated 2019 / 12 / 06 - v2.2.0 - main assets
|
||||
* Last updated 2020 / 02 / 15 - v2.2.1 - main assets
|
||||
* Last updated 20?? / ?? / ?? - v2.2.? - patch.pk3
|
||||
*/
|
||||
#define ASSET_HASH_SRB2_PK3 "51419a33b4982d840c6772c159ba7c0a"
|
||||
#define ASSET_HASH_ZONES_PK3 "df74843919fd51af26a0baa8e21e4c19"
|
||||
#define ASSET_HASH_PLAYER_DTA "56a247e074dd0dc794b6617efef1e918"
|
||||
#define ASSET_HASH_SRB2_PK3 "0277c9416756627004e83cbb5b2e3e28"
|
||||
#define ASSET_HASH_ZONES_PK3 "f7e88afb6af7996a834c7d663144bead"
|
||||
#define ASSET_HASH_PLAYER_DTA "ad49e07b17cc662f1ad70c454910b4ae"
|
||||
#ifdef USE_PATCH_DTA
|
||||
#define ASSET_HASH_PATCH_PK3 "there is no patch.pk3, only zuul"
|
||||
#endif
|
||||
|
|
|
@ -613,6 +613,15 @@ void CON_Ticker(void)
|
|||
con_tick++;
|
||||
con_tick &= 7;
|
||||
|
||||
// if the menu is open then close the console.
|
||||
if (menuactive && con_destlines)
|
||||
{
|
||||
consoletoggle = false;
|
||||
con_destlines = 0;
|
||||
CON_ClearHUD();
|
||||
I_UpdateMouseGrab();
|
||||
}
|
||||
|
||||
// console key was pushed
|
||||
if (consoletoggle)
|
||||
{
|
||||
|
@ -784,7 +793,7 @@ boolean CON_Responder(event_t *ev)
|
|||
// check other keys only if console prompt is active
|
||||
if (!consoleready && key < NUMINPUTS) // metzgermeister: boundary check!!
|
||||
{
|
||||
if (! menuactive && bindtable[key])
|
||||
if (bindtable[key])
|
||||
{
|
||||
COM_BufAddText(bindtable[key]);
|
||||
COM_BufAddText("\n");
|
||||
|
|
|
@ -404,8 +404,8 @@ static void ExtraDataTicker(void)
|
|||
}
|
||||
|
||||
// If you are a client, you can safely forget the net commands for this tic
|
||||
// If you are the server, you need to remember them until every client has been aknowledged,
|
||||
// because if you need to resend a PT_SERVERTICS packet, you need to put the commands in it
|
||||
// If you are the server, you need to remember them until every client has been acknowledged,
|
||||
// because if you need to resend a PT_SERVERTICS packet, you will need to put the commands in it
|
||||
if (client)
|
||||
D_FreeTextcmd(gametic);
|
||||
}
|
||||
|
@ -4510,7 +4510,7 @@ static void CL_SendClientCmd(void)
|
|||
packetsize = sizeof (clientcmd_pak) - sizeof (ticcmd_t) - sizeof (INT16);
|
||||
HSendPacket(servernode, false, 0, packetsize);
|
||||
}
|
||||
else if (gamestate != GS_NULL && addedtogame)
|
||||
else if (gamestate != GS_NULL && (addedtogame || dedicated))
|
||||
{
|
||||
G_MoveTiccmd(&netbuffer->u.clientpak.cmd, &localcmds, 1);
|
||||
netbuffer->u.clientpak.consistancy = SHORT(consistancy[gametic%BACKUPTICS]);
|
||||
|
|
17
src/d_main.c
17
src/d_main.c
|
@ -188,14 +188,14 @@ void D_ProcessEvents(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
// console input
|
||||
if (CON_Responder(ev))
|
||||
continue; // ate the event
|
||||
|
||||
// Menu input
|
||||
if (M_Responder(ev))
|
||||
continue; // menu ate the event
|
||||
|
||||
// console input
|
||||
if (CON_Responder(ev))
|
||||
continue; // ate the event
|
||||
|
||||
G_Responder(ev);
|
||||
}
|
||||
}
|
||||
|
@ -502,12 +502,13 @@ static void D_Display(void)
|
|||
// vid size change is now finished if it was on...
|
||||
vid.recalc = 0;
|
||||
|
||||
M_Drawer(); // menu is drawn even on top of everything
|
||||
// focus lost moved to M_Drawer
|
||||
|
||||
// FIXME: draw either console or menu, not the two
|
||||
if (gamestate != GS_TIMEATTACK)
|
||||
CON_Drawer();
|
||||
|
||||
M_Drawer(); // menu is drawn even on top of everything
|
||||
// focus lost moved to M_Drawer
|
||||
|
||||
//
|
||||
// wipe update
|
||||
//
|
||||
|
@ -1213,7 +1214,7 @@ void D_SRB2Main(void)
|
|||
#endif
|
||||
D_CleanFile();
|
||||
|
||||
#ifndef DEVELOP // md5s last updated 06/12/19 (ddmmyy)
|
||||
#ifndef DEVELOP // md5s last updated 16/02/20 (ddmmyy)
|
||||
|
||||
// Check MD5s of autoloaded files
|
||||
W_VerifyFileMD5(0, ASSET_HASH_SRB2_PK3); // srb2.pk3
|
||||
|
|
|
@ -1293,9 +1293,6 @@ static void readgametype(MYFILE *f, char *gtname)
|
|||
UINT32 wordgt = 0;
|
||||
for (j = 0; GAMETYPERULE_LIST[j]; j++)
|
||||
if (fastcmp(word, GAMETYPERULE_LIST[j])) {
|
||||
if (!j) // GTR_CAMPAIGN
|
||||
wordgt |= 1;
|
||||
else
|
||||
wordgt |= (1<<j);
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
newgtrules |= wordgt;
|
||||
|
@ -4945,19 +4942,19 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_PLAY_SUPER_TRANS3",
|
||||
"S_PLAY_SUPER_TRANS4",
|
||||
"S_PLAY_SUPER_TRANS5",
|
||||
"S_PLAY_SUPER_TRANS6", // This has special significance in the code. If you add more frames, search for it and make the appropriate changes.
|
||||
"S_PLAY_SUPER_TRANS6",
|
||||
|
||||
// technically the player goes here but it's an infinite tic state
|
||||
"S_OBJPLACE_DUMMY",
|
||||
|
||||
// 1-Up Box Sprites (uses player sprite)
|
||||
// 1-Up Box Sprites overlay (uses player sprite)
|
||||
"S_PLAY_BOX1",
|
||||
"S_PLAY_BOX2",
|
||||
"S_PLAY_ICON1",
|
||||
"S_PLAY_ICON2",
|
||||
"S_PLAY_ICON3",
|
||||
|
||||
// Level end sign (uses player sprite)
|
||||
// Level end sign overlay (uses player sprite)
|
||||
"S_PLAY_SIGN",
|
||||
|
||||
// NiGHTS character (uses player sprite)
|
||||
|
@ -5205,7 +5202,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_ROBOHOOD_JUMP2",
|
||||
"S_ROBOHOOD_JUMP3",
|
||||
|
||||
// CastleBot FaceStabber
|
||||
// Castlebot Facestabber
|
||||
"S_FACESTABBER_STND1",
|
||||
"S_FACESTABBER_STND2",
|
||||
"S_FACESTABBER_STND3",
|
||||
|
@ -5425,6 +5422,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_EGGMOBILE_FLEE2",
|
||||
"S_EGGMOBILE_BALL",
|
||||
"S_EGGMOBILE_TARGET",
|
||||
|
||||
"S_BOSSEGLZ1",
|
||||
"S_BOSSEGLZ2",
|
||||
|
||||
|
@ -5477,7 +5475,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_EGGMOBILE3_FLEE1",
|
||||
"S_EGGMOBILE3_FLEE2",
|
||||
|
||||
// Boss 3 pinch
|
||||
// Boss 3 Pinch
|
||||
"S_FAKEMOBILE_INIT",
|
||||
"S_FAKEMOBILE",
|
||||
"S_FAKEMOBILE_ATK1",
|
||||
|
@ -5493,7 +5491,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_BOSSSEBH2",
|
||||
|
||||
// Boss 3 Shockwave
|
||||
|
||||
"S_SHOCKWAVE1",
|
||||
"S_SHOCKWAVE2",
|
||||
|
||||
|
@ -5530,9 +5527,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_JETFLAME",
|
||||
|
||||
// Boss 4 Spectator Eggrobo
|
||||
"S_EGGROBO1_IDLE",
|
||||
"S_EGGROBO1_STND",
|
||||
"S_EGGROBO1_BSLAP1",
|
||||
"S_EGGROBO2_BSLAP2",
|
||||
"S_EGGROBO1_BSLAP2",
|
||||
"S_EGGROBO1_PISSED",
|
||||
|
||||
// Boss 4 Spectator Eggrobo jet flame
|
||||
|
@ -5776,7 +5773,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_CYBRAKDEMON_NAPALM_ATTACK1",
|
||||
"S_CYBRAKDEMON_NAPALM_ATTACK2",
|
||||
"S_CYBRAKDEMON_NAPALM_ATTACK3",
|
||||
"S_CYBRAKDEMON_FINISH_ATTACK", // If just attacked, remove MF2_FRET w/out going back to spawnstate
|
||||
"S_CYBRAKDEMON_FINISH_ATTACK1", // If just attacked, remove MF2_FRET w/out going back to spawnstate
|
||||
"S_CYBRAKDEMON_FINISH_ATTACK2", // Force a delay between attacks so you don't get bombarded with them back-to-back
|
||||
"S_CYBRAKDEMON_PAIN1",
|
||||
"S_CYBRAKDEMON_PAIN2",
|
||||
|
@ -6470,7 +6467,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_LITTLETUMBLEWEED_ROLL7",
|
||||
"S_LITTLETUMBLEWEED_ROLL8",
|
||||
|
||||
// Cacti Sprites
|
||||
// Cacti
|
||||
"S_CACTI1",
|
||||
"S_CACTI2",
|
||||
"S_CACTI3",
|
||||
|
@ -6485,7 +6482,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_CACTITINYSEG",
|
||||
"S_CACTISMALLSEG",
|
||||
|
||||
// Warning signs sprites
|
||||
// Warning signs
|
||||
"S_ARIDSIGN_CAUTION",
|
||||
"S_ARIDSIGN_CACTI",
|
||||
"S_ARIDSIGN_SHARPTURN",
|
||||
|
@ -6502,6 +6499,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_TNTBARREL_EXPL4",
|
||||
"S_TNTBARREL_EXPL5",
|
||||
"S_TNTBARREL_EXPL6",
|
||||
"S_TNTBARREL_EXPL7",
|
||||
"S_TNTBARREL_FLYING",
|
||||
|
||||
// TNT proximity shell
|
||||
|
@ -7348,6 +7346,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_BHORIZ7",
|
||||
"S_BHORIZ8",
|
||||
|
||||
// Booster
|
||||
"S_BOOSTERSOUND",
|
||||
"S_YELLOWBOOSTERROLLER",
|
||||
"S_YELLOWBOOSTERSEG_LEFT",
|
||||
|
@ -7378,7 +7377,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_SPLISH8",
|
||||
"S_SPLISH9",
|
||||
|
||||
// Lava splish
|
||||
// Lava Splish
|
||||
"S_LAVASPLISH",
|
||||
|
||||
// added water splash
|
||||
|
@ -7974,6 +7973,8 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_ROCKCRUMBLEN",
|
||||
"S_ROCKCRUMBLEO",
|
||||
"S_ROCKCRUMBLEP",
|
||||
|
||||
// Level debris
|
||||
"S_GFZDEBRIS",
|
||||
"S_BRICKDEBRIS",
|
||||
"S_WOODDEBRIS",
|
||||
|
@ -7993,7 +7994,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_THOK", // Thok! mobj
|
||||
"MT_PLAYER",
|
||||
"MT_TAILSOVERLAY", // c:
|
||||
"MT_METALJETFUME", // [:
|
||||
"MT_METALJETFUME",
|
||||
|
||||
// Enemies
|
||||
"MT_BLUECRAWLA", // Crawla (Blue)
|
||||
|
@ -8110,7 +8111,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_CYBRAKDEMON_NAPALM_FLAMES",
|
||||
"MT_CYBRAKDEMON_VILE_EXPLOSION",
|
||||
|
||||
// Metal Sonic
|
||||
// Metal Sonic (Boss 9)
|
||||
"MT_METALSONIC_RACE",
|
||||
"MT_METALSONIC_BATTLE",
|
||||
"MT_MSSHIELD_FRONT",
|
||||
|
@ -8124,7 +8125,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_BOMBSPHERE",
|
||||
"MT_REDTEAMRING", //Rings collectable by red team.
|
||||
"MT_BLUETEAMRING", //Rings collectable by blue team.
|
||||
"MT_TOKEN", // Special Stage Token
|
||||
"MT_TOKEN", // Special Stage token for special stage
|
||||
"MT_REDFLAG", // Red CTF Flag
|
||||
"MT_BLUEFLAG", // Blue CTF Flag
|
||||
"MT_EMBLEM",
|
||||
|
@ -8350,22 +8351,22 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
// Arid Canyon Scenery
|
||||
"MT_BIGTUMBLEWEED",
|
||||
"MT_LITTLETUMBLEWEED",
|
||||
"MT_CACTI1",
|
||||
"MT_CACTI2",
|
||||
"MT_CACTI3",
|
||||
"MT_CACTI4",
|
||||
"MT_CACTI5",
|
||||
"MT_CACTI6",
|
||||
"MT_CACTI7",
|
||||
"MT_CACTI8",
|
||||
"MT_CACTI9",
|
||||
"MT_CACTI10",
|
||||
"MT_CACTI11",
|
||||
"MT_CACTITINYSEG",
|
||||
"MT_CACTISMALLSEG",
|
||||
"MT_ARIDSIGN_CAUTION",
|
||||
"MT_ARIDSIGN_CACTI",
|
||||
"MT_ARIDSIGN_SHARPTURN",
|
||||
"MT_CACTI1", // Tiny Red Flower Cactus
|
||||
"MT_CACTI2", // Small Red Flower Cactus
|
||||
"MT_CACTI3", // Tiny Blue Flower Cactus
|
||||
"MT_CACTI4", // Small Blue Flower Cactus
|
||||
"MT_CACTI5", // Prickly Pear
|
||||
"MT_CACTI6", // Barrel Cactus
|
||||
"MT_CACTI7", // Tall Barrel Cactus
|
||||
"MT_CACTI8", // Armed Cactus
|
||||
"MT_CACTI9", // Ball Cactus
|
||||
"MT_CACTI10", // Tiny Cactus
|
||||
"MT_CACTI11", // Small Cactus
|
||||
"MT_CACTITINYSEG", // Tiny Cactus Segment
|
||||
"MT_CACTISMALLSEG", // Small Cactus Segment
|
||||
"MT_ARIDSIGN_CAUTION", // Caution Sign
|
||||
"MT_ARIDSIGN_CACTI", // Cacti Sign
|
||||
"MT_ARIDSIGN_SHARPTURN", // Sharp Turn Sign
|
||||
"MT_OILLAMP",
|
||||
"MT_TNTBARREL",
|
||||
"MT_PROXIMITYTNT",
|
||||
|
@ -8420,7 +8421,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_GLAREGOYLEUP",
|
||||
"MT_GLAREGOYLEDOWN",
|
||||
"MT_GLAREGOYLELONG",
|
||||
"MT_TARGET",
|
||||
"MT_TARGET", // AKA Red Crystal
|
||||
"MT_GREENFLAME",
|
||||
"MT_BLUEGARGOYLE",
|
||||
|
||||
|
@ -8471,7 +8472,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_HHZSTALAGMITE_TALL",
|
||||
"MT_HHZSTALAGMITE_SHORT",
|
||||
|
||||
// Botanic Serenity
|
||||
// Botanic Serenity scenery
|
||||
"MT_BSZTALLFLOWER_RED",
|
||||
"MT_BSZTALLFLOWER_PURPLE",
|
||||
"MT_BSZTALLFLOWER_BLUE",
|
||||
|
@ -8751,6 +8752,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_ROCKCRUMBLE14",
|
||||
"MT_ROCKCRUMBLE15",
|
||||
"MT_ROCKCRUMBLE16",
|
||||
|
||||
// Level debris
|
||||
"MT_GFZDEBRIS",
|
||||
"MT_BRICKDEBRIS",
|
||||
"MT_WOODDEBRIS",
|
||||
|
|
|
@ -143,9 +143,9 @@ extern char logfilename[1024];
|
|||
// we use comprevision and compbranch instead.
|
||||
#else
|
||||
#define VERSION 202 // Game version
|
||||
#define SUBVERSION 0 // more precise version number
|
||||
#define VERSIONSTRING "v2.2.0"
|
||||
#define VERSIONSTRINGW L"v2.2.0"
|
||||
#define SUBVERSION 1 // more precise version number
|
||||
#define VERSIONSTRING "v2.2.1"
|
||||
#define VERSIONSTRINGW L"v2.2.1"
|
||||
// Hey! If you change this, add 1 to the MODVERSION below!
|
||||
// Otherwise we can't force updates!
|
||||
#endif
|
||||
|
@ -210,7 +210,7 @@ extern char logfilename[1024];
|
|||
// it's only for detection of the version the player is using so the MS can alert them of an update.
|
||||
// Only set it higher, not lower, obviously.
|
||||
// Note that we use this to help keep internal testing in check; this is why v2.2.0 is not version "1".
|
||||
#define MODVERSION 40
|
||||
#define MODVERSION 41
|
||||
|
||||
// To version config.cfg, MAJOREXECVERSION is set equal to MODVERSION automatically.
|
||||
// Increment MINOREXECVERSION whenever a config change is needed that does not correspond
|
||||
|
|
|
@ -1261,7 +1261,7 @@ static const char *credits[] = {
|
|||
"Cody \"SRB2 Playah\" Koester",
|
||||
"Skye \"OmegaVelocity\" Meredith",
|
||||
"Stephen \"HEDGESMFG\" Moellering",
|
||||
"Nick \"ST218\" Molina",
|
||||
"Rosalie \"ST218\" Molina",
|
||||
"Samuel \"Prime 2.0\" Peters",
|
||||
"Colin \"Sonict\" Pfaff",
|
||||
"Bill \"Tets\" Reed",
|
||||
|
|
|
@ -3739,7 +3739,10 @@ static void G_DoCompleted(void)
|
|||
}
|
||||
|
||||
if (i == 7)
|
||||
{
|
||||
gottoken = false;
|
||||
token = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (spec && !gottoken)
|
||||
|
|
|
@ -762,7 +762,7 @@ state_t states[NUMSTATES] =
|
|||
{SPR_PLAY, SPR2_LIFE, 20, {NULL}, 0, 4, S_NULL}, // S_PLAY_ICON3
|
||||
|
||||
// Level end sign (uses player sprite)
|
||||
{SPR_PLAY, SPR2_SIGN|FF_PAPERSPRITE, -1, {NULL}, 0, 29, S_PLAY_SIGN}, // S_PLAY_SIGN
|
||||
{SPR_PLAY, SPR2_SIGN|FF_PAPERSPRITE, 2, {NULL}, 0, 29, S_PLAY_SIGN}, // S_PLAY_SIGN
|
||||
|
||||
// NiGHTS Player, transforming
|
||||
{SPR_PLAY, SPR2_TRNS|FF_ANIMATE, 7, {NULL}, 0, 4, S_PLAY_NIGHTS_TRANS2}, // S_PLAY_NIGHTS_TRANS1
|
||||
|
@ -2395,7 +2395,7 @@ state_t states[NUMSTATES] =
|
|||
|
||||
// Minecart
|
||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_MINECART_IDLE}, // S_MINECART_IDLE
|
||||
{SPR_NULL, 0, 0, {A_KillSegments}, 0, 0, S_TNTBARREL_EXPL3}, // S_MINECART_DTH1
|
||||
{SPR_NULL, 0, 0, {A_KillSegments}, 0, 0, S_TNTBARREL_EXPL4}, // S_MINECART_DTH1
|
||||
{SPR_MCRT, 8|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_MINECARTEND
|
||||
{SPR_MCRT, 0|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_MINECARTSEG_FRONT
|
||||
{SPR_MCRT, 1|FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_MINECARTSEG_BACK
|
||||
|
|
|
@ -268,10 +268,14 @@ static int patch_get(lua_State *L)
|
|||
#endif
|
||||
enum patch field = luaL_checkoption(L, 2, NULL, patch_opt);
|
||||
|
||||
// patches are CURRENTLY always valid, expected to be cached with PU_STATIC
|
||||
// this may change in the future, so patch.valid still exists
|
||||
if (!patch)
|
||||
// patches are invalidated when switching renderers
|
||||
if (!patch) {
|
||||
if (field == patch_valid) {
|
||||
lua_pushboolean(L, 0);
|
||||
return 1;
|
||||
}
|
||||
return LUA_ErrInvalid(L, "patch_t");
|
||||
}
|
||||
|
||||
switch (field)
|
||||
{
|
||||
|
@ -1214,7 +1218,7 @@ void LUAh_GameHUD(player_t *stplayr)
|
|||
|
||||
lua_getfield(gL, LUA_REGISTRYINDEX, "HUD");
|
||||
I_Assert(lua_istable(gL, -1));
|
||||
lua_rawgeti(gL, -1, 2); // HUD[2] = rendering funcs
|
||||
lua_rawgeti(gL, -1, 2+hudhook_game); // HUD[2] = rendering funcs
|
||||
I_Assert(lua_istable(gL, -1));
|
||||
|
||||
lua_rawgeti(gL, -2, 1); // HUD[1] = lib_draw
|
||||
|
@ -1248,7 +1252,7 @@ void LUAh_ScoresHUD(void)
|
|||
|
||||
lua_getfield(gL, LUA_REGISTRYINDEX, "HUD");
|
||||
I_Assert(lua_istable(gL, -1));
|
||||
lua_rawgeti(gL, -1, 3); // HUD[3] = rendering funcs
|
||||
lua_rawgeti(gL, -1, 2+hudhook_scores); // HUD[3] = rendering funcs
|
||||
I_Assert(lua_istable(gL, -1));
|
||||
|
||||
lua_rawgeti(gL, -2, 1); // HUD[1] = lib_draw
|
||||
|
@ -1273,7 +1277,7 @@ void LUAh_TitleHUD(void)
|
|||
|
||||
lua_getfield(gL, LUA_REGISTRYINDEX, "HUD");
|
||||
I_Assert(lua_istable(gL, -1));
|
||||
lua_rawgeti(gL, -1, 4); // HUD[4] = rendering funcs
|
||||
lua_rawgeti(gL, -1, 2+hudhook_title); // HUD[5] = rendering funcs
|
||||
I_Assert(lua_istable(gL, -1));
|
||||
|
||||
lua_rawgeti(gL, -2, 1); // HUD[1] = lib_draw
|
||||
|
@ -1298,7 +1302,7 @@ void LUAh_TitleCardHUD(player_t *stplayr)
|
|||
|
||||
lua_getfield(gL, LUA_REGISTRYINDEX, "HUD");
|
||||
I_Assert(lua_istable(gL, -1));
|
||||
lua_rawgeti(gL, -1, 5); // HUD[5] = rendering funcs
|
||||
lua_rawgeti(gL, -1, 2+hudhook_titlecard); // HUD[6] = rendering funcs
|
||||
I_Assert(lua_istable(gL, -1));
|
||||
|
||||
lua_rawgeti(gL, -2, 1); // HUD[1] = lib_draw
|
||||
|
@ -1332,7 +1336,7 @@ void LUAh_IntermissionHUD(void)
|
|||
|
||||
lua_getfield(gL, LUA_REGISTRYINDEX, "HUD");
|
||||
I_Assert(lua_istable(gL, -1));
|
||||
lua_rawgeti(gL, -1, 4); // HUD[4] = rendering funcs
|
||||
lua_rawgeti(gL, -1, 2+hudhook_intermission); // HUD[4] = rendering funcs
|
||||
I_Assert(lua_istable(gL, -1));
|
||||
|
||||
lua_rawgeti(gL, -2, 1); // HUD[1] = lib_draw
|
||||
|
|
|
@ -10854,7 +10854,6 @@ static void M_HandleConnectIP(INT32 choice)
|
|||
default: // otherwise do nothing.
|
||||
break;
|
||||
}
|
||||
break; // don't check for typed keys
|
||||
}
|
||||
|
||||
if (l >= 28-1)
|
||||
|
|
|
@ -5198,8 +5198,8 @@ void A_SignPlayer(mobj_t *actor)
|
|||
player_t *player = actor->target ? actor->target->player : NULL;
|
||||
UINT8 skinnum;
|
||||
UINT8 skincount = 0;
|
||||
for (skincount = 0; skincount < numskins; skincount++)
|
||||
if (!skincheck(skincount))
|
||||
for (skinnum = 0; skinnum < numskins; skinnum++)
|
||||
if (!skincheck(skinnum))
|
||||
skincount++;
|
||||
skinnum = P_RandomKey(skincount);
|
||||
for (skincount = 0; skincount < numskins; skincount++)
|
||||
|
@ -5232,12 +5232,14 @@ void A_SignPlayer(mobj_t *actor)
|
|||
{
|
||||
ov->color = facecolor;
|
||||
ov->skin = skin;
|
||||
if ((statenum_t)(ov->state-states) != actor->info->seestate)
|
||||
P_SetMobjState(ov, actor->info->seestate); // S_PLAY_SIGN
|
||||
}
|
||||
else // CLEAR! sign
|
||||
{
|
||||
ov->color = SKINCOLOR_NONE;
|
||||
ov->skin = NULL; // needs to be NULL in the case of SF_HIRES characters
|
||||
if ((statenum_t)(ov->state-states) != actor->info->missilestate)
|
||||
P_SetMobjState(ov, actor->info->missilestate); // S_CLEARSIGN
|
||||
}
|
||||
}
|
||||
|
@ -5245,6 +5247,7 @@ void A_SignPlayer(mobj_t *actor)
|
|||
{
|
||||
ov->color = SKINCOLOR_NONE;
|
||||
ov->skin = NULL;
|
||||
if ((statenum_t)(ov->state-states) != actor->info->meleestate)
|
||||
P_SetMobjState(ov, actor->info->meleestate); // S_EGGMANSIGN
|
||||
if (!signcolor)
|
||||
signcolor = SKINCOLOR_CARBON;
|
||||
|
|
70
src/p_mobj.c
70
src/p_mobj.c
|
@ -10461,6 +10461,61 @@ void P_SceneryThinker(mobj_t *mobj)
|
|||
// GAME SPAWN FUNCTIONS
|
||||
//
|
||||
|
||||
static fixed_t P_DefaultMobjShadowScale (mobj_t *thing)
|
||||
{
|
||||
switch (thing->type)
|
||||
{
|
||||
case MT_PLAYER:
|
||||
case MT_ROLLOUTROCK:
|
||||
|
||||
case MT_EGGMOBILE4_MACE:
|
||||
case MT_SMALLMACE:
|
||||
case MT_BIGMACE:
|
||||
|
||||
case MT_SMALLGRABCHAIN:
|
||||
case MT_BIGGRABCHAIN:
|
||||
|
||||
case MT_YELLOWSPRINGBALL:
|
||||
case MT_REDSPRINGBALL:
|
||||
|
||||
return FRACUNIT;
|
||||
|
||||
case MT_RING:
|
||||
case MT_FLINGRING:
|
||||
|
||||
case MT_BLUESPHERE:
|
||||
case MT_FLINGBLUESPHERE:
|
||||
case MT_BOMBSPHERE:
|
||||
|
||||
case MT_REDTEAMRING:
|
||||
case MT_BLUETEAMRING:
|
||||
case MT_REDFLAG:
|
||||
case MT_BLUEFLAG:
|
||||
|
||||
case MT_EMBLEM:
|
||||
|
||||
case MT_TOKEN:
|
||||
case MT_EMERALD1:
|
||||
case MT_EMERALD2:
|
||||
case MT_EMERALD3:
|
||||
case MT_EMERALD4:
|
||||
case MT_EMERALD5:
|
||||
case MT_EMERALD6:
|
||||
case MT_EMERALD7:
|
||||
case MT_EMERHUNT:
|
||||
case MT_FLINGEMERALD:
|
||||
|
||||
return 2*FRACUNIT/3;
|
||||
|
||||
default:
|
||||
|
||||
if (thing->flags & (MF_ENEMY|MF_BOSS))
|
||||
return FRACUNIT;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// P_SpawnMobj
|
||||
//
|
||||
|
@ -10562,20 +10617,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
|||
mobj->z = z;
|
||||
|
||||
// Set shadowscale here, before spawn hook so that Lua can change it
|
||||
if (
|
||||
type == MT_PLAYER ||
|
||||
type == MT_ROLLOUTROCK ||
|
||||
type == MT_EGGMOBILE4_MACE ||
|
||||
(type >= MT_SMALLMACE && type <= MT_REDSPRINGBALL) ||
|
||||
(mobj->flags & (MF_ENEMY|MF_BOSS))
|
||||
)
|
||||
mobj->shadowscale = FRACUNIT;
|
||||
else if (
|
||||
type >= MT_RING && type <= MT_FLINGEMERALD && type != MT_EMERALDSPAWN
|
||||
)
|
||||
mobj->shadowscale = 2*FRACUNIT/3;
|
||||
else
|
||||
mobj->shadowscale = 0;
|
||||
mobj->shadowscale = P_DefaultMobjShadowScale(mobj);
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
// DANGER! This can cause P_SpawnMobj to return NULL!
|
||||
|
|
|
@ -1001,15 +1001,35 @@ static void Polyobj_pushThing(polyobj_t *po, line_t *line, mobj_t *mo)
|
|||
//
|
||||
static void Polyobj_slideThing(mobj_t *mo, fixed_t dx, fixed_t dy)
|
||||
{
|
||||
if (mo->player) { // Do something similar to conveyor movement. -Red
|
||||
mo->player->cmomx += dx;
|
||||
mo->player->cmomy += dy;
|
||||
if (mo->player) { // Finally this doesn't suck eggs -fickle
|
||||
fixed_t cdx, cdy;
|
||||
|
||||
dx = FixedMul(dx, CARRYFACTOR);
|
||||
dy = FixedMul(dy, CARRYFACTOR);
|
||||
cdx = FixedMul(dx, FRACUNIT-CARRYFACTOR);
|
||||
cdy = FixedMul(dy, FRACUNIT-CARRYFACTOR);
|
||||
|
||||
mo->player->cmomx -= dx;
|
||||
mo->player->cmomy -= dy;
|
||||
if (mo->player->onconveyor == 1)
|
||||
{
|
||||
mo->momx += cdx;
|
||||
mo->momy += cdy;
|
||||
|
||||
// Multiple slides in the same tic, somehow
|
||||
mo->player->cmomx += cdx;
|
||||
mo->player->cmomy += cdy;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mo->player->onconveyor == 3)
|
||||
{
|
||||
mo->momx += cdx - mo->player->cmomx;
|
||||
mo->momy += cdy - mo->player->cmomy;
|
||||
}
|
||||
|
||||
mo->player->cmomx = cdx;
|
||||
mo->player->cmomy = cdy;
|
||||
}
|
||||
|
||||
dx = FixedMul(dx, FRACUNIT - mo->friction);
|
||||
dy = FixedMul(dy, FRACUNIT - mo->friction);
|
||||
|
||||
if (mo->player->pflags & PF_SPINNING && (mo->player->rmomx || mo->player->rmomy) && !(mo->player->pflags & PF_STARTDASH)) {
|
||||
#define SPINMULT 5184 // Consider this a substitute for properly calculating FRACUNIT-friction. I'm tired. -Red
|
||||
|
@ -1282,7 +1302,8 @@ static void Polyobj_rotateThings(polyobj_t *po, vertex_t origin, angle_t delta,
|
|||
{
|
||||
static INT32 pomovecount = 10000;
|
||||
INT32 x, y;
|
||||
angle_t deltafine = delta >> ANGLETOFINESHIFT;
|
||||
angle_t deltafine = (((po->angle + delta) >> ANGLETOFINESHIFT) - (po->angle >> ANGLETOFINESHIFT)) & FINEMASK;
|
||||
// This fineshift trickery replaces the old delta>>ANGLETOFINESHIFT; doing it this way avoids loss of precision causing objects to slide off -fickle
|
||||
|
||||
pomovecount++;
|
||||
|
||||
|
@ -1334,19 +1355,10 @@ static void Polyobj_rotateThings(polyobj_t *po, vertex_t origin, angle_t delta,
|
|||
oldxoff = mo->x-origin.x;
|
||||
oldyoff = mo->y-origin.y;
|
||||
|
||||
if (mo->player) // Hack to fix players sliding off of spinning polys -Red
|
||||
{
|
||||
fixed_t temp;
|
||||
newxoff = FixedMul(oldxoff, c)-FixedMul(oldyoff, s) - oldxoff;
|
||||
newyoff = FixedMul(oldyoff, c)+FixedMul(oldxoff, s) - oldyoff;
|
||||
|
||||
temp = FixedMul(oldxoff, c)-FixedMul(oldyoff, s);
|
||||
oldyoff = FixedMul(oldyoff, c)+FixedMul(oldxoff, s);
|
||||
oldxoff = temp;
|
||||
}
|
||||
|
||||
newxoff = FixedMul(oldxoff, c)-FixedMul(oldyoff, s);
|
||||
newyoff = FixedMul(oldyoff, c)+FixedMul(oldxoff, s);
|
||||
|
||||
Polyobj_slideThing(mo, newxoff-oldxoff, newyoff-oldyoff);
|
||||
Polyobj_slideThing(mo, newxoff, newyoff);
|
||||
|
||||
if (turnthings == 2 || (turnthings == 1 && !mo->player)) {
|
||||
mo->angle += delta;
|
||||
|
|
|
@ -1255,6 +1255,7 @@ typedef enum
|
|||
#endif
|
||||
MD2_COLORIZED = 1<<12,
|
||||
MD2_ROLLANGLE = 1<<13,
|
||||
MD2_SHADOWSCALE = 1<<14,
|
||||
} mobj_diff2_t;
|
||||
|
||||
typedef enum
|
||||
|
@ -1476,6 +1477,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
diff2 |= MD2_COLORIZED;
|
||||
if (mobj->rollangle)
|
||||
diff2 |= MD2_ROLLANGLE;
|
||||
if (mobj->shadowscale)
|
||||
diff2 |= MD2_SHADOWSCALE;
|
||||
if (diff2 != 0)
|
||||
diff |= MD_MORE;
|
||||
|
||||
|
@ -1642,6 +1645,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
WRITEUINT8(save_p, mobj->colorized);
|
||||
if (diff2 & MD2_ROLLANGLE)
|
||||
WRITEANGLE(save_p, mobj->rollangle);
|
||||
if (diff2 & MD2_SHADOWSCALE)
|
||||
WRITEFIXED(save_p, mobj->shadowscale);
|
||||
|
||||
WRITEUINT32(save_p, mobj->mobjnum);
|
||||
}
|
||||
|
@ -2721,6 +2726,8 @@ static thinker_t* LoadMobjThinker(actionf_p1 thinker)
|
|||
mobj->colorized = READUINT8(save_p);
|
||||
if (diff2 & MD2_ROLLANGLE)
|
||||
mobj->rollangle = READANGLE(save_p);
|
||||
if (diff2 & MD2_SHADOWSCALE)
|
||||
mobj->shadowscale = READFIXED(save_p);
|
||||
|
||||
if (diff & MD_REDFLAG)
|
||||
{
|
||||
|
|
|
@ -12174,6 +12174,8 @@ void P_PlayerThink(player_t *player)
|
|||
|
||||
#ifdef POLYOBJECTS
|
||||
if (player->onconveyor == 1)
|
||||
player->onconveyor = 3;
|
||||
else if (player->onconveyor == 3)
|
||||
player->cmomy = player->cmomx = 0;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3463,6 +3463,7 @@ static boolean R_ProcessPatchableFields(skin_t *skin, char *stoken, char *value)
|
|||
GETFLAG(DASHMODE)
|
||||
GETFLAG(FASTEDGE)
|
||||
GETFLAG(MULTIABILITY)
|
||||
GETFLAG(NONIGHTSROTATION)
|
||||
#undef GETFLAG
|
||||
|
||||
else // let's check if it's a sound, otherwise error out
|
||||
|
|
|
@ -1219,7 +1219,7 @@
|
|||
C01FCF4B08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CURRENT_PROJECT_VERSION = 2.2.0;
|
||||
CURRENT_PROJECT_VERSION = 2.2.1;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
NORMALSRB2,
|
||||
|
@ -1231,7 +1231,7 @@
|
|||
C01FCF4C08A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CURRENT_PROJECT_VERSION = 2.2.0;
|
||||
CURRENT_PROJECT_VERSION = 2.2.1;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
|
|
21
src/w_wad.c
21
src/w_wad.c
|
@ -1691,7 +1691,7 @@ W_VerifyName (const char *name, lumpchecklist_t *checklist, boolean status)
|
|||
size_t j;
|
||||
for (j = 0; checklist[j].len && checklist[j].name; ++j)
|
||||
{
|
||||
if (( strncmp(name, checklist[j].name,
|
||||
if (( strncasecmp(name, checklist[j].name,
|
||||
checklist[j].len) != false ) == status)
|
||||
{
|
||||
return true;
|
||||
|
@ -1746,6 +1746,19 @@ W_VerifyWAD (FILE *fp, lumpchecklist_t *checklist, boolean status)
|
|||
return true;
|
||||
}
|
||||
|
||||
// List of blacklisted folders to use when checking the PK3
|
||||
static lumpchecklist_t folderblacklist[] =
|
||||
{
|
||||
{"Lua/", 4},
|
||||
{"SOC/", 4},
|
||||
{"Sprites/", 8},
|
||||
{"Textures/", 9},
|
||||
{"Patches/", 8},
|
||||
{"Flats/", 6},
|
||||
{"Fades/", 6},
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
static int
|
||||
W_VerifyPK3 (FILE *fp, lumpchecklist_t *checklist, boolean status)
|
||||
{
|
||||
|
@ -1797,7 +1810,7 @@ W_VerifyPK3 (FILE *fp, lumpchecklist_t *checklist, boolean status)
|
|||
else
|
||||
trimname = fullname; // Care taken for root files.
|
||||
|
||||
if (*trimname) // Ignore directories
|
||||
if (*trimname) // Ignore directories, well kinda
|
||||
{
|
||||
if ((dotpos = strrchr(trimname, '.')) == 0)
|
||||
dotpos = fullname + strlen(fullname); // Watch for files without extension.
|
||||
|
@ -1807,6 +1820,10 @@ W_VerifyPK3 (FILE *fp, lumpchecklist_t *checklist, boolean status)
|
|||
|
||||
if (! W_VerifyName(lumpname, checklist, status))
|
||||
return false;
|
||||
|
||||
// Check for directories next, if it's blacklisted it will return false
|
||||
if (W_VerifyName(fullname, folderblacklist, status))
|
||||
return false;
|
||||
}
|
||||
|
||||
free(fullname);
|
||||
|
|
Loading…
Reference in a new issue