* Patch.pk3 as requested by literally everyone else on the team.
* Enable SECTORSPECIALAFTERTHINK since we probably really want to use that sloped lava wave in RVZ. * Allow for infinite lives to be set via the setlives command/Pandora's Box. * Refactor P_DoFiring(), with guidance from Sal. * Correct the CRAWLA HONCHO\nCAN NOW BECOME\nSUPER CRAWLA HONCHO sliding movement in non-green resolutions.
This commit is contained in:
parent
db8f3e83b2
commit
5032ae2552
|
@ -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
|
||||||
|
|
|
@ -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__
|
||||||
|
|
|
@ -899,9 +899,15 @@ void Command_Setlives_f(void)
|
||||||
|
|
||||||
if (COM_Argc() > 1)
|
if (COM_Argc() > 1)
|
||||||
{
|
{
|
||||||
// P_GivePlayerLives does value clamping
|
SINT8 lives = atoi(COM_Argv(1));
|
||||||
players[consoleplayer].lives = 0;
|
if (lives == -1)
|
||||||
P_GivePlayerLives(&players[consoleplayer], atoi(COM_Argv(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);
|
G_SetGameModified(multiplayer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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}
|
||||||
};
|
};
|
||||||
|
@ -5266,7 +5266,10 @@ 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));
|
||||||
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);
|
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)
|
||||||
#ifndef DEVELOP
|
#ifndef DEVELOP
|
||||||
|
|
365
src/p_user.c
365
src/p_user.c
|
@ -3491,194 +3491,199 @@ 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;
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not holding any firing buttons anymore.
|
if (player->pflags & PF_ATTACKDOWN || player->climbing || (G_TagGametype() && !(player->pflags & PF_TAGIT)))
|
||||||
// Release the grenade / whatever.
|
return;
|
||||||
player->pflags &= ~PF_ATTACKDOWN;
|
|
||||||
|
if ((player->powers[pw_shield] & SH_STACK) == SH_FIREFLOWER)
|
||||||
|
{
|
||||||
|
player->pflags |= PF_ATTACKDOWN;
|
||||||
|
mo = P_SpawnPlayerMissile(player->mo, MT_FIREBALL, 0);
|
||||||
|
if (mo && ((mo->info->speed>>FRACBITS) * mo->scale) < player->speed)
|
||||||
|
P_InstaThrust(mo, player->mo->angle, 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
|
// 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"},
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue