mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
WIP: no early items
This commit is contained in:
parent
a323365ce2
commit
5129250e48
7 changed files with 29 additions and 0 deletions
|
|
@ -727,6 +727,8 @@ struct player_t
|
|||
UINT8 justDI; // Turn-lockout timer to briefly prevent unintended turning after DI, resets when actionable or no input
|
||||
boolean flipDI; // Bananas flip the DI direction. Was a bug, but it made bananas much more interesting.
|
||||
|
||||
boolean cangrabitems;
|
||||
|
||||
SINT8 drift; // (-5 to 5) - Drifting Left or Right, plus a bigger counter = sharper turn
|
||||
fixed_t driftcharge; // Charge your drift so you can release a burst of speed
|
||||
UINT16 driftboost; // (0 to 125 baseline) - Boost you get from drifting
|
||||
|
|
|
|||
|
|
@ -2241,6 +2241,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
UINT8 botdiffincrease;
|
||||
boolean botrival;
|
||||
|
||||
boolean cangrabitems;
|
||||
|
||||
SINT8 xtralife;
|
||||
|
||||
uint8_t public_key[PUBKEYLENGTH];
|
||||
|
|
@ -2342,6 +2344,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
bot = players[player].bot;
|
||||
botdifficulty = players[player].botvars.difficulty;
|
||||
|
||||
cangrabitems = players[player].cangrabitems;
|
||||
|
||||
botdiffincrease = players[player].botvars.diffincrease;
|
||||
botrival = players[player].botvars.rival;
|
||||
|
||||
|
|
@ -2567,6 +2571,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
p->charflags = charflags;
|
||||
p->lastfakeskin = lastfakeskin;
|
||||
|
||||
p->cangrabitems = cangrabitems;
|
||||
|
||||
memcpy(players[player].availabilities, availabilities, sizeof(availabilities));
|
||||
p->followitem = followitem;
|
||||
|
||||
|
|
|
|||
|
|
@ -4235,6 +4235,7 @@ void K_CheckpointCrossAward(player_t *player)
|
|||
return;
|
||||
|
||||
player->exp += K_GetExpAdjustment(player);
|
||||
player->cangrabitems = true;
|
||||
K_AwardPlayerRings(player, (player->bot ? 20 : 10), true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -264,6 +264,8 @@ static int player_get(lua_State *L)
|
|||
lua_pushinteger(L, plr->justDI);
|
||||
else if (fastcmp(field,"flipdi"))
|
||||
lua_pushboolean(L, plr->flipDI);
|
||||
else if (fastcmp(field,"cangrabitems"))
|
||||
lua_pushboolean(L, plr->cangrabitems);
|
||||
else if (fastcmp(field,"analoginput"))
|
||||
lua_pushboolean(L, plr->analoginput);
|
||||
else if (fastcmp(field,"transfer"))
|
||||
|
|
@ -876,6 +878,8 @@ static int player_set(lua_State *L)
|
|||
plr->justDI = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"flipdi"))
|
||||
plr->flipDI = luaL_checkboolean(L, 3);
|
||||
else if (fastcmp(field,"cangrabitems"))
|
||||
plr->cangrabitems = luaL_checkboolean(L, 3);
|
||||
else if (fastcmp(field,"incontrol"))
|
||||
plr->incontrol = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"progressivethrust"))
|
||||
|
|
|
|||
|
|
@ -112,6 +112,15 @@ void Obj_RandomItemVisuals(mobj_t *mobj)
|
|||
ItemBoxScaling(mobj);
|
||||
item_vfxtimer(mobj)++;
|
||||
|
||||
for (UINT8 i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
UINT32 flag = K_GetPlayerDontDrawFlag(&players[displayplayers[i]]);
|
||||
if (!players[displayplayers[i]].cangrabitems)
|
||||
mobj->renderflags |= flag;
|
||||
else
|
||||
mobj->renderflags &= ~(flag);
|
||||
}
|
||||
|
||||
if (mobj->type != MT_RANDOMITEM)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -128,6 +128,9 @@ boolean P_CanPickupItem(player_t *player, UINT8 weapon)
|
|||
if (weapon != 2 && player->instaWhipCharge)
|
||||
return false;
|
||||
|
||||
if (weapon == 1 && !player->cangrabitems)
|
||||
return false;
|
||||
|
||||
if (weapon)
|
||||
{
|
||||
// Item slot already taken up
|
||||
|
|
|
|||
|
|
@ -459,6 +459,8 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
|||
WRITEUINT8(save->p, players[i].justDI);
|
||||
WRITEUINT8(save->p, players[i].flipDI);
|
||||
|
||||
WRITEUINT8(save->p, players[i].cangrabitems);
|
||||
|
||||
WRITESINT8(save->p, players[i].drift);
|
||||
WRITEFIXED(save->p, players[i].driftcharge);
|
||||
WRITEUINT16(save->p, players[i].driftboost);
|
||||
|
|
@ -1097,6 +1099,8 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
|||
players[i].justDI = READUINT8(save->p);
|
||||
players[i].flipDI = (boolean)READUINT8(save->p);
|
||||
|
||||
players[i].cangrabitems = (boolean)READUINT8(save->p);
|
||||
|
||||
players[i].drift = READSINT8(save->p);
|
||||
players[i].driftcharge = READFIXED(save->p);
|
||||
players[i].driftboost = READUINT16(save->p);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue