mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'bonklock' into 'master'
Add automatic generic bump unstuck See merge request KartKrew/Kart!2395
This commit is contained in:
commit
aa81299b05
5 changed files with 20 additions and 0 deletions
|
|
@ -1010,6 +1010,7 @@ struct player_t
|
|||
UINT8 preventfailsafe; // Set when taking damage to prevent cheesing eggboxes
|
||||
|
||||
UINT8 tripwireUnstuck;
|
||||
UINT8 bumpUnstuck;
|
||||
|
||||
UINT8 handtimer;
|
||||
angle_t besthanddirection;
|
||||
|
|
|
|||
10
src/k_kart.c
10
src/k_kart.c
|
|
@ -9162,6 +9162,16 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->hyudorotimer)
|
||||
player->hyudorotimer--;
|
||||
|
||||
if (player->bumpUnstuck > 30*5)
|
||||
{
|
||||
player->bumpUnstuck = 0;
|
||||
K_DoIngameRespawn(player);
|
||||
}
|
||||
else if (player->bumpUnstuck)
|
||||
{
|
||||
player->bumpUnstuck--;
|
||||
}
|
||||
|
||||
if (player->fakeBoost)
|
||||
player->fakeBoost--;
|
||||
|
||||
|
|
|
|||
|
|
@ -388,6 +388,8 @@ static int player_get(lua_State *L)
|
|||
lua_pushinteger(L, plr->preventfailsafe);
|
||||
else if (fastcmp(field,"tripwireunstuck"))
|
||||
lua_pushinteger(L, plr->tripwireUnstuck);
|
||||
else if (fastcmp(field,"bumpunstuck"))
|
||||
lua_pushinteger(L, plr->bumpUnstuck);
|
||||
/*
|
||||
else if (fastcmp(field,"itemroulette"))
|
||||
lua_pushinteger(L, plr->itemroulette);
|
||||
|
|
@ -946,6 +948,8 @@ static int player_set(lua_State *L)
|
|||
plr->preventfailsafe = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"tripwireunstuck"))
|
||||
plr->tripwireUnstuck = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"bumpunstuck"))
|
||||
plr->bumpUnstuck = luaL_checkinteger(L, 3);
|
||||
/*
|
||||
else if (fastcmp(field,"itemroulette"))
|
||||
plr->itemroulette = luaL_checkinteger(L, 3);
|
||||
|
|
|
|||
|
|
@ -4085,6 +4085,9 @@ static void P_BouncePlayerMove(mobj_t *mo, TryMoveResult_t *result)
|
|||
P_PlayerHitBounceLine(bestslideline, &result->normal);
|
||||
mo->eflags |= MFE_JUSTBOUNCEDWALL;
|
||||
|
||||
if (mo->player)
|
||||
mo->player->bumpUnstuck += 5;
|
||||
|
||||
// Combo avoidance!
|
||||
if (mo->player && P_PlayerInPain(mo->player) && gametyperules & GTR_BUMPERS && mo->health == 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -608,6 +608,7 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
|||
WRITEUINT8(save->p, players[i].preventfailsafe);
|
||||
|
||||
WRITEUINT8(save->p, players[i].tripwireUnstuck);
|
||||
WRITEUINT8(save->p, players[i].bumpUnstuck);
|
||||
|
||||
WRITEUINT8(save->p, players[i].handtimer);
|
||||
WRITEANGLE(save->p, players[i].besthanddirection);
|
||||
|
|
@ -1211,6 +1212,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
|||
players[i].preventfailsafe = READUINT8(save->p);
|
||||
|
||||
players[i].tripwireUnstuck = READUINT8(save->p);
|
||||
players[i].bumpUnstuck = READUINT8(save->p);
|
||||
|
||||
players[i].handtimer = READUINT8(save->p);
|
||||
players[i].besthanddirection = READANGLE(save->p);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue