mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'lite-steer-option' into 'master'
Lite Steer profile option, itemstate pflags -> player.itemflags See merge request KartKrew/Kart!1611
This commit is contained in:
commit
c2d48e8ca7
23 changed files with 148 additions and 83 deletions
|
|
@ -906,6 +906,7 @@ void Dummymenuplayer_OnChange(void);
|
||||||
consvar_t cv_dummymenuplayer = MenuDummy("dummymenuplayer", "P1").onchange(Dummymenuplayer_OnChange).values({{0, "NOPE"}, {1, "P1"}, {2, "P2"}, {3, "P3"}, {4, "P4"}});
|
consvar_t cv_dummymenuplayer = MenuDummy("dummymenuplayer", "P1").onchange(Dummymenuplayer_OnChange).values({{0, "NOPE"}, {1, "P1"}, {2, "P2"}, {3, "P3"}, {4, "P4"}});
|
||||||
|
|
||||||
consvar_t cv_dummyprofileautoroulette = MenuDummy("dummyprofileautoroulette", "Off").on_off();
|
consvar_t cv_dummyprofileautoroulette = MenuDummy("dummyprofileautoroulette", "Off").on_off();
|
||||||
|
consvar_t cv_dummyprofilelitesteer = MenuDummy("dummyprofilelitesteer", "On").on_off();
|
||||||
consvar_t cv_dummyprofilekickstart = MenuDummy("dummyprofilekickstart", "Off").on_off();
|
consvar_t cv_dummyprofilekickstart = MenuDummy("dummyprofilekickstart", "Off").on_off();
|
||||||
consvar_t cv_dummyprofilename = MenuDummy("dummyprofilename", "");
|
consvar_t cv_dummyprofilename = MenuDummy("dummyprofilename", "");
|
||||||
consvar_t cv_dummyprofileplayername = MenuDummy("dummyprofileplayername", "");
|
consvar_t cv_dummyprofileplayername = MenuDummy("dummyprofileplayername", "");
|
||||||
|
|
@ -1012,6 +1013,13 @@ consvar_t cv_autoroulette[MAXSPLITSCREENPLAYERS] = {
|
||||||
Player("autoroulette4", "Off").on_off().onchange(weaponPrefChange4),
|
Player("autoroulette4", "Off").on_off().onchange(weaponPrefChange4),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
consvar_t cv_litesteer[MAXSPLITSCREENPLAYERS] = {
|
||||||
|
Player("litesteer", "On").on_off().onchange(weaponPrefChange),
|
||||||
|
Player("litesteer2", "On").on_off().onchange(weaponPrefChange2),
|
||||||
|
Player("litesteer3", "On").on_off().onchange(weaponPrefChange3),
|
||||||
|
Player("litesteer4", "On").on_off().onchange(weaponPrefChange4),
|
||||||
|
};
|
||||||
|
|
||||||
consvar_t cv_cam_dist[MAXSPLITSCREENPLAYERS] = {
|
consvar_t cv_cam_dist[MAXSPLITSCREENPLAYERS] = {
|
||||||
Player("cam_dist", "190").floating_point(),
|
Player("cam_dist", "190").floating_point(),
|
||||||
Player("cam2_dist", "190").floating_point(),
|
Player("cam2_dist", "190").floating_point(),
|
||||||
|
|
|
||||||
|
|
@ -1229,6 +1229,7 @@ enum {
|
||||||
WP_KICKSTARTACCEL = 1<<0,
|
WP_KICKSTARTACCEL = 1<<0,
|
||||||
WP_SHRINKME = 1<<1,
|
WP_SHRINKME = 1<<1,
|
||||||
WP_AUTOROULETTE = 1<<2,
|
WP_AUTOROULETTE = 1<<2,
|
||||||
|
WP_LITESTEER = 1<<3,
|
||||||
};
|
};
|
||||||
|
|
||||||
void WeaponPref_Send(UINT8 ssplayer)
|
void WeaponPref_Send(UINT8 ssplayer)
|
||||||
|
|
@ -1241,6 +1242,9 @@ void WeaponPref_Send(UINT8 ssplayer)
|
||||||
if (cv_autoroulette[ssplayer].value)
|
if (cv_autoroulette[ssplayer].value)
|
||||||
prefs |= WP_AUTOROULETTE;
|
prefs |= WP_AUTOROULETTE;
|
||||||
|
|
||||||
|
if (cv_litesteer[ssplayer].value)
|
||||||
|
prefs |= WP_LITESTEER;
|
||||||
|
|
||||||
if (cv_shrinkme[ssplayer].value)
|
if (cv_shrinkme[ssplayer].value)
|
||||||
prefs |= WP_SHRINKME;
|
prefs |= WP_SHRINKME;
|
||||||
|
|
||||||
|
|
@ -1259,6 +1263,9 @@ void WeaponPref_Save(UINT8 **cp, INT32 playernum)
|
||||||
if (player->pflags & PF_AUTOROULETTE)
|
if (player->pflags & PF_AUTOROULETTE)
|
||||||
prefs |= WP_AUTOROULETTE;
|
prefs |= WP_AUTOROULETTE;
|
||||||
|
|
||||||
|
if (player->pflags & PF_LITESTEER)
|
||||||
|
prefs |= WP_LITESTEER;
|
||||||
|
|
||||||
if (player->pflags & PF_SHRINKME)
|
if (player->pflags & PF_SHRINKME)
|
||||||
prefs |= WP_SHRINKME;
|
prefs |= WP_SHRINKME;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,14 @@ typedef enum
|
||||||
PST_REBORN
|
PST_REBORN
|
||||||
} playerstate_t;
|
} playerstate_t;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
IF_USERINGS = 1, // Have to be not holding the item button to change from using rings to using items (or vice versa) - prevents weirdness
|
||||||
|
IF_ITEMOUT = 1<<1, // Are you holding an item out?
|
||||||
|
IF_EGGMANOUT = 1<<2, // Eggman mark held, separate from IF_ITEMOUT so it doesn't stop you from getting items
|
||||||
|
IF_HOLDREADY = 1<<3, // Hold button-style item is ready to activate
|
||||||
|
} itemflags_t;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Player internal flags
|
// Player internal flags
|
||||||
//
|
//
|
||||||
|
|
@ -95,11 +103,9 @@ typedef enum
|
||||||
|
|
||||||
PF_RINGLOCK = 1<<13, // Prevent picking up rings while SPB is locked on
|
PF_RINGLOCK = 1<<13, // Prevent picking up rings while SPB is locked on
|
||||||
|
|
||||||
// The following four flags are mutually exclusive, although they can also all be off at the same time. If we ever run out of pflags, eventually turn them into a seperate five(+) mode UINT8..?
|
PF_LITESTEER = 1<<14, // Hold Down to shallow turn (digital only)
|
||||||
PF_USERINGS = 1<<14, // Have to be not holding the item button to change from using rings to using items (or vice versa) - prevents weirdness
|
|
||||||
PF_ITEMOUT = 1<<15, // Are you holding an item out?
|
//15-17 free, was previously itemflags stuff
|
||||||
PF_EGGMANOUT = 1<<16, // Eggman mark held, separate from PF_ITEMOUT so it doesn't stop you from getting items
|
|
||||||
PF_HOLDREADY = 1<<17, // Hold button-style item is ready to activate
|
|
||||||
|
|
||||||
PF_DRIFTINPUT = 1<<18, // Drifting!
|
PF_DRIFTINPUT = 1<<18, // Drifting!
|
||||||
PF_GETSPARKS = 1<<19, // Can get sparks
|
PF_GETSPARKS = 1<<19, // Can get sparks
|
||||||
|
|
@ -925,6 +931,8 @@ struct player_t
|
||||||
UINT8 ringboxdelay; // Delay until Ring Box auto-activates
|
UINT8 ringboxdelay; // Delay until Ring Box auto-activates
|
||||||
UINT8 ringboxaward; // Where did we stop?
|
UINT8 ringboxaward; // Where did we stop?
|
||||||
|
|
||||||
|
UINT8 itemflags; // holds IF_ flags (see itemflags_t)
|
||||||
|
|
||||||
fixed_t outrun; // Milky Way road effect
|
fixed_t outrun; // Milky Way road effect
|
||||||
|
|
||||||
uint8_t public_key[PUBKEYLENGTH];
|
uint8_t public_key[PUBKEYLENGTH];
|
||||||
|
|
|
||||||
|
|
@ -6093,11 +6093,10 @@ const char *const PLAYERFLAG_LIST[] = {
|
||||||
|
|
||||||
"RINGLOCK", // Prevent picking up rings while SPB is locked on
|
"RINGLOCK", // Prevent picking up rings while SPB is locked on
|
||||||
|
|
||||||
// The following four flags are mutually exclusive, although they can also all be off at the same time. If we ever run out of pflags, eventually turn them into a seperate five(+) mode UINT8..?
|
"LITESTEER", // Shallow digital turn with DOWN
|
||||||
"USERINGS", // Have to be not holding the item button to change from using rings to using items (or vice versa) - prevents weirdness
|
"\x01", // Free
|
||||||
"ITEMOUT", // Are you holding an item out?
|
"\x01", // Free
|
||||||
"EGGMANOUT", // Eggman mark held, separate from PF_ITEMOUT so it doesn't stop you from getting items
|
"\x01", // Free
|
||||||
"HOLDREADY", // Hold button-style item is ready to activate
|
|
||||||
|
|
||||||
"DRIFTINPUT", // Drifting!
|
"DRIFTINPUT", // Drifting!
|
||||||
"GETSPARKS", // Can get sparks
|
"GETSPARKS", // Can get sparks
|
||||||
|
|
|
||||||
|
|
@ -380,7 +380,7 @@ class TiccmdBuilder
|
||||||
// ugly with the current abstractions, though, and there's a fortunate trick here:
|
// ugly with the current abstractions, though, and there's a fortunate trick here:
|
||||||
// if you can input full strength turns on both axes, either you're using a fucking
|
// if you can input full strength turns on both axes, either you're using a fucking
|
||||||
// square gate, or you're not on an analog device.
|
// square gate, or you're not on an analog device.
|
||||||
if (joystickvector.yaxis >= JOYAXISRANGE && abs(cmd->turning) == KART_FULLTURN) // >= beacuse some analog devices can go past JOYAXISRANGE (?!)
|
if (cv_litesteer[ssplayer - 1].value && joystickvector.yaxis >= JOYAXISRANGE && abs(cmd->turning) == KART_FULLTURN) // >= beacuse some analog devices can go past JOYAXISRANGE (?!)
|
||||||
cmd->turning /= 2;
|
cmd->turning /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@ demoghost *ghosts = NULL;
|
||||||
#define DEMO_SHRINKME 0x04
|
#define DEMO_SHRINKME 0x04
|
||||||
#define DEMO_BOT 0x08
|
#define DEMO_BOT 0x08
|
||||||
#define DEMO_AUTOROULETTE 0x10
|
#define DEMO_AUTOROULETTE 0x10
|
||||||
|
#define DEMO_LITESTEER 0x20
|
||||||
|
|
||||||
// For demos
|
// For demos
|
||||||
#define ZT_FWD 0x0001
|
#define ZT_FWD 0x0001
|
||||||
|
|
@ -2480,6 +2481,8 @@ void G_BeginRecording(void)
|
||||||
i |= DEMO_KICKSTART;
|
i |= DEMO_KICKSTART;
|
||||||
if (player->pflags & PF_AUTOROULETTE)
|
if (player->pflags & PF_AUTOROULETTE)
|
||||||
i |= DEMO_AUTOROULETTE;
|
i |= DEMO_AUTOROULETTE;
|
||||||
|
if (player->pflags & PF_LITESTEER)
|
||||||
|
i |= DEMO_LITESTEER;
|
||||||
if (player->pflags & PF_SHRINKME)
|
if (player->pflags & PF_SHRINKME)
|
||||||
i |= DEMO_SHRINKME;
|
i |= DEMO_SHRINKME;
|
||||||
if (player->bot == true)
|
if (player->bot == true)
|
||||||
|
|
@ -3447,6 +3450,11 @@ void G_DoPlayDemo(const char *defdemoname)
|
||||||
else
|
else
|
||||||
players[p].pflags &= ~PF_AUTOROULETTE;
|
players[p].pflags &= ~PF_AUTOROULETTE;
|
||||||
|
|
||||||
|
if (flags & DEMO_LITESTEER)
|
||||||
|
players[p].pflags |= PF_LITESTEER;
|
||||||
|
else
|
||||||
|
players[p].pflags &= ~PF_LITESTEER;
|
||||||
|
|
||||||
if (flags & DEMO_SHRINKME)
|
if (flags & DEMO_SHRINKME)
|
||||||
players[p].pflags |= PF_SHRINKME;
|
players[p].pflags |= PF_SHRINKME;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -2127,7 +2127,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
totalring = players[player].totalring;
|
totalring = players[player].totalring;
|
||||||
xtralife = players[player].xtralife;
|
xtralife = players[player].xtralife;
|
||||||
|
|
||||||
pflags = (players[player].pflags & (PF_WANTSTOJOIN|PF_KICKSTARTACCEL|PF_SHRINKME|PF_SHRINKACTIVE|PF_AUTOROULETTE));
|
pflags = (players[player].pflags & (PF_WANTSTOJOIN|PF_KICKSTARTACCEL|PF_SHRINKME|PF_SHRINKACTIVE|PF_AUTOROULETTE|PF_LITESTEER));
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
memcpy(&itemRoulette, &players[player].itemRoulette, sizeof (itemRoulette));
|
memcpy(&itemRoulette, &players[player].itemRoulette, sizeof (itemRoulette));
|
||||||
|
|
@ -2175,7 +2175,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (players[player].pflags & PF_ITEMOUT)
|
if (players[player].itemflags & IF_ITEMOUT)
|
||||||
{
|
{
|
||||||
itemtype = 0;
|
itemtype = 0;
|
||||||
itemamount = 0;
|
itemamount = 0;
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ extern consvar_t cv_pauseifunfocused;
|
||||||
|
|
||||||
extern consvar_t cv_kickstartaccel[MAXSPLITSCREENPLAYERS];
|
extern consvar_t cv_kickstartaccel[MAXSPLITSCREENPLAYERS];
|
||||||
extern consvar_t cv_autoroulette[MAXSPLITSCREENPLAYERS];
|
extern consvar_t cv_autoroulette[MAXSPLITSCREENPLAYERS];
|
||||||
|
extern consvar_t cv_litesteer[MAXSPLITSCREENPLAYERS];
|
||||||
extern consvar_t cv_shrinkme[MAXSPLITSCREENPLAYERS];
|
extern consvar_t cv_shrinkme[MAXSPLITSCREENPLAYERS];
|
||||||
|
|
||||||
extern consvar_t cv_deadzone[MAXSPLITSCREENPLAYERS];
|
extern consvar_t cv_deadzone[MAXSPLITSCREENPLAYERS];
|
||||||
|
|
|
||||||
|
|
@ -440,7 +440,7 @@ static boolean K_BotRevealsGenericTrap(player_t *player, INT16 turnamt, boolean
|
||||||
--------------------------------------------------*/
|
--------------------------------------------------*/
|
||||||
static void K_BotItemGenericTrapShield(player_t *player, ticcmd_t *cmd, INT16 turnamt, boolean mine)
|
static void K_BotItemGenericTrapShield(player_t *player, ticcmd_t *cmd, INT16 turnamt, boolean mine)
|
||||||
{
|
{
|
||||||
if (player->pflags & PF_ITEMOUT)
|
if (player->itemflags & IF_ITEMOUT)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -465,7 +465,7 @@ static void K_BotItemGenericTrapShield(player_t *player, ticcmd_t *cmd, INT16 tu
|
||||||
--------------------------------------------------*/
|
--------------------------------------------------*/
|
||||||
static void K_BotItemGenericOrbitShield(player_t *player, ticcmd_t *cmd)
|
static void K_BotItemGenericOrbitShield(player_t *player, ticcmd_t *cmd)
|
||||||
{
|
{
|
||||||
if (player->pflags & PF_ITEMOUT)
|
if (player->itemflags & IF_ITEMOUT)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -811,7 +811,7 @@ static boolean K_BotRevealsEggbox(player_t *player)
|
||||||
--------------------------------------------------*/
|
--------------------------------------------------*/
|
||||||
static void K_BotItemEggmanShield(player_t *player, ticcmd_t *cmd)
|
static void K_BotItemEggmanShield(player_t *player, ticcmd_t *cmd)
|
||||||
{
|
{
|
||||||
if (player->pflags & PF_EGGMANOUT)
|
if (player->itemflags & IF_EGGMANOUT)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1221,7 +1221,7 @@ static void K_BotItemBubble(player_t *player, ticcmd_t *cmd)
|
||||||
hold = true;
|
hold = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hold && (player->pflags & PF_HOLDREADY))
|
if (hold && (player->itemflags & IF_HOLDREADY))
|
||||||
{
|
{
|
||||||
cmd->buttons |= BT_ATTACK;
|
cmd->buttons |= BT_ATTACK;
|
||||||
}
|
}
|
||||||
|
|
@ -1245,7 +1245,7 @@ static void K_BotItemFlame(player_t *player, ticcmd_t *cmd)
|
||||||
{
|
{
|
||||||
player->botvars.itemconfirm--;
|
player->botvars.itemconfirm--;
|
||||||
}
|
}
|
||||||
else if (player->pflags & PF_HOLDREADY)
|
else if (player->itemflags & IF_HOLDREADY)
|
||||||
{
|
{
|
||||||
INT32 flamemax = player->flamelength;
|
INT32 flamemax = player->flamelength;
|
||||||
|
|
||||||
|
|
@ -1532,7 +1532,7 @@ static void K_BotItemRouletteMash(player_t *player, ticcmd_t *cmd)
|
||||||
--------------------------------------------------*/
|
--------------------------------------------------*/
|
||||||
void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
|
void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
|
||||||
{
|
{
|
||||||
if (player->pflags & PF_USERINGS)
|
if (player->itemflags & IF_USERINGS)
|
||||||
{
|
{
|
||||||
if (player->rings > 0)
|
if (player->rings > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -1567,7 +1567,7 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
|
||||||
{
|
{
|
||||||
K_BotItemEggmanExplosion(player, cmd);
|
K_BotItemEggmanExplosion(player, cmd);
|
||||||
}
|
}
|
||||||
else if (player->pflags & PF_EGGMANOUT)
|
else if (player->itemflags & IF_EGGMANOUT)
|
||||||
{
|
{
|
||||||
K_BotItemEggman(player, cmd);
|
K_BotItemEggman(player, cmd);
|
||||||
}
|
}
|
||||||
|
|
@ -1604,7 +1604,7 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
|
||||||
K_BotItemSneaker(player, cmd);
|
K_BotItemSneaker(player, cmd);
|
||||||
break;
|
break;
|
||||||
case KITEM_BANANA:
|
case KITEM_BANANA:
|
||||||
if (!(player->pflags & PF_ITEMOUT))
|
if (!(player->itemflags & IF_ITEMOUT))
|
||||||
{
|
{
|
||||||
K_BotItemGenericTrapShield(player, cmd, turnamt, false);
|
K_BotItemGenericTrapShield(player, cmd, turnamt, false);
|
||||||
}
|
}
|
||||||
|
|
@ -1617,7 +1617,7 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
|
||||||
K_BotItemEggmanShield(player, cmd);
|
K_BotItemEggmanShield(player, cmd);
|
||||||
break;
|
break;
|
||||||
case KITEM_ORBINAUT:
|
case KITEM_ORBINAUT:
|
||||||
if (!(player->pflags & PF_ITEMOUT))
|
if (!(player->itemflags & IF_ITEMOUT))
|
||||||
{
|
{
|
||||||
K_BotItemGenericOrbitShield(player, cmd);
|
K_BotItemGenericOrbitShield(player, cmd);
|
||||||
}
|
}
|
||||||
|
|
@ -1627,7 +1627,7 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KITEM_JAWZ:
|
case KITEM_JAWZ:
|
||||||
if (!(player->pflags & PF_ITEMOUT))
|
if (!(player->itemflags & IF_ITEMOUT))
|
||||||
{
|
{
|
||||||
K_BotItemGenericOrbitShield(player, cmd);
|
K_BotItemGenericOrbitShield(player, cmd);
|
||||||
}
|
}
|
||||||
|
|
@ -1637,7 +1637,7 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KITEM_MINE:
|
case KITEM_MINE:
|
||||||
if (!(player->pflags & PF_ITEMOUT))
|
if (!(player->itemflags & IF_ITEMOUT))
|
||||||
{
|
{
|
||||||
K_BotItemGenericTrapShield(player, cmd, turnamt, true);
|
K_BotItemGenericTrapShield(player, cmd, turnamt, true);
|
||||||
}
|
}
|
||||||
|
|
@ -1654,7 +1654,7 @@ void K_BotItemUsage(player_t *player, ticcmd_t *cmd, INT16 turnamt)
|
||||||
K_BotItemBallhog(player, cmd);
|
K_BotItemBallhog(player, cmd);
|
||||||
break;
|
break;
|
||||||
case KITEM_DROPTARGET:
|
case KITEM_DROPTARGET:
|
||||||
if (!(player->pflags & PF_ITEMOUT))
|
if (!(player->itemflags & IF_ITEMOUT))
|
||||||
{
|
{
|
||||||
K_BotItemGenericTrapShield(player, cmd, turnamt, false);
|
K_BotItemGenericTrapShield(player, cmd, turnamt, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -577,8 +577,8 @@ static BlockItReturn_t K_FindObjectsForNudging(mobj_t *thing)
|
||||||
}
|
}
|
||||||
// Has held item shield
|
// Has held item shield
|
||||||
else if (K_PlayerAttackSteer(thing, side, 20,
|
else if (K_PlayerAttackSteer(thing, side, 20,
|
||||||
(thing->player->pflags & (PF_ITEMOUT|PF_EGGMANOUT)),
|
(thing->player->itemflags & (IF_ITEMOUT|IF_EGGMANOUT)),
|
||||||
(g_nudgeSearch.botmo->player->pflags & (PF_ITEMOUT|PF_EGGMANOUT))
|
(g_nudgeSearch.botmo->player->itemflags & (IF_ITEMOUT|IF_EGGMANOUT))
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ boolean K_EggItemCollide(mobj_t *t1, mobj_t *t2)
|
||||||
if (t1->target->hnext == t1)
|
if (t1->target->hnext == t1)
|
||||||
{
|
{
|
||||||
P_SetTarget(&t1->target->hnext, NULL);
|
P_SetTarget(&t1->target->hnext, NULL);
|
||||||
t1->target->player->pflags &= ~PF_EGGMANOUT;
|
t1->target->player->itemflags &= ~IF_EGGMANOUT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1453,7 +1453,7 @@ static void K_drawKartItem(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((stplyr->pflags & PF_ITEMOUT) && !(leveltime & 1))
|
if ((stplyr->itemflags & IF_ITEMOUT) && !(leveltime & 1))
|
||||||
localpatch[1] = kp_nodraw;
|
localpatch[1] = kp_nodraw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
90
src/k_kart.c
90
src/k_kart.c
|
|
@ -6629,11 +6629,11 @@ void K_DropHnextList(player_t *player)
|
||||||
|
|
||||||
player->bananadrag = 0;
|
player->bananadrag = 0;
|
||||||
|
|
||||||
if (player->pflags & PF_EGGMANOUT)
|
if (player->itemflags & IF_EGGMANOUT)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_EGGMANOUT;
|
player->itemflags &= ~IF_EGGMANOUT;
|
||||||
}
|
}
|
||||||
else if ((player->pflags & PF_ITEMOUT)
|
else if ((player->itemflags & IF_ITEMOUT)
|
||||||
&& (dropall || (--player->itemamount <= 0)))
|
&& (dropall || (--player->itemamount <= 0)))
|
||||||
{
|
{
|
||||||
player->itemamount = 0;
|
player->itemamount = 0;
|
||||||
|
|
@ -7026,11 +7026,11 @@ static void K_MoveHeldObjects(player_t *player)
|
||||||
{
|
{
|
||||||
player->bananadrag = 0;
|
player->bananadrag = 0;
|
||||||
|
|
||||||
if (player->pflags & PF_EGGMANOUT)
|
if (player->itemflags & IF_EGGMANOUT)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_EGGMANOUT;
|
player->itemflags &= ~IF_EGGMANOUT;
|
||||||
}
|
}
|
||||||
else if (player->pflags & PF_ITEMOUT)
|
else if (player->itemflags & IF_ITEMOUT)
|
||||||
{
|
{
|
||||||
player->itemamount = 0;
|
player->itemamount = 0;
|
||||||
K_UnsetItemOut(player);
|
K_UnsetItemOut(player);
|
||||||
|
|
@ -7045,11 +7045,11 @@ static void K_MoveHeldObjects(player_t *player)
|
||||||
P_SetTarget(&player->mo->hnext, NULL);
|
P_SetTarget(&player->mo->hnext, NULL);
|
||||||
player->bananadrag = 0;
|
player->bananadrag = 0;
|
||||||
|
|
||||||
if (player->pflags & PF_EGGMANOUT)
|
if (player->itemflags & IF_EGGMANOUT)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_EGGMANOUT;
|
player->itemflags &= ~IF_EGGMANOUT;
|
||||||
}
|
}
|
||||||
else if (player->pflags & PF_ITEMOUT)
|
else if (player->itemflags & IF_ITEMOUT)
|
||||||
{
|
{
|
||||||
player->itemamount = 0;
|
player->itemamount = 0;
|
||||||
K_UnsetItemOut(player);
|
K_UnsetItemOut(player);
|
||||||
|
|
@ -8033,7 +8033,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->itemtype == KITEM_NONE)
|
if (player->itemtype == KITEM_NONE)
|
||||||
player->pflags &= ~PF_HOLDREADY;
|
player->itemflags &= ~IF_HOLDREADY;
|
||||||
|
|
||||||
// DKR style camera for boosting
|
// DKR style camera for boosting
|
||||||
if (player->karthud[khud_boostcam] != 0 || player->karthud[khud_destboostcam] != 0)
|
if (player->karthud[khud_boostcam] != 0 || player->karthud[khud_destboostcam] != 0)
|
||||||
|
|
@ -8378,7 +8378,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
S_StopSoundByID(player->mo, sfx_wchrg2);
|
S_StopSoundByID(player->mo, sfx_wchrg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->itemamount || player->respawn.state != RESPAWNST_NONE || player->pflags & (PF_ITEMOUT|PF_EGGMANOUT) || player->rocketsneakertimer || player->ringboxdelay)
|
if (player->itemamount || player->respawn.state != RESPAWNST_NONE || player->itemflags & (IF_ITEMOUT|IF_EGGMANOUT) || player->rocketsneakertimer || player->ringboxdelay)
|
||||||
player->instaWhipCharge = 0;
|
player->instaWhipCharge = 0;
|
||||||
|
|
||||||
if (player->tiregrease)
|
if (player->tiregrease)
|
||||||
|
|
@ -8707,7 +8707,7 @@ void K_KartPlayerAfterThink(player_t *player)
|
||||||
K_MoveHeldObjects(player);
|
K_MoveHeldObjects(player);
|
||||||
|
|
||||||
// Jawz reticule (seeking)
|
// Jawz reticule (seeking)
|
||||||
if (player->itemtype == KITEM_JAWZ && (player->pflags & PF_ITEMOUT))
|
if (player->itemtype == KITEM_JAWZ && (player->itemflags & IF_ITEMOUT))
|
||||||
{
|
{
|
||||||
const INT32 lastTargID = player->lastjawztarget;
|
const INT32 lastTargID = player->lastjawztarget;
|
||||||
mobj_t *lastTarg = NULL;
|
mobj_t *lastTarg = NULL;
|
||||||
|
|
@ -10178,7 +10178,7 @@ void K_StripItems(player_t *player)
|
||||||
K_DropKitchenSink(player);
|
K_DropKitchenSink(player);
|
||||||
player->itemtype = KITEM_NONE;
|
player->itemtype = KITEM_NONE;
|
||||||
player->itemamount = 0;
|
player->itemamount = 0;
|
||||||
player->pflags &= ~(PF_ITEMOUT|PF_EGGMANOUT);
|
player->itemflags &= ~(IF_ITEMOUT|IF_EGGMANOUT);
|
||||||
|
|
||||||
if (player->itemRoulette.eggman == false)
|
if (player->itemRoulette.eggman == false)
|
||||||
{
|
{
|
||||||
|
|
@ -11021,7 +11021,7 @@ static void K_trickPanelTimingVisual(player_t *player, fixed_t momz)
|
||||||
|
|
||||||
void K_SetItemOut(player_t *player)
|
void K_SetItemOut(player_t *player)
|
||||||
{
|
{
|
||||||
player->pflags |= PF_ITEMOUT;
|
player->itemflags |= IF_ITEMOUT;
|
||||||
|
|
||||||
if (player->mo->scale >= FixedMul(GROW_PHYSICS_SCALE, mapobjectscale))
|
if (player->mo->scale >= FixedMul(GROW_PHYSICS_SCALE, mapobjectscale))
|
||||||
{
|
{
|
||||||
|
|
@ -11039,7 +11039,7 @@ void K_SetItemOut(player_t *player)
|
||||||
|
|
||||||
void K_UnsetItemOut(player_t *player)
|
void K_UnsetItemOut(player_t *player)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_ITEMOUT;
|
player->itemflags &= ~IF_ITEMOUT;
|
||||||
player->itemscale = ITEMSCALE_NORMAL;
|
player->itemscale = ITEMSCALE_NORMAL;
|
||||||
player->bananadrag = 0;
|
player->bananadrag = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -11051,7 +11051,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
{
|
{
|
||||||
ticcmd_t *cmd = &player->cmd;
|
ticcmd_t *cmd = &player->cmd;
|
||||||
boolean ATTACK_IS_DOWN = ((cmd->buttons & BT_ATTACK) && !(player->oldcmd.buttons & BT_ATTACK) && (player->respawn.state == RESPAWNST_NONE));
|
boolean ATTACK_IS_DOWN = ((cmd->buttons & BT_ATTACK) && !(player->oldcmd.buttons & BT_ATTACK) && (player->respawn.state == RESPAWNST_NONE));
|
||||||
boolean HOLDING_ITEM = (player->pflags & (PF_ITEMOUT|PF_EGGMANOUT));
|
boolean HOLDING_ITEM = (player->itemflags & (IF_ITEMOUT|IF_EGGMANOUT));
|
||||||
boolean NO_HYUDORO = (player->stealingtimer == 0);
|
boolean NO_HYUDORO = (player->stealingtimer == 0);
|
||||||
|
|
||||||
if (!player->exiting)
|
if (!player->exiting)
|
||||||
|
|
@ -11077,9 +11077,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
|| player->itemRoulette.active == true
|
|| player->itemRoulette.active == true
|
||||||
|| player->rocketsneakertimer
|
|| player->rocketsneakertimer
|
||||||
|| player->eggmanexplode))
|
|| player->eggmanexplode))
|
||||||
player->pflags |= PF_USERINGS;
|
player->itemflags |= IF_USERINGS;
|
||||||
else
|
else
|
||||||
player->pflags &= ~PF_USERINGS;
|
player->itemflags &= ~IF_USERINGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->ringboxdelay)
|
if (player->ringboxdelay)
|
||||||
|
|
@ -11120,7 +11120,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
player->instaWhipCooldown = 0;
|
player->instaWhipCooldown = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (leveltime < starttime || player->pflags & (PF_ITEMOUT|PF_EGGMANOUT) || player->rocketsneakertimer || player->instaWhipCooldown)
|
if (leveltime < starttime || player->itemflags & (IF_ITEMOUT|IF_EGGMANOUT) || player->rocketsneakertimer || player->instaWhipCooldown)
|
||||||
{
|
{
|
||||||
chargingwhip = false;
|
chargingwhip = false;
|
||||||
player->instaWhipCharge = 0;
|
player->instaWhipCharge = 0;
|
||||||
|
|
@ -11194,7 +11194,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
// First, the really specific, finicky items that function without the item being directly in your item slot.
|
// First, the really specific, finicky items that function without the item being directly in your item slot.
|
||||||
{
|
{
|
||||||
// Ring boosting
|
// Ring boosting
|
||||||
if (player->pflags & PF_USERINGS)
|
if (player->itemflags & IF_USERINGS)
|
||||||
{
|
{
|
||||||
if ((cmd->buttons & BT_ATTACK) && !player->ringdelay && player->rings > 0)
|
if ((cmd->buttons & BT_ATTACK) && !player->ringdelay && player->rings > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -11218,13 +11218,13 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
player->eggmanexplode = 1;
|
player->eggmanexplode = 1;
|
||||||
}
|
}
|
||||||
// Eggman Monitor throwing
|
// Eggman Monitor throwing
|
||||||
else if (player->pflags & PF_EGGMANOUT)
|
else if (player->itemflags & IF_EGGMANOUT)
|
||||||
{
|
{
|
||||||
if (ATTACK_IS_DOWN)
|
if (ATTACK_IS_DOWN)
|
||||||
{
|
{
|
||||||
K_ThrowKartItem(player, false, MT_EGGMANITEM, -1, 0, 0);
|
K_ThrowKartItem(player, false, MT_EGGMANITEM, -1, 0, 0);
|
||||||
K_PlayAttackTaunt(player->mo);
|
K_PlayAttackTaunt(player->mo);
|
||||||
player->pflags &= ~PF_EGGMANOUT;
|
player->itemflags &= ~IF_EGGMANOUT;
|
||||||
K_UpdateHnextList(player, true);
|
K_UpdateHnextList(player, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -11328,7 +11328,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
prev = mo;
|
prev = mo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ATTACK_IS_DOWN && (player->pflags & PF_ITEMOUT)) // Banana x3 thrown
|
else if (ATTACK_IS_DOWN && (player->itemflags & IF_ITEMOUT)) // Banana x3 thrown
|
||||||
{
|
{
|
||||||
K_ThrowKartItem(player, false, MT_BANANA, -1, 0, 0);
|
K_ThrowKartItem(player, false, MT_BANANA, -1, 0, 0);
|
||||||
K_PlayAttackTaunt(player->mo);
|
K_PlayAttackTaunt(player->mo);
|
||||||
|
|
@ -11341,7 +11341,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
{
|
{
|
||||||
mobj_t *mo;
|
mobj_t *mo;
|
||||||
player->itemamount--;
|
player->itemamount--;
|
||||||
player->pflags |= PF_EGGMANOUT;
|
player->itemflags |= IF_EGGMANOUT;
|
||||||
S_StartSound(player->mo, sfx_s254);
|
S_StartSound(player->mo, sfx_s254);
|
||||||
mo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EGGMANITEM_SHIELD);
|
mo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EGGMANITEM_SHIELD);
|
||||||
if (mo)
|
if (mo)
|
||||||
|
|
@ -11391,7 +11391,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
prev = mo;
|
prev = mo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ATTACK_IS_DOWN && (player->pflags & PF_ITEMOUT)) // Orbinaut x3 thrown
|
else if (ATTACK_IS_DOWN && (player->itemflags & IF_ITEMOUT)) // Orbinaut x3 thrown
|
||||||
{
|
{
|
||||||
K_ThrowKartItem(player, true, MT_ORBINAUT, 1, 0, 0);
|
K_ThrowKartItem(player, true, MT_ORBINAUT, 1, 0, 0);
|
||||||
K_PlayAttackTaunt(player->mo);
|
K_PlayAttackTaunt(player->mo);
|
||||||
|
|
@ -11432,7 +11432,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
prev = mo;
|
prev = mo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ATTACK_IS_DOWN && HOLDING_ITEM && (player->pflags & PF_ITEMOUT)) // Jawz thrown
|
else if (ATTACK_IS_DOWN && HOLDING_ITEM && (player->itemflags & IF_ITEMOUT)) // Jawz thrown
|
||||||
{
|
{
|
||||||
K_ThrowKartItem(player, true, MT_JAWZ, 1, 0, 0);
|
K_ThrowKartItem(player, true, MT_JAWZ, 1, 0, 0);
|
||||||
K_PlayAttackTaunt(player->mo);
|
K_PlayAttackTaunt(player->mo);
|
||||||
|
|
@ -11458,12 +11458,12 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
P_SetTarget(&player->mo->hnext, mo);
|
P_SetTarget(&player->mo->hnext, mo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ATTACK_IS_DOWN && (player->pflags & PF_ITEMOUT))
|
else if (ATTACK_IS_DOWN && (player->itemflags & IF_ITEMOUT))
|
||||||
{
|
{
|
||||||
K_ThrowKartItem(player, false, MT_SSMINE, 1, 1, 0);
|
K_ThrowKartItem(player, false, MT_SSMINE, 1, 1, 0);
|
||||||
K_PlayAttackTaunt(player->mo);
|
K_PlayAttackTaunt(player->mo);
|
||||||
player->itemamount--;
|
player->itemamount--;
|
||||||
player->pflags &= ~PF_ITEMOUT;
|
player->itemflags &= ~IF_ITEMOUT;
|
||||||
K_UpdateHnextList(player, true);
|
K_UpdateHnextList(player, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -11493,12 +11493,12 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
P_SetTarget(&player->mo->hnext, mo);
|
P_SetTarget(&player->mo->hnext, mo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ATTACK_IS_DOWN && (player->pflags & PF_ITEMOUT))
|
else if (ATTACK_IS_DOWN && (player->itemflags & IF_ITEMOUT))
|
||||||
{
|
{
|
||||||
K_ThrowKartItem(player, (player->throwdir > 0), MT_DROPTARGET, -1, 0, 0);
|
K_ThrowKartItem(player, (player->throwdir > 0), MT_DROPTARGET, -1, 0, 0);
|
||||||
K_PlayAttackTaunt(player->mo);
|
K_PlayAttackTaunt(player->mo);
|
||||||
player->itemamount--;
|
player->itemamount--;
|
||||||
player->pflags &= ~PF_ITEMOUT;
|
player->itemflags &= ~IF_ITEMOUT;
|
||||||
K_UpdateHnextList(player, true);
|
K_UpdateHnextList(player, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -11518,7 +11518,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
if (player->ballhogcharge == 0)
|
if (player->ballhogcharge == 0)
|
||||||
player->ballhogtap = false;
|
player->ballhogtap = false;
|
||||||
|
|
||||||
boolean realcharge = (cmd->buttons & BT_ATTACK) && (player->pflags & PF_HOLDREADY) && (player->ballhogcharge < ballhogmax);
|
boolean realcharge = (cmd->buttons & BT_ATTACK) && (player->itemflags & IF_HOLDREADY) && (player->ballhogcharge < ballhogmax);
|
||||||
if ((realcharge && !player->ballhogtap) || (player->ballhogtap && player->ballhogcharge < BALLHOGINCREMENT))
|
if ((realcharge && !player->ballhogtap) || (player->ballhogtap && player->ballhogcharge < BALLHOGINCREMENT))
|
||||||
{
|
{
|
||||||
player->ballhogcharge++;
|
player->ballhogcharge++;
|
||||||
|
|
@ -11541,11 +11541,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
{
|
{
|
||||||
if (cmd->buttons & BT_ATTACK)
|
if (cmd->buttons & BT_ATTACK)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_HOLDREADY;
|
player->itemflags &= ~IF_HOLDREADY;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->pflags |= PF_HOLDREADY;
|
player->itemflags |= IF_HOLDREADY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->ballhogcharge > 0)
|
if (player->ballhogcharge > 0)
|
||||||
|
|
@ -11581,7 +11581,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
}
|
}
|
||||||
|
|
||||||
player->ballhogcharge = 0;
|
player->ballhogcharge = 0;
|
||||||
player->pflags &= ~PF_HOLDREADY;
|
player->itemflags &= ~IF_HOLDREADY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -11715,7 +11715,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
|
|
||||||
if (!HOLDING_ITEM && NO_HYUDORO)
|
if (!HOLDING_ITEM && NO_HYUDORO)
|
||||||
{
|
{
|
||||||
if ((cmd->buttons & BT_ATTACK) && (player->pflags & PF_HOLDREADY))
|
if ((cmd->buttons & BT_ATTACK) && (player->itemflags & IF_HOLDREADY))
|
||||||
{
|
{
|
||||||
if (player->bubbleblowup == 0)
|
if (player->bubbleblowup == 0)
|
||||||
S_StartSound(player->mo, sfx_s3k75);
|
S_StartSound(player->mo, sfx_s3k75);
|
||||||
|
|
@ -11735,7 +11735,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
K_PlayAttackTaunt(player->mo);
|
K_PlayAttackTaunt(player->mo);
|
||||||
player->bubbleblowup = 0;
|
player->bubbleblowup = 0;
|
||||||
player->bubblecool = 0;
|
player->bubblecool = 0;
|
||||||
player->pflags &= ~PF_HOLDREADY;
|
player->itemflags &= ~IF_HOLDREADY;
|
||||||
player->itemamount--;
|
player->itemamount--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -11748,9 +11748,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
player->bubbleblowup--;
|
player->bubbleblowup--;
|
||||||
|
|
||||||
if (player->bubblecool)
|
if (player->bubblecool)
|
||||||
player->pflags &= ~PF_HOLDREADY;
|
player->itemflags &= ~IF_HOLDREADY;
|
||||||
else
|
else
|
||||||
player->pflags |= PF_HOLDREADY;
|
player->itemflags |= IF_HOLDREADY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -11774,7 +11774,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
|
|
||||||
flamemax = player->flamelength + TICRATE; // TICRATE leniency period, but we block most effects at flamelength 0 down below
|
flamemax = player->flamelength + TICRATE; // TICRATE leniency period, but we block most effects at flamelength 0 down below
|
||||||
|
|
||||||
if ((cmd->buttons & BT_ATTACK) && (player->pflags & PF_HOLDREADY))
|
if ((cmd->buttons & BT_ATTACK) && (player->itemflags & IF_HOLDREADY))
|
||||||
{
|
{
|
||||||
const INT32 incr = (gametyperules & GTR_CLOSERPLAYERS) ? 4 : 2;
|
const INT32 incr = (gametyperules & GTR_CLOSERPLAYERS) ? 4 : 2;
|
||||||
player->flamemeter += incr;
|
player->flamemeter += incr;
|
||||||
|
|
@ -11816,13 +11816,13 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
|
|
||||||
player->flamemeter = 0;
|
player->flamemeter = 0;
|
||||||
player->flamelength = 0;
|
player->flamelength = 0;
|
||||||
player->pflags &= ~PF_HOLDREADY;
|
player->itemflags &= ~IF_HOLDREADY;
|
||||||
player->itemamount--;
|
player->itemamount--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->pflags |= PF_HOLDREADY;
|
player->itemflags |= IF_HOLDREADY;
|
||||||
|
|
||||||
if (!(gametyperules & GTR_CLOSERPLAYERS) || leveltime % 6 == 0)
|
if (!(gametyperules & GTR_CLOSERPLAYERS) || leveltime % 6 == 0)
|
||||||
{
|
{
|
||||||
|
|
@ -11892,12 +11892,12 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
P_SetTarget(&player->mo->hnext, mo);
|
P_SetTarget(&player->mo->hnext, mo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ATTACK_IS_DOWN && HOLDING_ITEM && (player->pflags & PF_ITEMOUT)) // Sink thrown
|
else if (ATTACK_IS_DOWN && HOLDING_ITEM && (player->itemflags & IF_ITEMOUT)) // Sink thrown
|
||||||
{
|
{
|
||||||
K_ThrowKartItem(player, false, MT_SINK, 1, 2, 0);
|
K_ThrowKartItem(player, false, MT_SINK, 1, 2, 0);
|
||||||
K_PlayAttackTaunt(player->mo);
|
K_PlayAttackTaunt(player->mo);
|
||||||
player->itemamount--;
|
player->itemamount--;
|
||||||
player->pflags &= ~PF_ITEMOUT;
|
player->itemflags &= ~IF_ITEMOUT;
|
||||||
K_UpdateHnextList(player, true);
|
K_UpdateHnextList(player, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -11932,7 +11932,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
// No more!
|
// No more!
|
||||||
if (!player->itemamount)
|
if (!player->itemamount)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_ITEMOUT;
|
player->itemflags &= ~IF_ITEMOUT;
|
||||||
player->itemtype = KITEM_NONE;
|
player->itemtype = KITEM_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -12027,7 +12027,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
player->trickpanel = 0;
|
player->trickpanel = 0;
|
||||||
K_trickPanelTimingVisual(player, momz); // fail trick visual
|
K_trickPanelTimingVisual(player, momz); // fail trick visual
|
||||||
P_SetPlayerMobjState(player->mo, S_KART_SPINOUT);
|
P_SetPlayerMobjState(player->mo, S_KART_SPINOUT);
|
||||||
if (player->pflags & (PF_ITEMOUT|PF_EGGMANOUT))
|
if (player->itemflags & (IF_ITEMOUT|IF_EGGMANOUT))
|
||||||
{
|
{
|
||||||
//K_PopPlayerShield(player); // shield is just being yeeted, don't pop
|
//K_PopPlayerShield(player); // shield is just being yeeted, don't pop
|
||||||
K_DropHnextList(player);
|
K_DropHnextList(player);
|
||||||
|
|
|
||||||
|
|
@ -979,6 +979,7 @@ extern consvar_t cv_dummyprofilename;
|
||||||
extern consvar_t cv_dummyprofileplayername;
|
extern consvar_t cv_dummyprofileplayername;
|
||||||
extern consvar_t cv_dummyprofilekickstart;
|
extern consvar_t cv_dummyprofilekickstart;
|
||||||
extern consvar_t cv_dummyprofileautoroulette;
|
extern consvar_t cv_dummyprofileautoroulette;
|
||||||
|
extern consvar_t cv_dummyprofilelitesteer;
|
||||||
extern consvar_t cv_dummyprofilerumble;
|
extern consvar_t cv_dummyprofilerumble;
|
||||||
|
|
||||||
void M_ResetOptions(void);
|
void M_ResetOptions(void);
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ profile_t* PR_MakeProfile(
|
||||||
new->followercolor = fcol;
|
new->followercolor = fcol;
|
||||||
new->kickstartaccel = false;
|
new->kickstartaccel = false;
|
||||||
new->autoroulette = false;
|
new->autoroulette = false;
|
||||||
|
new->litesteer = true;
|
||||||
|
|
||||||
// Copy from gamecontrol directly as we'll be setting controls up directly in the profile.
|
// Copy from gamecontrol directly as we'll be setting controls up directly in the profile.
|
||||||
memcpy(new->controls, controlarray, sizeof(new->controls));
|
memcpy(new->controls, controlarray, sizeof(new->controls));
|
||||||
|
|
@ -89,6 +90,7 @@ profile_t* PR_MakeProfileFromPlayer(const char *prname, const char *pname, const
|
||||||
// Player bound cvars:
|
// Player bound cvars:
|
||||||
new->kickstartaccel = cv_kickstartaccel[pnum].value;
|
new->kickstartaccel = cv_kickstartaccel[pnum].value;
|
||||||
new->autoroulette = cv_autoroulette[pnum].value;
|
new->autoroulette = cv_autoroulette[pnum].value;
|
||||||
|
new->litesteer = cv_litesteer[pnum].value;
|
||||||
new->rumble = cv_rumble[pnum].value;
|
new->rumble = cv_rumble[pnum].value;
|
||||||
|
|
||||||
return new;
|
return new;
|
||||||
|
|
@ -276,6 +278,7 @@ void PR_SaveProfiles(void)
|
||||||
// Consvars.
|
// Consvars.
|
||||||
WRITEUINT8(save.p, profilesList[i]->kickstartaccel);
|
WRITEUINT8(save.p, profilesList[i]->kickstartaccel);
|
||||||
WRITEUINT8(save.p, profilesList[i]->autoroulette);
|
WRITEUINT8(save.p, profilesList[i]->autoroulette);
|
||||||
|
WRITEUINT8(save.p, profilesList[i]->litesteer);
|
||||||
WRITEUINT8(save.p, profilesList[i]->rumble);
|
WRITEUINT8(save.p, profilesList[i]->rumble);
|
||||||
|
|
||||||
// Controls.
|
// Controls.
|
||||||
|
|
@ -425,6 +428,17 @@ void PR_LoadProfiles(void)
|
||||||
profilesList[i]->autoroulette = (boolean)READUINT8(save.p);
|
profilesList[i]->autoroulette = (boolean)READUINT8(save.p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 7->8, add litesteer
|
||||||
|
if (version < 8)
|
||||||
|
{
|
||||||
|
profilesList[i]->litesteer = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
profilesList[i]->litesteer = (boolean)READUINT8(save.p);
|
||||||
|
}
|
||||||
|
|
||||||
if (version < 4)
|
if (version < 4)
|
||||||
{
|
{
|
||||||
profilesList[i]->rumble = true;
|
profilesList[i]->rumble = true;
|
||||||
|
|
@ -478,6 +492,7 @@ static void PR_ApplyProfile_Settings(profile_t *p, UINT8 playernum)
|
||||||
// toggles
|
// toggles
|
||||||
CV_StealthSetValue(&cv_kickstartaccel[playernum], p->kickstartaccel);
|
CV_StealthSetValue(&cv_kickstartaccel[playernum], p->kickstartaccel);
|
||||||
CV_StealthSetValue(&cv_autoroulette[playernum], p->autoroulette);
|
CV_StealthSetValue(&cv_autoroulette[playernum], p->autoroulette);
|
||||||
|
CV_StealthSetValue(&cv_litesteer[playernum], p->litesteer);
|
||||||
|
|
||||||
// set controls...
|
// set controls...
|
||||||
memcpy(&gamecontrol[playernum], p->controls, sizeof(gamecontroldefault));
|
memcpy(&gamecontrol[playernum], p->controls, sizeof(gamecontroldefault));
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ extern "C" {
|
||||||
#define SKINNAMESIZE 16
|
#define SKINNAMESIZE 16
|
||||||
|
|
||||||
#define PROFILENAMELEN 6
|
#define PROFILENAMELEN 6
|
||||||
#define PROFILEVER 7
|
#define PROFILEVER 8
|
||||||
#define MAXPROFILES 16
|
#define MAXPROFILES 16
|
||||||
#define PROFILESFILE "ringprofiles.prf"
|
#define PROFILESFILE "ringprofiles.prf"
|
||||||
#define PROFILE_GUEST 0
|
#define PROFILE_GUEST 0
|
||||||
|
|
@ -74,7 +74,8 @@ struct profile_t
|
||||||
// Player-specific consvars.
|
// Player-specific consvars.
|
||||||
// @TODO: List all of those
|
// @TODO: List all of those
|
||||||
boolean kickstartaccel; // cv_kickstartaccel
|
boolean kickstartaccel; // cv_kickstartaccel
|
||||||
boolean autoroulette; // cv_autoroulette
|
boolean autoroulette; // cv_autoroulette
|
||||||
|
boolean litesteer; // cv_litesteer
|
||||||
boolean rumble; // cv_rumble
|
boolean rumble; // cv_rumble
|
||||||
|
|
||||||
// Finally, control data itself
|
// Finally, control data itself
|
||||||
|
|
|
||||||
|
|
@ -1622,7 +1622,7 @@ void K_KartItemRoulette(player_t *const player, ticcmd_t *const cmd)
|
||||||
// If the roulette finishes or the player presses BT_ATTACK, stop the roulette and calculate the item.
|
// If the roulette finishes or the player presses BT_ATTACK, stop the roulette and calculate the item.
|
||||||
// I'm returning via the exact opposite, however, to forgo having another bracket embed. Same result either way, I think.
|
// I'm returning via the exact opposite, however, to forgo having another bracket embed. Same result either way, I think.
|
||||||
// Finally, if you get past this check, now you can actually start calculating what item you get.
|
// Finally, if you get past this check, now you can actually start calculating what item you get.
|
||||||
if (confirmItem == true && (player->pflags & (PF_ITEMOUT|PF_EGGMANOUT|PF_USERINGS)) == 0)
|
if (confirmItem == true && (player->itemflags & (IF_ITEMOUT|IF_EGGMANOUT|IF_USERINGS)) == 0)
|
||||||
{
|
{
|
||||||
if (roulette->eggman == true)
|
if (roulette->eggman == true)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -259,6 +259,8 @@ static int player_get(lua_State *L)
|
||||||
lua_pushinteger(L, plr->ringboxdelay);
|
lua_pushinteger(L, plr->ringboxdelay);
|
||||||
else if (fastcmp(field,"ringboxaward"))
|
else if (fastcmp(field,"ringboxaward"))
|
||||||
lua_pushinteger(L, plr->ringboxaward);
|
lua_pushinteger(L, plr->ringboxaward);
|
||||||
|
else if (fastcmp(field,"itemflags"))
|
||||||
|
lua_pushinteger(L, plr->itemflags);
|
||||||
else if (fastcmp(field,"drift"))
|
else if (fastcmp(field,"drift"))
|
||||||
lua_pushinteger(L, plr->drift);
|
lua_pushinteger(L, plr->drift);
|
||||||
else if (fastcmp(field,"driftcharge"))
|
else if (fastcmp(field,"driftcharge"))
|
||||||
|
|
@ -745,6 +747,8 @@ static int player_set(lua_State *L)
|
||||||
plr->ringboxdelay = luaL_checkinteger(L, 3);
|
plr->ringboxdelay = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"ringboxaward"))
|
else if (fastcmp(field,"ringboxaward"))
|
||||||
plr->ringboxaward = luaL_checkinteger(L, 3);
|
plr->ringboxaward = luaL_checkinteger(L, 3);
|
||||||
|
else if (fastcmp(field,"itemflags"))
|
||||||
|
plr->itemflags = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"drift"))
|
else if (fastcmp(field,"drift"))
|
||||||
plr->drift = luaL_checkinteger(L, 3);
|
plr->drift = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"driftcharge"))
|
else if (fastcmp(field,"driftcharge"))
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ static void M_StartEditProfile(INT32 c)
|
||||||
CV_StealthSet(&cv_dummyprofileplayername, optionsmenu.profile->playername);
|
CV_StealthSet(&cv_dummyprofileplayername, optionsmenu.profile->playername);
|
||||||
CV_StealthSetValue(&cv_dummyprofilekickstart, optionsmenu.profile->kickstartaccel);
|
CV_StealthSetValue(&cv_dummyprofilekickstart, optionsmenu.profile->kickstartaccel);
|
||||||
CV_StealthSetValue(&cv_dummyprofileautoroulette, optionsmenu.profile->autoroulette);
|
CV_StealthSetValue(&cv_dummyprofileautoroulette, optionsmenu.profile->autoroulette);
|
||||||
|
CV_StealthSetValue(&cv_dummyprofilelitesteer, optionsmenu.profile->litesteer);
|
||||||
CV_StealthSetValue(&cv_dummyprofilerumble, optionsmenu.profile->rumble);
|
CV_StealthSetValue(&cv_dummyprofilerumble, optionsmenu.profile->rumble);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -97,6 +98,7 @@ static void M_StartEditProfile(INT32 c)
|
||||||
CV_StealthSet(&cv_dummyprofileplayername, "");
|
CV_StealthSet(&cv_dummyprofileplayername, "");
|
||||||
CV_StealthSetValue(&cv_dummyprofilekickstart, 0); // off
|
CV_StealthSetValue(&cv_dummyprofilekickstart, 0); // off
|
||||||
CV_StealthSetValue(&cv_dummyprofileautoroulette, 0); // off
|
CV_StealthSetValue(&cv_dummyprofileautoroulette, 0); // off
|
||||||
|
CV_StealthSetValue(&cv_dummyprofilelitesteer, 1); // on
|
||||||
CV_StealthSetValue(&cv_dummyprofilerumble, 1); // on
|
CV_StealthSetValue(&cv_dummyprofilerumble, 1); // on
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,9 @@ menuitem_t OPTIONS_ProfileControls[] = {
|
||||||
{IT_CONTROL | IT_CVAR, "AUTO ROULETTE", "Item roulette auto-stops on a random result.",
|
{IT_CONTROL | IT_CVAR, "AUTO ROULETTE", "Item roulette auto-stops on a random result.",
|
||||||
NULL, {.cvar = &cv_dummyprofileautoroulette}, 0, 0},
|
NULL, {.cvar = &cv_dummyprofileautoroulette}, 0, 0},
|
||||||
|
|
||||||
|
{IT_CONTROL | IT_CVAR, "LITE STEER", "Hold DOWN on d-pad/keyboard for shallow turns.",
|
||||||
|
NULL, {.cvar = &cv_dummyprofilelitesteer}, 0, 0},
|
||||||
|
|
||||||
{IT_HEADER, "EXTRA", "",
|
{IT_HEADER, "EXTRA", "",
|
||||||
NULL, {NULL}, 0, 0},
|
NULL, {NULL}, 0, 0},
|
||||||
|
|
||||||
|
|
@ -191,6 +194,7 @@ static void M_ProfileControlSaveResponse(INT32 choice)
|
||||||
// Save the profile
|
// Save the profile
|
||||||
optionsmenu.profile->kickstartaccel = cv_dummyprofilekickstart.value;
|
optionsmenu.profile->kickstartaccel = cv_dummyprofilekickstart.value;
|
||||||
optionsmenu.profile->autoroulette = cv_dummyprofileautoroulette.value;
|
optionsmenu.profile->autoroulette = cv_dummyprofileautoroulette.value;
|
||||||
|
optionsmenu.profile->litesteer = cv_dummyprofilelitesteer.value;
|
||||||
optionsmenu.profile->rumble = cv_dummyprofilerumble.value;
|
optionsmenu.profile->rumble = cv_dummyprofilerumble.value;
|
||||||
memcpy(&optionsmenu.profile->controls, optionsmenu.tempcontrols, sizeof(gamecontroldefault));
|
memcpy(&optionsmenu.profile->controls, optionsmenu.tempcontrols, sizeof(gamecontroldefault));
|
||||||
|
|
||||||
|
|
@ -201,6 +205,7 @@ static void M_ProfileControlSaveResponse(INT32 choice)
|
||||||
memcpy(&gamecontrol[belongsto], optionsmenu.tempcontrols, sizeof(gamecontroldefault));
|
memcpy(&gamecontrol[belongsto], optionsmenu.tempcontrols, sizeof(gamecontroldefault));
|
||||||
CV_SetValue(&cv_kickstartaccel[belongsto], cv_dummyprofilekickstart.value);
|
CV_SetValue(&cv_kickstartaccel[belongsto], cv_dummyprofilekickstart.value);
|
||||||
CV_SetValue(&cv_autoroulette[belongsto], cv_dummyprofileautoroulette.value);
|
CV_SetValue(&cv_autoroulette[belongsto], cv_dummyprofileautoroulette.value);
|
||||||
|
CV_SetValue(&cv_litesteer[belongsto], cv_dummyprofilelitesteer.value);
|
||||||
CV_SetValue(&cv_rumble[belongsto], cv_dummyprofilerumble.value);
|
CV_SetValue(&cv_rumble[belongsto], cv_dummyprofilerumble.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ boolean P_CanPickupItem(player_t *player, UINT8 weapon)
|
||||||
if (player->itemRoulette.active == true
|
if (player->itemRoulette.active == true
|
||||||
|| player->ringboxdelay > 0
|
|| player->ringboxdelay > 0
|
||||||
|| (weapon != 3 && player->itemamount)
|
|| (weapon != 3 && player->itemamount)
|
||||||
|| (player->pflags & PF_ITEMOUT))
|
|| (player->itemflags & IF_ITEMOUT))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (weapon == 3 && K_GetShieldFromItem(player->itemtype) != KSHIELD_NONE)
|
if (weapon == 3 && K_GetShieldFromItem(player->itemtype) != KSHIELD_NONE)
|
||||||
|
|
@ -1577,10 +1577,10 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
// I wish I knew a better way to do this
|
// I wish I knew a better way to do this
|
||||||
if (target->target && target->target->player && target->target->player->mo)
|
if (target->target && target->target->player && target->target->player->mo)
|
||||||
{
|
{
|
||||||
if ((target->target->player->pflags & PF_EGGMANOUT) && target->type == MT_EGGMANITEM_SHIELD)
|
if ((target->target->player->itemflags & IF_EGGMANOUT) && target->type == MT_EGGMANITEM_SHIELD)
|
||||||
target->target->player->pflags &= ~PF_EGGMANOUT;
|
target->target->player->itemflags &= ~IF_EGGMANOUT;
|
||||||
|
|
||||||
if (target->target->player->pflags & PF_ITEMOUT)
|
if (target->target->player->itemflags & IF_ITEMOUT)
|
||||||
{
|
{
|
||||||
if ((target->type == MT_BANANA_SHIELD && target->target->player->itemtype == KITEM_BANANA) // trail items
|
if ((target->type == MT_BANANA_SHIELD && target->target->player->itemtype == KITEM_BANANA) // trail items
|
||||||
|| (target->type == MT_SSMINE_SHIELD && target->target->player->itemtype == KITEM_MINE)
|
|| (target->type == MT_SSMINE_SHIELD && target->target->player->itemtype == KITEM_MINE)
|
||||||
|
|
@ -1608,7 +1608,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!target->target->player->itemamount)
|
if (!target->target->player->itemamount)
|
||||||
target->target->player->pflags &= ~PF_ITEMOUT;
|
target->target->player->itemflags &= ~IF_ITEMOUT;
|
||||||
|
|
||||||
if (target->target->hnext == target)
|
if (target->target->hnext == target)
|
||||||
P_SetTarget(&target->target->hnext, NULL);
|
P_SetTarget(&target->target->hnext, NULL);
|
||||||
|
|
|
||||||
|
|
@ -6471,7 +6471,7 @@ static void P_MobjSceneryThink(mobj_t *mobj)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mobj->target->player->pflags & PF_ITEMOUT)
|
if (mobj->target->player->itemflags & IF_ITEMOUT)
|
||||||
{
|
{
|
||||||
if (leveltime & 1)
|
if (leveltime & 1)
|
||||||
mobj->tracer->renderflags &= ~RF_DONTDRAW;
|
mobj->tracer->renderflags &= ~RF_DONTDRAW;
|
||||||
|
|
|
||||||
|
|
@ -559,6 +559,9 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
||||||
|
|
||||||
WRITEUINT8(save->p, players[i].ringboxdelay);
|
WRITEUINT8(save->p, players[i].ringboxdelay);
|
||||||
WRITEUINT8(save->p, players[i].ringboxaward);
|
WRITEUINT8(save->p, players[i].ringboxaward);
|
||||||
|
|
||||||
|
WRITEUINT8(save->p, players[i].itemflags);
|
||||||
|
|
||||||
WRITEFIXED(save->p, players[i].outrun);
|
WRITEFIXED(save->p, players[i].outrun);
|
||||||
|
|
||||||
WRITEUINT8(save->p, players[i].rideroid);
|
WRITEUINT8(save->p, players[i].rideroid);
|
||||||
|
|
@ -1087,6 +1090,9 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
||||||
|
|
||||||
players[i].ringboxdelay = READUINT8(save->p);
|
players[i].ringboxdelay = READUINT8(save->p);
|
||||||
players[i].ringboxaward = READUINT8(save->p);
|
players[i].ringboxaward = READUINT8(save->p);
|
||||||
|
|
||||||
|
players[i].itemflags = READUINT8(save->p);
|
||||||
|
|
||||||
players[i].outrun = READFIXED(save->p);
|
players[i].outrun = READFIXED(save->p);
|
||||||
|
|
||||||
players[i].rideroid = (boolean)READUINT8(save->p);
|
players[i].rideroid = (boolean)READUINT8(save->p);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue