mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-28 06:22:05 +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_ZONES_DTA "${SRB2_ASSET_zones.dta_HASH}"
|
||||
#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
|
||||
|
||||
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
|
||||
|
@ -36,7 +36,7 @@
|
|||
#define ASSET_HASH_PLAYER_DTA "cfca0f1c73023cbbd8f844f45480f799"
|
||||
#define ASSET_HASH_RINGS_DTA "85901ad4bf94637e5753d2ac2c03ea26"
|
||||
#ifdef USE_PATCH_DTA
|
||||
#define ASSET_HASH_PATCH_DTA "dbbf8bc6121618ee3be2d5b14650429b"
|
||||
#define ASSET_HASH_PATCH_PK3 "dbbf8bc6121618ee3be2d5b14650429b"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
12
src/d_main.c
12
src/d_main.c
|
@ -843,7 +843,7 @@ static void IdentifyVersion(void)
|
|||
|
||||
#ifdef USE_PATCH_DTA
|
||||
// Add our crappy patches to fix our bugs
|
||||
D_AddFile(va(pandf,srb2waddir,"patch.dta"));
|
||||
D_AddFile(va(pandf,srb2waddir,"patch.pk3"));
|
||||
#endif
|
||||
|
||||
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
|
||||
|
@ -1125,11 +1125,11 @@ void D_SRB2Main(void)
|
|||
#ifndef DEVELOP // md5s last updated 12/14/14
|
||||
|
||||
// Check MD5s of autoloaded files
|
||||
//W_VerifyFileMD5(0, ASSET_HASH_SRB2_PK3); // srb2.pk3
|
||||
//W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta
|
||||
//W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta
|
||||
W_VerifyFileMD5(0, ASSET_HASH_SRB2_PK3); // srb2.pk3
|
||||
W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta
|
||||
W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta
|
||||
#ifdef USE_PATCH_DTA
|
||||
W_VerifyFileMD5(3, ASSET_HASH_PATCH_DTA); // patch.dta
|
||||
W_VerifyFileMD5(3, ASSET_HASH_PATCH_PK3); // patch.pk3
|
||||
#endif
|
||||
|
||||
// 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
|
||||
#ifdef USE_PATCH_DTA
|
||||
++mainwads; // patch.dta adds one more
|
||||
++mainwads; // patch.pk3 adds one more
|
||||
#endif
|
||||
#ifdef DEVELOP
|
||||
++mainwads; // music_new, too
|
||||
|
|
|
@ -2670,7 +2670,21 @@ static void readmaincfg(MYFILE *f)
|
|||
value = get_number(word2);
|
||||
|
||||
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"))
|
||||
{
|
||||
|
|
|
@ -569,6 +569,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
|||
|
||||
/// 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.
|
||||
//#define SECTORSPECIALSAFTERTHINK
|
||||
#define SECTORSPECIALSAFTERTHINK
|
||||
|
||||
#endif // __DOOMDEF__
|
||||
|
|
|
@ -126,8 +126,7 @@ extern INT32 secondarydisplayplayer; // for splitscreen
|
|||
|
||||
// Maps of special importance
|
||||
extern INT16 spstage_start;
|
||||
extern INT16 sstage_start;
|
||||
extern INT16 sstage_end;
|
||||
extern INT16 sstage_start, sstage_end, smpstage_start, smpstage_end;
|
||||
|
||||
extern INT16 titlemap;
|
||||
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)
|
||||
|
||||
INT16 spstage_start;
|
||||
INT16 sstage_start;
|
||||
INT16 sstage_end;
|
||||
INT16 sstage_start, sstage_end, smpstage_start, smpstage_end;
|
||||
|
||||
INT16 titlemap = 0;
|
||||
boolean hidetitlepics = false;
|
||||
|
@ -2795,7 +2794,11 @@ INT32 G_GetGametypeByName(const char *gametypestr)
|
|||
//
|
||||
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 false;
|
||||
|
@ -3018,23 +3021,17 @@ static void G_DoCompleted(void)
|
|||
|
||||
if ((gottoken = (gametype == GT_COOP && token)))
|
||||
{
|
||||
INT16 i;
|
||||
token--;
|
||||
|
||||
if (!(emeralds & EMERALD1))
|
||||
nextmap = (INT16)(sstage_start - 1); // Special Stage 1
|
||||
else if (!(emeralds & EMERALD2))
|
||||
nextmap = (INT16)(sstage_start); // Special Stage 2
|
||||
else if (!(emeralds & EMERALD3))
|
||||
nextmap = (INT16)(sstage_start + 1); // Special Stage 3
|
||||
else if (!(emeralds & EMERALD4))
|
||||
nextmap = (INT16)(sstage_start + 2); // Special Stage 4
|
||||
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
|
||||
for (i = 0; i < 7; i++)
|
||||
if (!(emeralds & i))
|
||||
{
|
||||
nextmap = ((netgame || multiplayer) ? smpstage_start : sstage_start) + i - 1; // to special stage!
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == 7)
|
||||
gottoken = false;
|
||||
}
|
||||
|
||||
|
@ -3206,8 +3203,9 @@ void G_LoadGameSettings(void)
|
|||
{
|
||||
// defaults
|
||||
spstage_start = 1;
|
||||
sstage_start = 50;
|
||||
sstage_end = 57; // 8 special stages in vanilla SRB2
|
||||
sstage_start = smpstage_start = 50;
|
||||
sstage_end = smpstage_end = 57; // 7 special stages in vanilla SRB2
|
||||
sstage_end++; // plus one weirdo
|
||||
|
||||
// initialize free sfx slots for skin sounds
|
||||
S_InitRuntimeSounds();
|
||||
|
|
|
@ -4092,7 +4092,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL, // xdeathstate
|
||||
sfx_pop, // deathsound
|
||||
1, // speed
|
||||
32*FRACUNIT, // radius
|
||||
22*FRACUNIT, // radius
|
||||
24*FRACUNIT, // height
|
||||
0, // display offset
|
||||
(sfx_s3k49<<8), // mass
|
||||
|
|
|
@ -899,9 +899,15 @@ void Command_Setlives_f(void)
|
|||
|
||||
if (COM_Argc() > 1)
|
||||
{
|
||||
// P_GivePlayerLives does value clamping
|
||||
players[consoleplayer].lives = 0;
|
||||
P_GivePlayerLives(&players[consoleplayer], atoi(COM_Argv(1)));
|
||||
SINT8 lives = atoi(COM_Argv(1));
|
||||
if (lives == -1)
|
||||
players[consoleplayer].lives = 0x7f; // infinity!
|
||||
else
|
||||
{
|
||||
// P_GivePlayerLives does value clamping
|
||||
players[consoleplayer].lives = 0;
|
||||
P_GivePlayerLives(&players[consoleplayer], atoi(COM_Argv(1)));
|
||||
}
|
||||
|
||||
G_SetGameModified(multiplayer);
|
||||
}
|
||||
|
|
21
src/m_menu.c
21
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 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 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[] = {
|
||||
{-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;
|
||||
ssize_t i, max;
|
||||
const char* topstr;
|
||||
|
||||
// hack - need to refresh at end of frame to handle addfile...
|
||||
if (refreshdirmenu & M_AddonsRefresh())
|
||||
|
@ -4949,9 +4950,16 @@ static void M_DrawAddons(void)
|
|||
if (addonsresponselimit)
|
||||
addonsresponselimit--;
|
||||
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, 4+offs, 0, (Playing()
|
||||
? "\x85""Adding files mid-game may cause problems."
|
||||
: LOCATIONSTRING));
|
||||
if (Playing())
|
||||
topstr = "\x85""Adding files mid-game may cause problems.";
|
||||
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)
|
||||
y = 0;
|
||||
|
@ -5266,7 +5274,10 @@ static void M_PandorasBox(INT32 choice)
|
|||
{
|
||||
(void)choice;
|
||||
CV_StealthSetValue(&cv_dummyrings, max(players[consoleplayer].rings, 0));
|
||||
CV_StealthSetValue(&cv_dummylives, players[consoleplayer].lives);
|
||||
if (players[consoleplayer].lives == 0x7f)
|
||||
CV_StealthSetValue(&cv_dummylives, -1);
|
||||
else
|
||||
CV_StealthSetValue(&cv_dummylives, players[consoleplayer].lives);
|
||||
CV_StealthSetValue(&cv_dummycontinues, players[consoleplayer].continues);
|
||||
SR_PandorasBox[6].status = ((players[consoleplayer].charflags & SF_SUPER)
|
||||
#ifndef DEVELOP
|
||||
|
|
|
@ -11391,7 +11391,8 @@ void A_ConnectToGround(mobj_t *actor)
|
|||
return;
|
||||
#endif
|
||||
|
||||
P_AdjustMobjFloorZ_FFloors(actor, actor->subsector->sector, 2);
|
||||
if (actor->subsector->sector->ffloors)
|
||||
P_AdjustMobjFloorZ_FFloors(actor, actor->subsector->sector, 2);
|
||||
|
||||
if (actor->flags2 & MF2_OBJECTFLIP)
|
||||
{
|
||||
|
@ -11406,15 +11407,18 @@ void A_ConnectToGround(mobj_t *actor)
|
|||
|
||||
if (locvar2)
|
||||
{
|
||||
workh = FixedMul(mobjinfo[locvar2].height, actor->scale);
|
||||
if (actor->flags2 & MF2_OBJECTFLIP)
|
||||
workz -= FixedMul(mobjinfo[locvar2].height, actor->scale);
|
||||
workz -= workh;
|
||||
work = P_SpawnMobjFromMobj(actor, 0, 0, workz, locvar2);
|
||||
workz += dir*workh;
|
||||
}
|
||||
|
||||
if (!locvar1)
|
||||
return;
|
||||
|
||||
workh = FixedMul(mobjinfo[locvar1].height, actor->scale);
|
||||
if (!(workh = FixedMul(mobjinfo[locvar1].height, actor->scale)))
|
||||
return;
|
||||
|
||||
if (actor->flags2 & MF2_OBJECTFLIP)
|
||||
workz -= workh;
|
||||
|
|
|
@ -2391,6 +2391,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
P_RemoveMobj(chain);
|
||||
chain = chainnext;
|
||||
}
|
||||
S_StopSound(target->tracer);
|
||||
P_KillMobj(target->tracer, inflictor, source, damagetype);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -3378,7 +3378,7 @@ boolean P_AddWadFile(const char *wadfilename)
|
|||
for (i = 0; i < numlumps; i++, lumpinfo++)
|
||||
{
|
||||
// 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("Music/", &musPos, &musNum, lumpinfo, &numlumps, &i);
|
||||
// lumpinfo = FindFolder("Sprites/", &sprPos, &sprNum, lumpinfo, &numlumps, &i);
|
||||
|
|
372
src/p_user.c
372
src/p_user.c
|
@ -283,9 +283,11 @@ boolean P_PlayerMoving(INT32 pnum)
|
|||
//
|
||||
UINT8 P_GetNextEmerald(void)
|
||||
{
|
||||
if (gamemap < sstage_start || gamemap > sstage_end)
|
||||
return 0;
|
||||
return (UINT8)(gamemap - sstage_start);
|
||||
if (gamemap >= sstage_start && gamemap <= sstage_end)
|
||||
return (UINT8)(gamemap - sstage_start);
|
||||
if (gamemap >= smpstage_start || gamemap <= smpstage_end)
|
||||
return (UINT8)(gamemap - smpstage_start);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -3491,194 +3493,198 @@ static void P_SetWeaponDelay(player_t *player, INT32 delay)
|
|||
static void P_DoFiring(player_t *player, ticcmd_t *cmd)
|
||||
{
|
||||
INT32 i;
|
||||
mobj_t *mo = NULL;
|
||||
|
||||
I_Assert(player != NULL);
|
||||
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)
|
||||
{
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
P_SpawnPlayerMissile(player->mo, MT_FIREBALL, 0);
|
||||
S_StartSound(player->mo, sfx_mario7);
|
||||
}
|
||||
else if (G_RingSlingerGametype() && (!G_TagGametype() || player->pflags & PF_TAGIT)
|
||||
&& !player->weapondelay && !player->climbing
|
||||
&& !(player->pflags & PF_ATTACKDOWN))
|
||||
{
|
||||
mobj_t *mo = NULL;
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
|
||||
#define TAKE_AMMO(player, power) \
|
||||
player->powers[power]--; \
|
||||
if (player->rings < 1) \
|
||||
{ \
|
||||
if (player->powers[power] > 0) \
|
||||
player->powers[power]--; \
|
||||
} \
|
||||
else \
|
||||
player->rings--;
|
||||
|
||||
if (cmd->buttons & BT_FIRENORMAL) // No powers, just a regular ring.
|
||||
goto firenormal; //code repetition sucks.
|
||||
// Bounce ring
|
||||
else if (player->currentweapon == WEP_BOUNCE && player->powers[pw_bouncering])
|
||||
{
|
||||
TAKE_AMMO(player, pw_bouncering);
|
||||
P_SetWeaponDelay(player, TICRATE/4);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNBOUNCE, MF2_BOUNCERING);
|
||||
|
||||
if (mo)
|
||||
mo->fuse = 3*TICRATE; // Bounce Ring time
|
||||
}
|
||||
// Rail ring
|
||||
else if (player->currentweapon == WEP_RAIL && player->powers[pw_railring])
|
||||
{
|
||||
TAKE_AMMO(player, pw_railring);
|
||||
P_SetWeaponDelay(player, (3*TICRATE)/2);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_REDRING, MF2_RAILRING|MF2_DONTDRAW);
|
||||
|
||||
// Rail has no unique thrown object, therefore its sound plays here.
|
||||
S_StartSound(player->mo, sfx_rail1);
|
||||
}
|
||||
// Automatic
|
||||
else if (player->currentweapon == WEP_AUTO && player->powers[pw_automaticring])
|
||||
{
|
||||
TAKE_AMMO(player, pw_automaticring);
|
||||
player->pflags &= ~PF_ATTACKDOWN;
|
||||
P_SetWeaponDelay(player, 2);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNAUTOMATIC, MF2_AUTOMATIC);
|
||||
}
|
||||
// Explosion
|
||||
else if (player->currentweapon == WEP_EXPLODE && player->powers[pw_explosionring])
|
||||
{
|
||||
TAKE_AMMO(player, pw_explosionring);
|
||||
P_SetWeaponDelay(player, (3*TICRATE)/2);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNEXPLOSION, MF2_EXPLOSION);
|
||||
}
|
||||
// Grenade
|
||||
else if (player->currentweapon == WEP_GRENADE && player->powers[pw_grenadering])
|
||||
{
|
||||
TAKE_AMMO(player, pw_grenadering);
|
||||
P_SetWeaponDelay(player, TICRATE/3);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNGRENADE, MF2_EXPLOSION);
|
||||
|
||||
if (mo)
|
||||
{
|
||||
//P_InstaThrust(mo, player->mo->angle, FixedMul(mo->info->speed, player->mo->scale));
|
||||
mo->fuse = mo->info->reactiontime;
|
||||
}
|
||||
}
|
||||
// Scatter
|
||||
// Note: Ignores MF2_RAILRING
|
||||
else if (player->currentweapon == WEP_SCATTER && player->powers[pw_scatterring])
|
||||
{
|
||||
fixed_t oldz = player->mo->z;
|
||||
angle_t shotangle = player->mo->angle;
|
||||
angle_t oldaiming = player->aiming;
|
||||
|
||||
TAKE_AMMO(player, pw_scatterring);
|
||||
P_SetWeaponDelay(player, (2*TICRATE)/3);
|
||||
|
||||
// Center
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNSCATTER, MF2_SCATTER);
|
||||
if (mo)
|
||||
shotangle = R_PointToAngle2(player->mo->x, player->mo->y, mo->x, mo->y);
|
||||
|
||||
// Left
|
||||
mo = P_SPMAngle(player->mo, MT_THROWNSCATTER, shotangle-ANG2, true, MF2_SCATTER);
|
||||
|
||||
// Right
|
||||
mo = P_SPMAngle(player->mo, MT_THROWNSCATTER, shotangle+ANG2, true, MF2_SCATTER);
|
||||
|
||||
// Down
|
||||
player->mo->z += FixedMul(12*FRACUNIT, player->mo->scale);
|
||||
player->aiming += ANG1;
|
||||
mo = P_SPMAngle(player->mo, MT_THROWNSCATTER, shotangle, true, MF2_SCATTER);
|
||||
|
||||
// Up
|
||||
player->mo->z -= FixedMul(24*FRACUNIT, player->mo->scale);
|
||||
player->aiming -= ANG2;
|
||||
mo = P_SPMAngle(player->mo, MT_THROWNSCATTER, shotangle, true, MF2_SCATTER);
|
||||
|
||||
player->mo->z = oldz;
|
||||
player->aiming = oldaiming;
|
||||
return;
|
||||
}
|
||||
// No powers, just a regular ring.
|
||||
else
|
||||
{
|
||||
firenormal:
|
||||
// Infinity ring was selected.
|
||||
// Mystic wants this ONLY to happen specifically if it's selected,
|
||||
// and to not be able to get around it EITHER WAY with firenormal.
|
||||
|
||||
// Infinity Ring
|
||||
if (player->currentweapon == 0
|
||||
&& player->powers[pw_infinityring])
|
||||
{
|
||||
P_SetWeaponDelay(player, TICRATE/4);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNINFINITY, 0);
|
||||
|
||||
player->powers[pw_infinityring]--;
|
||||
}
|
||||
// Red Ring
|
||||
else
|
||||
{
|
||||
if (player->rings <= 0)
|
||||
return;
|
||||
P_SetWeaponDelay(player, TICRATE/4);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_REDRING, 0);
|
||||
|
||||
if (mo)
|
||||
P_ColorTeamMissile(mo, player);
|
||||
|
||||
player->rings--;
|
||||
}
|
||||
}
|
||||
|
||||
#undef TAKE_AMMO
|
||||
|
||||
if (mo)
|
||||
{
|
||||
if (mo->flags & MF_MISSILE && mo->flags2 & MF2_RAILRING)
|
||||
{
|
||||
const boolean nblockmap = !(mo->flags & MF_NOBLOCKMAP);
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
if (nblockmap)
|
||||
{
|
||||
P_UnsetThingPosition(mo);
|
||||
mo->flags |= MF_NOBLOCKMAP;
|
||||
P_SetThingPosition(mo);
|
||||
}
|
||||
|
||||
if (i&1)
|
||||
P_SpawnMobj(mo->x, mo->y, mo->z, MT_SPARK);
|
||||
|
||||
if (P_RailThinker(mo))
|
||||
break; // mobj was removed (missile hit a wall) or couldn't move
|
||||
}
|
||||
|
||||
// Other rail sound plays at contact point.
|
||||
S_StartSound(mo, sfx_rail2);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Not holding any firing buttons anymore.
|
||||
// Release the grenade / whatever.
|
||||
player->pflags &= ~PF_ATTACKDOWN;
|
||||
return;
|
||||
}
|
||||
|
||||
// Not holding any firing buttons anymore.
|
||||
// Release the grenade / whatever.
|
||||
player->pflags &= ~PF_ATTACKDOWN;
|
||||
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;
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!G_RingSlingerGametype() || player->weapondelay)
|
||||
return;
|
||||
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
|
||||
#define TAKE_AMMO(player, power) \
|
||||
player->powers[power]--; \
|
||||
if (player->rings < 1) \
|
||||
{ \
|
||||
if (player->powers[power] > 0) \
|
||||
player->powers[power]--; \
|
||||
} \
|
||||
else \
|
||||
player->rings--;
|
||||
|
||||
if (cmd->buttons & BT_FIRENORMAL) // No powers, just a regular ring.
|
||||
goto firenormal; //code repetition sucks.
|
||||
// Bounce ring
|
||||
else if (player->currentweapon == WEP_BOUNCE && player->powers[pw_bouncering])
|
||||
{
|
||||
TAKE_AMMO(player, pw_bouncering);
|
||||
P_SetWeaponDelay(player, TICRATE/4);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNBOUNCE, MF2_BOUNCERING);
|
||||
|
||||
if (mo)
|
||||
mo->fuse = 3*TICRATE; // Bounce Ring time
|
||||
}
|
||||
// Rail ring
|
||||
else if (player->currentweapon == WEP_RAIL && player->powers[pw_railring])
|
||||
{
|
||||
TAKE_AMMO(player, pw_railring);
|
||||
P_SetWeaponDelay(player, (3*TICRATE)/2);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_REDRING, MF2_RAILRING|MF2_DONTDRAW);
|
||||
|
||||
// Rail has no unique thrown object, therefore its sound plays here.
|
||||
S_StartSound(player->mo, sfx_rail1);
|
||||
}
|
||||
// Automatic
|
||||
else if (player->currentweapon == WEP_AUTO && player->powers[pw_automaticring])
|
||||
{
|
||||
TAKE_AMMO(player, pw_automaticring);
|
||||
player->pflags &= ~PF_ATTACKDOWN;
|
||||
P_SetWeaponDelay(player, 2);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNAUTOMATIC, MF2_AUTOMATIC);
|
||||
}
|
||||
// Explosion
|
||||
else if (player->currentweapon == WEP_EXPLODE && player->powers[pw_explosionring])
|
||||
{
|
||||
TAKE_AMMO(player, pw_explosionring);
|
||||
P_SetWeaponDelay(player, (3*TICRATE)/2);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNEXPLOSION, MF2_EXPLOSION);
|
||||
}
|
||||
// Grenade
|
||||
else if (player->currentweapon == WEP_GRENADE && player->powers[pw_grenadering])
|
||||
{
|
||||
TAKE_AMMO(player, pw_grenadering);
|
||||
P_SetWeaponDelay(player, TICRATE/3);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNGRENADE, MF2_EXPLOSION);
|
||||
|
||||
if (mo)
|
||||
{
|
||||
//P_InstaThrust(mo, player->mo->angle, FixedMul(mo->info->speed, player->mo->scale));
|
||||
mo->fuse = mo->info->reactiontime;
|
||||
}
|
||||
}
|
||||
// Scatter
|
||||
// Note: Ignores MF2_RAILRING
|
||||
else if (player->currentweapon == WEP_SCATTER && player->powers[pw_scatterring])
|
||||
{
|
||||
fixed_t oldz = player->mo->z;
|
||||
angle_t shotangle = player->mo->angle;
|
||||
angle_t oldaiming = player->aiming;
|
||||
|
||||
TAKE_AMMO(player, pw_scatterring);
|
||||
P_SetWeaponDelay(player, (2*TICRATE)/3);
|
||||
|
||||
// Center
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNSCATTER, MF2_SCATTER);
|
||||
if (mo)
|
||||
shotangle = R_PointToAngle2(player->mo->x, player->mo->y, mo->x, mo->y);
|
||||
|
||||
// Left
|
||||
mo = P_SPMAngle(player->mo, MT_THROWNSCATTER, shotangle-ANG2, true, MF2_SCATTER);
|
||||
|
||||
// Right
|
||||
mo = P_SPMAngle(player->mo, MT_THROWNSCATTER, shotangle+ANG2, true, MF2_SCATTER);
|
||||
|
||||
// Down
|
||||
player->mo->z += FixedMul(12*FRACUNIT, player->mo->scale);
|
||||
player->aiming += ANG1;
|
||||
mo = P_SPMAngle(player->mo, MT_THROWNSCATTER, shotangle, true, MF2_SCATTER);
|
||||
|
||||
// Up
|
||||
player->mo->z -= FixedMul(24*FRACUNIT, player->mo->scale);
|
||||
player->aiming -= ANG2;
|
||||
mo = P_SPMAngle(player->mo, MT_THROWNSCATTER, shotangle, true, MF2_SCATTER);
|
||||
|
||||
player->mo->z = oldz;
|
||||
player->aiming = oldaiming;
|
||||
return;
|
||||
}
|
||||
// No powers, just a regular ring.
|
||||
else
|
||||
{
|
||||
firenormal:
|
||||
// Infinity ring was selected.
|
||||
// Mystic wants this ONLY to happen specifically if it's selected,
|
||||
// and to not be able to get around it EITHER WAY with firenormal.
|
||||
|
||||
// Infinity Ring
|
||||
if (player->currentweapon == 0
|
||||
&& player->powers[pw_infinityring])
|
||||
{
|
||||
P_SetWeaponDelay(player, TICRATE/4);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_THROWNINFINITY, 0);
|
||||
|
||||
player->powers[pw_infinityring]--;
|
||||
}
|
||||
// Red Ring
|
||||
else
|
||||
{
|
||||
if (player->rings <= 0)
|
||||
return;
|
||||
P_SetWeaponDelay(player, TICRATE/4);
|
||||
|
||||
mo = P_SpawnPlayerMissile(player->mo, MT_REDRING, 0);
|
||||
|
||||
if (mo)
|
||||
P_ColorTeamMissile(mo, player);
|
||||
|
||||
player->rings--;
|
||||
}
|
||||
}
|
||||
|
||||
#undef TAKE_AMMO
|
||||
|
||||
if (mo)
|
||||
{
|
||||
if (mo->flags & MF_MISSILE && mo->flags2 & MF2_RAILRING)
|
||||
{
|
||||
const boolean nblockmap = !(mo->flags & MF_NOBLOCKMAP);
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
if (nblockmap)
|
||||
{
|
||||
P_UnsetThingPosition(mo);
|
||||
mo->flags |= MF_NOBLOCKMAP;
|
||||
P_SetThingPosition(mo);
|
||||
}
|
||||
|
||||
if (i&1)
|
||||
P_SpawnMobj(mo->x, mo->y, mo->z, MT_SPARK);
|
||||
|
||||
if (P_RailThinker(mo))
|
||||
break; // mobj was removed (missile hit a wall) or couldn't move
|
||||
}
|
||||
|
||||
// Other rail sound plays at contact point.
|
||||
S_StartSound(mo, sfx_rail2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -240,8 +240,8 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
|
||||
// Mario
|
||||
{"koopfr" , true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Fire"},
|
||||
{"mario1", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hitting a ceiling"},
|
||||
{"mario2", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Koopa shell"},
|
||||
{"mario1", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hit"},
|
||||
{"mario2", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bonk"},
|
||||
{"mario3", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power-up"},
|
||||
{"mario4", true, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got coin"},
|
||||
{"mario5", false, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Boot-stomp"},
|
||||
|
|
|
@ -665,9 +665,9 @@ static void ST_drawTime(void)
|
|||
else
|
||||
{
|
||||
// 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)
|
||||
ST_drawRaceNum(tics);
|
||||
downwards = true;
|
||||
|
@ -675,15 +675,15 @@ static void ST_drawTime(void)
|
|||
else
|
||||
{
|
||||
// Hidetime finish!
|
||||
if ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK) && (leveltime < ((hidetime+1)*TICRATE)))
|
||||
ST_drawRaceNum(hidetime*TICRATE - leveltime);
|
||||
if ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK) && (stplyr->realtime < ((hidetime+1)*TICRATE)))
|
||||
ST_drawRaceNum(hidetime*TICRATE - stplyr->realtime);
|
||||
|
||||
// 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)
|
||||
ST_drawRaceNum(tics);
|
||||
}
|
||||
|
|
|
@ -194,11 +194,11 @@ static inline void W_LoadDehackedLumpsPK3(UINT16 wadnum)
|
|||
for (; posStart < posEnd; posStart++)
|
||||
LUA_LoadLump(wadnum, posStart);
|
||||
}
|
||||
posStart = W_CheckNumForFolderStartPK3("SOCs/", wadnum, 0);
|
||||
posStart = W_CheckNumForFolderStartPK3("SOC/", wadnum, 0);
|
||||
if (posStart != INT16_MAX)
|
||||
{
|
||||
posEnd = W_CheckNumForFolderEndPK3("SOCs/", wadnum, posStart);
|
||||
posStart++; // first "lump" will be "SOCs/" folder itself, so ignore it
|
||||
posEnd = W_CheckNumForFolderEndPK3("SOC/", wadnum, posStart);
|
||||
posStart++; // first "lump" will be "SOC/" folder itself, so ignore it
|
||||
for(; posStart < posEnd; posStart++)
|
||||
{
|
||||
lumpinfo_t *lump_p = &wadfiles[wadnum]->lumpinfo[posStart];
|
||||
|
|
|
@ -331,14 +331,15 @@ void Y_IntermissionDrawer(void)
|
|||
|
||||
if (animatetic && intertic >= animatetic)
|
||||
{
|
||||
const INT32 scradjust = (vid.width/vid.dupx)>>3; // 40 for BASEVIDWIDTH
|
||||
INT32 animatetimer = (intertic - animatetic);
|
||||
if (animatetimer <= 14)
|
||||
{
|
||||
xoffset1 = -(animatetimer * 40);
|
||||
xoffset2 = -((animatetimer-2) * 40);
|
||||
xoffset3 = -((animatetimer-4) * 40);
|
||||
xoffset4 = -((animatetimer-6) * 40);
|
||||
xoffset5 = -((animatetimer-8) * 40);
|
||||
xoffset1 = -(animatetimer * scradjust);
|
||||
xoffset2 = -((animatetimer-2) * scradjust);
|
||||
xoffset3 = -((animatetimer-4) * scradjust);
|
||||
xoffset4 = -((animatetimer-6) * scradjust);
|
||||
xoffset5 = -((animatetimer-8) * scradjust);
|
||||
if (xoffset2 > 0) xoffset2 = 0;
|
||||
if (xoffset3 > 0) xoffset3 = 0;
|
||||
if (xoffset4 > 0) xoffset4 = 0;
|
||||
|
@ -347,12 +348,12 @@ void Y_IntermissionDrawer(void)
|
|||
else if (animatetimer < 32)
|
||||
{
|
||||
drawsection = 1;
|
||||
xoffset1 = (22-animatetimer) * 40;
|
||||
xoffset2 = (24-animatetimer) * 40;
|
||||
xoffset3 = (26-animatetimer) * 40;
|
||||
xoffset4 = (28-animatetimer) * 40;
|
||||
xoffset5 = (30-animatetimer) * 40;
|
||||
xoffset6 = (32-animatetimer) * 40;
|
||||
xoffset1 = (22-animatetimer) * scradjust;
|
||||
xoffset2 = (24-animatetimer) * scradjust;
|
||||
xoffset3 = (26-animatetimer) * scradjust;
|
||||
xoffset4 = (28-animatetimer) * scradjust;
|
||||
xoffset5 = (30-animatetimer) * scradjust;
|
||||
xoffset6 = (32-animatetimer) * scradjust;
|
||||
if (xoffset1 < 0) xoffset1 = 0;
|
||||
if (xoffset2 < 0) xoffset2 = 0;
|
||||
if (xoffset3 < 0) xoffset3 = 0;
|
||||
|
@ -426,7 +427,7 @@ void Y_IntermissionDrawer(void)
|
|||
{
|
||||
boolean drawthistic = !(ALL7EMERALDS(emeralds) && (intertic & 1));
|
||||
INT32 emeraldx = 152 - 3*28;
|
||||
INT32 em = (gamemap - sstage_start);
|
||||
INT32 em = P_GetNextEmerald();
|
||||
|
||||
if (em == 7)
|
||||
{
|
||||
|
@ -1357,7 +1358,7 @@ void Y_StartIntermission(void)
|
|||
else
|
||||
strcpy(data.spec.passed1, "YOU GOT");
|
||||
strcpy(data.spec.passed2, "A CHAOS EMERALD");
|
||||
if (gamemap > (sstage_start + 5))
|
||||
if (P_GetNextEmerald() > 6)
|
||||
{
|
||||
data.spec.passed2[15] = '?';
|
||||
data.spec.passed2[16] = '\0';
|
||||
|
|
Loading…
Reference in a new issue