mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-28 14:31:15 +00:00
Merge branch 'EOL-9' into EOL
This commit is contained in:
commit
247388c6f7
17 changed files with 293 additions and 253 deletions
|
@ -16,7 +16,7 @@
|
||||||
#define ASSET_HASH_RINGS_DTA "${SRB2_ASSET_rings.dta_HASH}"
|
#define ASSET_HASH_RINGS_DTA "${SRB2_ASSET_rings.dta_HASH}"
|
||||||
#define ASSET_HASH_ZONES_DTA "${SRB2_ASSET_zones.dta_HASH}"
|
#define ASSET_HASH_ZONES_DTA "${SRB2_ASSET_zones.dta_HASH}"
|
||||||
#ifdef USE_PATCH_DTA
|
#ifdef USE_PATCH_DTA
|
||||||
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}"
|
#define ASSET_HASH_PATCH_PK3 "${SRB2_ASSET_patch.pk3_HASH}"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
|
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
#define ASSET_HASH_PLAYER_DTA "cfca0f1c73023cbbd8f844f45480f799"
|
#define ASSET_HASH_PLAYER_DTA "cfca0f1c73023cbbd8f844f45480f799"
|
||||||
#define ASSET_HASH_RINGS_DTA "85901ad4bf94637e5753d2ac2c03ea26"
|
#define ASSET_HASH_RINGS_DTA "85901ad4bf94637e5753d2ac2c03ea26"
|
||||||
#ifdef USE_PATCH_DTA
|
#ifdef USE_PATCH_DTA
|
||||||
#define ASSET_HASH_PATCH_DTA "dbbf8bc6121618ee3be2d5b14650429b"
|
#define ASSET_HASH_PATCH_PK3 "dbbf8bc6121618ee3be2d5b14650429b"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
12
src/d_main.c
12
src/d_main.c
|
@ -843,7 +843,7 @@ static void IdentifyVersion(void)
|
||||||
|
|
||||||
#ifdef USE_PATCH_DTA
|
#ifdef USE_PATCH_DTA
|
||||||
// Add our crappy patches to fix our bugs
|
// Add our crappy patches to fix our bugs
|
||||||
D_AddFile(va(pandf,srb2waddir,"patch.dta"));
|
D_AddFile(va(pandf,srb2waddir,"patch.pk3"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
|
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
|
||||||
|
@ -1125,11 +1125,11 @@ void D_SRB2Main(void)
|
||||||
#ifndef DEVELOP // md5s last updated 12/14/14
|
#ifndef DEVELOP // md5s last updated 12/14/14
|
||||||
|
|
||||||
// Check MD5s of autoloaded files
|
// Check MD5s of autoloaded files
|
||||||
//W_VerifyFileMD5(0, ASSET_HASH_SRB2_PK3); // srb2.pk3
|
W_VerifyFileMD5(0, ASSET_HASH_SRB2_PK3); // srb2.pk3
|
||||||
//W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta
|
W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta
|
||||||
//W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta
|
W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta
|
||||||
#ifdef USE_PATCH_DTA
|
#ifdef USE_PATCH_DTA
|
||||||
W_VerifyFileMD5(3, ASSET_HASH_PATCH_DTA); // patch.dta
|
W_VerifyFileMD5(3, ASSET_HASH_PATCH_PK3); // patch.pk3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// don't check music.dta because people like to modify it, and it doesn't matter if they do
|
// don't check music.dta because people like to modify it, and it doesn't matter if they do
|
||||||
|
@ -1138,7 +1138,7 @@ void D_SRB2Main(void)
|
||||||
|
|
||||||
mainwads = 3; // there are 3 wads not to unload
|
mainwads = 3; // there are 3 wads not to unload
|
||||||
#ifdef USE_PATCH_DTA
|
#ifdef USE_PATCH_DTA
|
||||||
++mainwads; // patch.dta adds one more
|
++mainwads; // patch.pk3 adds one more
|
||||||
#endif
|
#endif
|
||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
++mainwads; // music_new, too
|
++mainwads; // music_new, too
|
||||||
|
|
|
@ -2670,7 +2670,21 @@ static void readmaincfg(MYFILE *f)
|
||||||
value = get_number(word2);
|
value = get_number(word2);
|
||||||
|
|
||||||
sstage_start = (INT16)value;
|
sstage_start = (INT16)value;
|
||||||
sstage_end = (INT16)(sstage_start+6); // 7 special stages total
|
sstage_end = (INT16)(sstage_start+7); // 7 special stages total plus one weirdo
|
||||||
|
}
|
||||||
|
else if (fastcmp(word, "SMPSTAGE_START"))
|
||||||
|
{
|
||||||
|
// Support using the actual map name,
|
||||||
|
// i.e., Level AB, Level FZ, etc.
|
||||||
|
|
||||||
|
// Convert to map number
|
||||||
|
if (word2[0] >= 'A' && word2[0] <= 'Z')
|
||||||
|
value = M_MapNumber(word2[0], word2[1]);
|
||||||
|
else
|
||||||
|
value = get_number(word2);
|
||||||
|
|
||||||
|
smpstage_start = (INT16)value;
|
||||||
|
smpstage_end = (INT16)(smpstage_start+6); // 7 special stages total
|
||||||
}
|
}
|
||||||
else if (fastcmp(word, "REDTEAM"))
|
else if (fastcmp(word, "REDTEAM"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -569,6 +569,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||||
|
|
||||||
/// Handle touching sector specials in P_PlayerAfterThink instead of P_PlayerThink.
|
/// Handle touching sector specials in P_PlayerAfterThink instead of P_PlayerThink.
|
||||||
/// \note Required for proper collision with moving sloped surfaces that have sector specials on them.
|
/// \note Required for proper collision with moving sloped surfaces that have sector specials on them.
|
||||||
//#define SECTORSPECIALSAFTERTHINK
|
#define SECTORSPECIALSAFTERTHINK
|
||||||
|
|
||||||
#endif // __DOOMDEF__
|
#endif // __DOOMDEF__
|
||||||
|
|
|
@ -126,8 +126,7 @@ extern INT32 secondarydisplayplayer; // for splitscreen
|
||||||
|
|
||||||
// Maps of special importance
|
// Maps of special importance
|
||||||
extern INT16 spstage_start;
|
extern INT16 spstage_start;
|
||||||
extern INT16 sstage_start;
|
extern INT16 sstage_start, sstage_end, smpstage_start, smpstage_end;
|
||||||
extern INT16 sstage_end;
|
|
||||||
|
|
||||||
extern INT16 titlemap;
|
extern INT16 titlemap;
|
||||||
extern boolean hidetitlepics;
|
extern boolean hidetitlepics;
|
||||||
|
|
38
src/g_game.c
38
src/g_game.c
|
@ -121,8 +121,7 @@ INT16 lastmap; // last level you were at (returning from special stages)
|
||||||
tic_t timeinmap; // Ticker for time spent in level (used for levelcard display)
|
tic_t timeinmap; // Ticker for time spent in level (used for levelcard display)
|
||||||
|
|
||||||
INT16 spstage_start;
|
INT16 spstage_start;
|
||||||
INT16 sstage_start;
|
INT16 sstage_start, sstage_end, smpstage_start, smpstage_end;
|
||||||
INT16 sstage_end;
|
|
||||||
|
|
||||||
INT16 titlemap = 0;
|
INT16 titlemap = 0;
|
||||||
boolean hidetitlepics = false;
|
boolean hidetitlepics = false;
|
||||||
|
@ -2795,7 +2794,11 @@ INT32 G_GetGametypeByName(const char *gametypestr)
|
||||||
//
|
//
|
||||||
boolean G_IsSpecialStage(INT32 mapnum)
|
boolean G_IsSpecialStage(INT32 mapnum)
|
||||||
{
|
{
|
||||||
if (gametype == GT_COOP && modeattacking != ATTACKING_RECORD && mapnum >= sstage_start && mapnum <= sstage_end)
|
if (gametype != GT_COOP || modeattacking == ATTACKING_RECORD)
|
||||||
|
return false;
|
||||||
|
if (mapnum >= sstage_start && mapnum <= sstage_end)
|
||||||
|
return true;
|
||||||
|
if (mapnum >= smpstage_start && mapnum <= smpstage_end)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -3018,23 +3021,17 @@ static void G_DoCompleted(void)
|
||||||
|
|
||||||
if ((gottoken = (gametype == GT_COOP && token)))
|
if ((gottoken = (gametype == GT_COOP && token)))
|
||||||
{
|
{
|
||||||
|
INT16 i;
|
||||||
token--;
|
token--;
|
||||||
|
|
||||||
if (!(emeralds & EMERALD1))
|
for (i = 0; i < 7; i++)
|
||||||
nextmap = (INT16)(sstage_start - 1); // Special Stage 1
|
if (!(emeralds & i))
|
||||||
else if (!(emeralds & EMERALD2))
|
{
|
||||||
nextmap = (INT16)(sstage_start); // Special Stage 2
|
nextmap = ((netgame || multiplayer) ? smpstage_start : sstage_start) + i - 1; // to special stage!
|
||||||
else if (!(emeralds & EMERALD3))
|
break;
|
||||||
nextmap = (INT16)(sstage_start + 1); // Special Stage 3
|
}
|
||||||
else if (!(emeralds & EMERALD4))
|
|
||||||
nextmap = (INT16)(sstage_start + 2); // Special Stage 4
|
if (i == 7)
|
||||||
else if (!(emeralds & EMERALD5))
|
|
||||||
nextmap = (INT16)(sstage_start + 3); // Special Stage 5
|
|
||||||
else if (!(emeralds & EMERALD6))
|
|
||||||
nextmap = (INT16)(sstage_start + 4); // Special Stage 6
|
|
||||||
else if (!(emeralds & EMERALD7))
|
|
||||||
nextmap = (INT16)(sstage_start + 5); // Special Stage 7
|
|
||||||
else
|
|
||||||
gottoken = false;
|
gottoken = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3206,8 +3203,9 @@ void G_LoadGameSettings(void)
|
||||||
{
|
{
|
||||||
// defaults
|
// defaults
|
||||||
spstage_start = 1;
|
spstage_start = 1;
|
||||||
sstage_start = 50;
|
sstage_start = smpstage_start = 50;
|
||||||
sstage_end = 57; // 8 special stages in vanilla SRB2
|
sstage_end = smpstage_end = 57; // 7 special stages in vanilla SRB2
|
||||||
|
sstage_end++; // plus one weirdo
|
||||||
|
|
||||||
// initialize free sfx slots for skin sounds
|
// initialize free sfx slots for skin sounds
|
||||||
S_InitRuntimeSounds();
|
S_InitRuntimeSounds();
|
||||||
|
|
|
@ -4092,7 +4092,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL, // xdeathstate
|
S_NULL, // xdeathstate
|
||||||
sfx_pop, // deathsound
|
sfx_pop, // deathsound
|
||||||
1, // speed
|
1, // speed
|
||||||
32*FRACUNIT, // radius
|
22*FRACUNIT, // radius
|
||||||
24*FRACUNIT, // height
|
24*FRACUNIT, // height
|
||||||
0, // display offset
|
0, // display offset
|
||||||
(sfx_s3k49<<8), // mass
|
(sfx_s3k49<<8), // mass
|
||||||
|
|
|
@ -898,10 +898,16 @@ void Command_Setlives_f(void)
|
||||||
REQUIRE_PANDORA;
|
REQUIRE_PANDORA;
|
||||||
|
|
||||||
if (COM_Argc() > 1)
|
if (COM_Argc() > 1)
|
||||||
|
{
|
||||||
|
SINT8 lives = atoi(COM_Argv(1));
|
||||||
|
if (lives == -1)
|
||||||
|
players[consoleplayer].lives = 0x7f; // infinity!
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// P_GivePlayerLives does value clamping
|
// P_GivePlayerLives does value clamping
|
||||||
players[consoleplayer].lives = 0;
|
players[consoleplayer].lives = 0;
|
||||||
P_GivePlayerLives(&players[consoleplayer], atoi(COM_Argv(1)));
|
P_GivePlayerLives(&players[consoleplayer], atoi(COM_Argv(1)));
|
||||||
|
}
|
||||||
|
|
||||||
G_SetGameModified(multiplayer);
|
G_SetGameModified(multiplayer);
|
||||||
}
|
}
|
||||||
|
|
19
src/m_menu.c
19
src/m_menu.c
|
@ -458,7 +458,7 @@ consvar_t cv_ghost_guest = {"ghost_guest", "Show", CV_SAVE, ghost2_cons_
|
||||||
static CV_PossibleValue_t dummyteam_cons_t[] = {{0, "Spectator"}, {1, "Red"}, {2, "Blue"}, {0, NULL}};
|
static CV_PossibleValue_t dummyteam_cons_t[] = {{0, "Spectator"}, {1, "Red"}, {2, "Blue"}, {0, NULL}};
|
||||||
static CV_PossibleValue_t dummyscramble_cons_t[] = {{0, "Random"}, {1, "Points"}, {0, NULL}};
|
static CV_PossibleValue_t dummyscramble_cons_t[] = {{0, "Random"}, {1, "Points"}, {0, NULL}};
|
||||||
static CV_PossibleValue_t ringlimit_cons_t[] = {{0, "MIN"}, {9999, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t ringlimit_cons_t[] = {{0, "MIN"}, {9999, "MAX"}, {0, NULL}};
|
||||||
static CV_PossibleValue_t liveslimit_cons_t[] = {{0, "MIN"}, {99, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t liveslimit_cons_t[] = {{-1, "MIN"}, {99, "MAX"}, {0, NULL}};
|
||||||
static CV_PossibleValue_t dummymares_cons_t[] = {
|
static CV_PossibleValue_t dummymares_cons_t[] = {
|
||||||
{-1, "END"}, {0,"Overall"}, {1,"Mare 1"}, {2,"Mare 2"}, {3,"Mare 3"}, {4,"Mare 4"}, {5,"Mare 5"}, {6,"Mare 6"}, {7,"Mare 7"}, {8,"Mare 8"}, {0,NULL}
|
{-1, "END"}, {0,"Overall"}, {1,"Mare 1"}, {2,"Mare 2"}, {3,"Mare 3"}, {4,"Mare 4"}, {5,"Mare 5"}, {6,"Mare 6"}, {7,"Mare 7"}, {8,"Mare 8"}, {0,NULL}
|
||||||
};
|
};
|
||||||
|
@ -4938,6 +4938,7 @@ static void M_DrawAddons(void)
|
||||||
{
|
{
|
||||||
INT32 x, y;
|
INT32 x, y;
|
||||||
ssize_t i, max;
|
ssize_t i, max;
|
||||||
|
const char* topstr;
|
||||||
|
|
||||||
// hack - need to refresh at end of frame to handle addfile...
|
// hack - need to refresh at end of frame to handle addfile...
|
||||||
if (refreshdirmenu & M_AddonsRefresh())
|
if (refreshdirmenu & M_AddonsRefresh())
|
||||||
|
@ -4949,9 +4950,16 @@ static void M_DrawAddons(void)
|
||||||
if (addonsresponselimit)
|
if (addonsresponselimit)
|
||||||
addonsresponselimit--;
|
addonsresponselimit--;
|
||||||
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 4+offs, 0, (Playing()
|
if (Playing())
|
||||||
? "\x85""Adding files mid-game may cause problems."
|
topstr = "\x85""Adding files mid-game may cause problems.";
|
||||||
: LOCATIONSTRING));
|
else if (savemoddata)
|
||||||
|
topstr = "\x83""Add-on has its own data, saving enabled.";
|
||||||
|
else if (modifiedgame)
|
||||||
|
topstr = "\x87""Game is modified, saving is disabled.";
|
||||||
|
else
|
||||||
|
topstr = LOCATIONSTRING;
|
||||||
|
|
||||||
|
V_DrawCenteredString(BASEVIDWIDTH/2, 4+offs, 0, topstr);
|
||||||
|
|
||||||
if (numwadfiles <= mainwads+1)
|
if (numwadfiles <= mainwads+1)
|
||||||
y = 0;
|
y = 0;
|
||||||
|
@ -5266,6 +5274,9 @@ static void M_PandorasBox(INT32 choice)
|
||||||
{
|
{
|
||||||
(void)choice;
|
(void)choice;
|
||||||
CV_StealthSetValue(&cv_dummyrings, max(players[consoleplayer].rings, 0));
|
CV_StealthSetValue(&cv_dummyrings, max(players[consoleplayer].rings, 0));
|
||||||
|
if (players[consoleplayer].lives == 0x7f)
|
||||||
|
CV_StealthSetValue(&cv_dummylives, -1);
|
||||||
|
else
|
||||||
CV_StealthSetValue(&cv_dummylives, players[consoleplayer].lives);
|
CV_StealthSetValue(&cv_dummylives, players[consoleplayer].lives);
|
||||||
CV_StealthSetValue(&cv_dummycontinues, players[consoleplayer].continues);
|
CV_StealthSetValue(&cv_dummycontinues, players[consoleplayer].continues);
|
||||||
SR_PandorasBox[6].status = ((players[consoleplayer].charflags & SF_SUPER)
|
SR_PandorasBox[6].status = ((players[consoleplayer].charflags & SF_SUPER)
|
||||||
|
|
|
@ -11391,6 +11391,7 @@ void A_ConnectToGround(mobj_t *actor)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (actor->subsector->sector->ffloors)
|
||||||
P_AdjustMobjFloorZ_FFloors(actor, actor->subsector->sector, 2);
|
P_AdjustMobjFloorZ_FFloors(actor, actor->subsector->sector, 2);
|
||||||
|
|
||||||
if (actor->flags2 & MF2_OBJECTFLIP)
|
if (actor->flags2 & MF2_OBJECTFLIP)
|
||||||
|
@ -11406,15 +11407,18 @@ void A_ConnectToGround(mobj_t *actor)
|
||||||
|
|
||||||
if (locvar2)
|
if (locvar2)
|
||||||
{
|
{
|
||||||
|
workh = FixedMul(mobjinfo[locvar2].height, actor->scale);
|
||||||
if (actor->flags2 & MF2_OBJECTFLIP)
|
if (actor->flags2 & MF2_OBJECTFLIP)
|
||||||
workz -= FixedMul(mobjinfo[locvar2].height, actor->scale);
|
workz -= workh;
|
||||||
work = P_SpawnMobjFromMobj(actor, 0, 0, workz, locvar2);
|
work = P_SpawnMobjFromMobj(actor, 0, 0, workz, locvar2);
|
||||||
|
workz += dir*workh;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!locvar1)
|
if (!locvar1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
workh = FixedMul(mobjinfo[locvar1].height, actor->scale);
|
if (!(workh = FixedMul(mobjinfo[locvar1].height, actor->scale)))
|
||||||
|
return;
|
||||||
|
|
||||||
if (actor->flags2 & MF2_OBJECTFLIP)
|
if (actor->flags2 & MF2_OBJECTFLIP)
|
||||||
workz -= workh;
|
workz -= workh;
|
||||||
|
|
|
@ -2391,6 +2391,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
P_RemoveMobj(chain);
|
P_RemoveMobj(chain);
|
||||||
chain = chainnext;
|
chain = chainnext;
|
||||||
}
|
}
|
||||||
|
S_StopSound(target->tracer);
|
||||||
P_KillMobj(target->tracer, inflictor, source, damagetype);
|
P_KillMobj(target->tracer, inflictor, source, damagetype);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3378,7 +3378,7 @@ boolean P_AddWadFile(const char *wadfilename)
|
||||||
for (i = 0; i < numlumps; i++, lumpinfo++)
|
for (i = 0; i < numlumps; i++, lumpinfo++)
|
||||||
{
|
{
|
||||||
// lumpinfo = FindFolder("Lua/", &luaPos, &luaNum, lumpinfo, &numlumps, &i);
|
// lumpinfo = FindFolder("Lua/", &luaPos, &luaNum, lumpinfo, &numlumps, &i);
|
||||||
// lumpinfo = FindFolder("SOCs/", &socPos, &socNum, lumpinfo, &numlumps, &i);
|
// lumpinfo = FindFolder("SOC/", &socPos, &socNum, lumpinfo, &numlumps, &i);
|
||||||
lumpinfo = FindFolder("Sounds/", &sfxPos, &sfxNum, lumpinfo, &numlumps, &i);
|
lumpinfo = FindFolder("Sounds/", &sfxPos, &sfxNum, lumpinfo, &numlumps, &i);
|
||||||
lumpinfo = FindFolder("Music/", &musPos, &musNum, lumpinfo, &numlumps, &i);
|
lumpinfo = FindFolder("Music/", &musPos, &musNum, lumpinfo, &numlumps, &i);
|
||||||
// lumpinfo = FindFolder("Sprites/", &sprPos, &sprNum, lumpinfo, &numlumps, &i);
|
// lumpinfo = FindFolder("Sprites/", &sprPos, &sprNum, lumpinfo, &numlumps, &i);
|
||||||
|
|
42
src/p_user.c
42
src/p_user.c
|
@ -283,9 +283,11 @@ boolean P_PlayerMoving(INT32 pnum)
|
||||||
//
|
//
|
||||||
UINT8 P_GetNextEmerald(void)
|
UINT8 P_GetNextEmerald(void)
|
||||||
{
|
{
|
||||||
if (gamemap < sstage_start || gamemap > sstage_end)
|
if (gamemap >= sstage_start && gamemap <= sstage_end)
|
||||||
return 0;
|
|
||||||
return (UINT8)(gamemap - sstage_start);
|
return (UINT8)(gamemap - sstage_start);
|
||||||
|
if (gamemap >= smpstage_start || gamemap <= smpstage_end)
|
||||||
|
return (UINT8)(gamemap - smpstage_start);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -3491,26 +3493,37 @@ static void P_SetWeaponDelay(player_t *player, INT32 delay)
|
||||||
static void P_DoFiring(player_t *player, ticcmd_t *cmd)
|
static void P_DoFiring(player_t *player, ticcmd_t *cmd)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
mobj_t *mo = NULL;
|
||||||
|
|
||||||
I_Assert(player != NULL);
|
I_Assert(player != NULL);
|
||||||
I_Assert(!P_MobjWasRemoved(player->mo));
|
I_Assert(!P_MobjWasRemoved(player->mo));
|
||||||
|
|
||||||
if (cmd->buttons & BT_ATTACK || cmd->buttons & BT_FIRENORMAL)
|
if (!(cmd->buttons & (BT_ATTACK|BT_FIRENORMAL)))
|
||||||
{
|
{
|
||||||
if (!(player->pflags & PF_ATTACKDOWN) && (player->powers[pw_shield] & SH_STACK) == SH_FIREFLOWER && !player->climbing)
|
// Not holding any firing buttons anymore.
|
||||||
|
// Release the grenade / whatever.
|
||||||
|
player->pflags &= ~PF_ATTACKDOWN;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player->pflags & PF_ATTACKDOWN || player->climbing || (G_TagGametype() && !(player->pflags & PF_TAGIT)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ((player->powers[pw_shield] & SH_STACK) == SH_FIREFLOWER)
|
||||||
{
|
{
|
||||||
player->pflags |= PF_ATTACKDOWN;
|
player->pflags |= PF_ATTACKDOWN;
|
||||||
P_SpawnPlayerMissile(player->mo, MT_FIREBALL, 0);
|
mo = P_SpawnPlayerMissile(player->mo, MT_FIREBALL, 0);
|
||||||
|
P_InstaThrust(mo, player->mo->angle, ((mo->info->speed>>FRACBITS)*player->mo->scale) + player->speed);
|
||||||
S_StartSound(player->mo, sfx_mario7);
|
S_StartSound(player->mo, sfx_mario7);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (G_RingSlingerGametype() && (!G_TagGametype() || player->pflags & PF_TAGIT)
|
|
||||||
&& !player->weapondelay && !player->climbing
|
if (!G_RingSlingerGametype() || player->weapondelay)
|
||||||
&& !(player->pflags & PF_ATTACKDOWN))
|
return;
|
||||||
{
|
|
||||||
mobj_t *mo = NULL;
|
|
||||||
player->pflags |= PF_ATTACKDOWN;
|
player->pflags |= PF_ATTACKDOWN;
|
||||||
|
|
||||||
#define TAKE_AMMO(player, power) \
|
#define TAKE_AMMO(player, power) \
|
||||||
player->powers[power]--; \
|
player->powers[power]--; \
|
||||||
if (player->rings < 1) \
|
if (player->rings < 1) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -3672,13 +3685,6 @@ firenormal:
|
||||||
S_StartSound(mo, sfx_rail2);
|
S_StartSound(mo, sfx_rail2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Not holding any firing buttons anymore.
|
|
||||||
// Release the grenade / whatever.
|
|
||||||
player->pflags &= ~PF_ATTACKDOWN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -240,8 +240,8 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
|
|
||||||
// Mario
|
// Mario
|
||||||
{"koopfr" , true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Fire"},
|
{"koopfr" , true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Fire"},
|
||||||
{"mario1", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hitting a ceiling"},
|
{"mario1", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hit"},
|
||||||
{"mario2", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Koopa shell"},
|
{"mario2", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bonk"},
|
||||||
{"mario3", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power-up"},
|
{"mario3", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power-up"},
|
||||||
{"mario4", true, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got coin"},
|
{"mario4", true, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got coin"},
|
||||||
{"mario5", false, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Boot-stomp"},
|
{"mario5", false, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Boot-stomp"},
|
||||||
|
|
|
@ -665,9 +665,9 @@ static void ST_drawTime(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Counting down the hidetime?
|
// Counting down the hidetime?
|
||||||
if ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK) && (leveltime <= (hidetime*TICRATE)))
|
if ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK) && (stplyr->realtime <= (hidetime*TICRATE)))
|
||||||
{
|
{
|
||||||
tics = (hidetime*TICRATE - leveltime);
|
tics = (hidetime*TICRATE - stplyr->realtime);
|
||||||
if (tics < 3*TICRATE)
|
if (tics < 3*TICRATE)
|
||||||
ST_drawRaceNum(tics);
|
ST_drawRaceNum(tics);
|
||||||
downwards = true;
|
downwards = true;
|
||||||
|
@ -675,15 +675,15 @@ static void ST_drawTime(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Hidetime finish!
|
// Hidetime finish!
|
||||||
if ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK) && (leveltime < ((hidetime+1)*TICRATE)))
|
if ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK) && (stplyr->realtime < ((hidetime+1)*TICRATE)))
|
||||||
ST_drawRaceNum(hidetime*TICRATE - leveltime);
|
ST_drawRaceNum(hidetime*TICRATE - stplyr->realtime);
|
||||||
|
|
||||||
// Time limit?
|
// Time limit?
|
||||||
if (gametype != GT_RACE && gametype != GT_COMPETITION && gametype != GT_COOP && cv_timelimit.value && timelimitintics > 0)
|
if (gametype != GT_COOP && gametype != GT_RACE && gametype != GT_COMPETITION && cv_timelimit.value && timelimitintics > 0)
|
||||||
{
|
{
|
||||||
if (timelimitintics >= leveltime)
|
if (timelimitintics >= stplyr->realtime)
|
||||||
{
|
{
|
||||||
tics = (timelimitintics - leveltime);
|
tics = (timelimitintics - stplyr->realtime);
|
||||||
if (tics < 3*TICRATE)
|
if (tics < 3*TICRATE)
|
||||||
ST_drawRaceNum(tics);
|
ST_drawRaceNum(tics);
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,11 +194,11 @@ static inline void W_LoadDehackedLumpsPK3(UINT16 wadnum)
|
||||||
for (; posStart < posEnd; posStart++)
|
for (; posStart < posEnd; posStart++)
|
||||||
LUA_LoadLump(wadnum, posStart);
|
LUA_LoadLump(wadnum, posStart);
|
||||||
}
|
}
|
||||||
posStart = W_CheckNumForFolderStartPK3("SOCs/", wadnum, 0);
|
posStart = W_CheckNumForFolderStartPK3("SOC/", wadnum, 0);
|
||||||
if (posStart != INT16_MAX)
|
if (posStart != INT16_MAX)
|
||||||
{
|
{
|
||||||
posEnd = W_CheckNumForFolderEndPK3("SOCs/", wadnum, posStart);
|
posEnd = W_CheckNumForFolderEndPK3("SOC/", wadnum, posStart);
|
||||||
posStart++; // first "lump" will be "SOCs/" folder itself, so ignore it
|
posStart++; // first "lump" will be "SOC/" folder itself, so ignore it
|
||||||
for(; posStart < posEnd; posStart++)
|
for(; posStart < posEnd; posStart++)
|
||||||
{
|
{
|
||||||
lumpinfo_t *lump_p = &wadfiles[wadnum]->lumpinfo[posStart];
|
lumpinfo_t *lump_p = &wadfiles[wadnum]->lumpinfo[posStart];
|
||||||
|
|
|
@ -331,14 +331,15 @@ void Y_IntermissionDrawer(void)
|
||||||
|
|
||||||
if (animatetic && intertic >= animatetic)
|
if (animatetic && intertic >= animatetic)
|
||||||
{
|
{
|
||||||
|
const INT32 scradjust = (vid.width/vid.dupx)>>3; // 40 for BASEVIDWIDTH
|
||||||
INT32 animatetimer = (intertic - animatetic);
|
INT32 animatetimer = (intertic - animatetic);
|
||||||
if (animatetimer <= 14)
|
if (animatetimer <= 14)
|
||||||
{
|
{
|
||||||
xoffset1 = -(animatetimer * 40);
|
xoffset1 = -(animatetimer * scradjust);
|
||||||
xoffset2 = -((animatetimer-2) * 40);
|
xoffset2 = -((animatetimer-2) * scradjust);
|
||||||
xoffset3 = -((animatetimer-4) * 40);
|
xoffset3 = -((animatetimer-4) * scradjust);
|
||||||
xoffset4 = -((animatetimer-6) * 40);
|
xoffset4 = -((animatetimer-6) * scradjust);
|
||||||
xoffset5 = -((animatetimer-8) * 40);
|
xoffset5 = -((animatetimer-8) * scradjust);
|
||||||
if (xoffset2 > 0) xoffset2 = 0;
|
if (xoffset2 > 0) xoffset2 = 0;
|
||||||
if (xoffset3 > 0) xoffset3 = 0;
|
if (xoffset3 > 0) xoffset3 = 0;
|
||||||
if (xoffset4 > 0) xoffset4 = 0;
|
if (xoffset4 > 0) xoffset4 = 0;
|
||||||
|
@ -347,12 +348,12 @@ void Y_IntermissionDrawer(void)
|
||||||
else if (animatetimer < 32)
|
else if (animatetimer < 32)
|
||||||
{
|
{
|
||||||
drawsection = 1;
|
drawsection = 1;
|
||||||
xoffset1 = (22-animatetimer) * 40;
|
xoffset1 = (22-animatetimer) * scradjust;
|
||||||
xoffset2 = (24-animatetimer) * 40;
|
xoffset2 = (24-animatetimer) * scradjust;
|
||||||
xoffset3 = (26-animatetimer) * 40;
|
xoffset3 = (26-animatetimer) * scradjust;
|
||||||
xoffset4 = (28-animatetimer) * 40;
|
xoffset4 = (28-animatetimer) * scradjust;
|
||||||
xoffset5 = (30-animatetimer) * 40;
|
xoffset5 = (30-animatetimer) * scradjust;
|
||||||
xoffset6 = (32-animatetimer) * 40;
|
xoffset6 = (32-animatetimer) * scradjust;
|
||||||
if (xoffset1 < 0) xoffset1 = 0;
|
if (xoffset1 < 0) xoffset1 = 0;
|
||||||
if (xoffset2 < 0) xoffset2 = 0;
|
if (xoffset2 < 0) xoffset2 = 0;
|
||||||
if (xoffset3 < 0) xoffset3 = 0;
|
if (xoffset3 < 0) xoffset3 = 0;
|
||||||
|
@ -426,7 +427,7 @@ void Y_IntermissionDrawer(void)
|
||||||
{
|
{
|
||||||
boolean drawthistic = !(ALL7EMERALDS(emeralds) && (intertic & 1));
|
boolean drawthistic = !(ALL7EMERALDS(emeralds) && (intertic & 1));
|
||||||
INT32 emeraldx = 152 - 3*28;
|
INT32 emeraldx = 152 - 3*28;
|
||||||
INT32 em = (gamemap - sstage_start);
|
INT32 em = P_GetNextEmerald();
|
||||||
|
|
||||||
if (em == 7)
|
if (em == 7)
|
||||||
{
|
{
|
||||||
|
@ -1357,7 +1358,7 @@ void Y_StartIntermission(void)
|
||||||
else
|
else
|
||||||
strcpy(data.spec.passed1, "YOU GOT");
|
strcpy(data.spec.passed1, "YOU GOT");
|
||||||
strcpy(data.spec.passed2, "A CHAOS EMERALD");
|
strcpy(data.spec.passed2, "A CHAOS EMERALD");
|
||||||
if (gamemap > (sstage_start + 5))
|
if (P_GetNextEmerald() > 6)
|
||||||
{
|
{
|
||||||
data.spec.passed2[15] = '?';
|
data.spec.passed2[15] = '?';
|
||||||
data.spec.passed2[16] = '\0';
|
data.spec.passed2[16] = '\0';
|
||||||
|
|
Loading…
Reference in a new issue