Roulette timer stops manually again - as more players join the game, the player in first will have to wait longer to stop the roulette manually. Players further back will also wait slightly longer, while the person in last will always only take 1 second to stop the roulette.

Fixed drifting so it stops when you're too slow.
This commit is contained in:
ZTsukei 2017-02-27 23:54:02 -05:00
parent f1f78a2349
commit 87d09228fa
4 changed files with 20 additions and 18 deletions

View File

@ -143,16 +143,16 @@ extern FILE *logstream;
#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3
#ifdef DEVELOP
#define VERSION 102 // Game version
#define SUBVERSION 3 // more precise version number
#define SUBVERSION 4 // more precise version number
#define VERSIONSTRING "Development EXE"
#define VERSIONSTRINGW "v1.2.03"
#define VERSIONSTRINGW "v1.2.04"
// most interface strings are ignored in development mode.
// we use comprevision and compbranch instead.
#else
#define VERSION 102 // Game version
#define SUBVERSION 3 // more precise version number
#define VERSIONSTRING "DevEXE v1.2.03"
#define VERSIONSTRINGW L"v1.2.03"
#define SUBVERSION 4 // more precise version number
#define VERSIONSTRING "DevEXE v1.2.04"
#define VERSIONSTRINGW L"v1.2.04"
// Hey! If you change this, add 1 to the MODVERSION below!
// Otherwise we can't force updates!
#endif

View File

@ -788,12 +788,6 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
if ((player->kartstuff[k_itemroulette] % 3) == 1 && P_IsLocalPlayer(player))
S_StartSound(NULL,sfx_mkitm1 + ((player->kartstuff[k_itemroulette] / 3) % 8));
// 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.
// Finally, if you get past this check, now you can actually start calculating what item you get.
if (!(player->kartstuff[k_itemroulette] > (TICRATE*3)-1)) // || ((cmd->buttons & BT_ATTACK) && player->kartstuff[k_itemroulette] > ((TICRATE*2)/3)-1)))
return;
// Initializes existing values
basechance = chance = prevchance = 0;
numchoices = pingame = pexiting = 0;
@ -813,6 +807,15 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
pexiting++;
}
INT32 roulettestop = (TICRATE*1) + (3*(pingame - player->kartstuff[k_position]));
// 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.
// Finally, if you get past this check, now you can actually start calculating what item you get.
if (!(player->kartstuff[k_itemroulette] >= (TICRATE*3)
|| ((cmd->buttons & BT_ATTACK) && player->kartstuff[k_itemroulette] >= roulettestop)))
return;
if (cmd->buttons & BT_ATTACK)
player->pflags |= PF_ATTACKDOWN;
@ -1887,10 +1890,10 @@ void K_KartDrift(player_t *player, ticcmd_t *cmd, boolean onground)
}
// Drifting: left or right?
if (player->kartstuff[k_turndir] == 1 && player->speed > 10 && player->kartstuff[k_jmp] == 1
if (player->kartstuff[k_turndir] == 1 && player->speed > (10<<16) && player->kartstuff[k_jmp] == 1
&& player->kartstuff[k_drift] < 3 && player->kartstuff[k_drift] > -1) // && player->kartstuff[k_drift] != 1)
player->kartstuff[k_drift] = 1;
else if (player->kartstuff[k_turndir] == -1 && player->speed > 10 && player->kartstuff[k_jmp] == 1
else if (player->kartstuff[k_turndir] == -1 && player->speed > (10<<16) && player->kartstuff[k_jmp] == 1
&& player->kartstuff[k_drift] > -3 && player->kartstuff[k_drift] < 1) // && player->kartstuff[k_drift] != -1)
player->kartstuff[k_drift] = -1;
else if (player->kartstuff[k_jmp] == 0) // || player->kartstuff[k_turndir] == 0)
@ -1965,7 +1968,7 @@ void K_KartDrift(player_t *player, ticcmd_t *cmd, boolean onground)
// Stop drifting
if (player->kartstuff[k_spinouttimer] > 0 // banana peel
|| player->speed < 10) // you're too slow!
|| player->speed < (10<<16)) // you're too slow!
{
player->kartstuff[k_drift] = 0;
player->kartstuff[k_driftcharge] = 0;
@ -2512,8 +2515,7 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
// Mushroom Boost
if (((player->kartstuff[k_mushroomtimer] > 0 && player->kartstuff[k_boosting] == 0)
|| (player->kartstuff[k_mushroomtimer] > 0 && ATTACK_IS_DOWN
&& player->kartstuff[k_goldshroomtimer] > 1 && NO_BOO)) && onground)
|| (player->kartstuff[k_mushroomtimer] > 0 && ATTACK_IS_DOWN && NO_BOO)) && onground)
{
cmd->forwardmove = 1;
if (player->kartstuff[k_drift] >= 1)

View File

@ -365,7 +365,7 @@ static void P_DoTailsCarry(player_t *sonic, player_t *tails)
|| (gametype == GT_MATCH)
|| (G_GametypeHasTeams() && tails->ctfteam != sonic->ctfteam))
sonic->pflags &= ~PF_CARRIED; */
if (tails->spectator || sonic->spectator)
if (tails->spectator || sonic->spectator || gametype == GT_RACE) // SRB2kart
sonic->pflags &= ~PF_CARRIED;
else
{

View File

@ -1958,7 +1958,7 @@ void P_XYMovement(mobj_t *mo)
#endif
//{ SRB2kart stuff
if (mo->type == MT_GREENITEM || mo->type == MT_REDITEMDUD || (mo->type == MT_REDITEM && !mo->tracer))
if (mo->type == MT_GREENITEM || mo->type == MT_REDITEMDUD || mo->type == MT_REDITEM) //(mo->type == MT_REDITEM && !mo->tracer))
return;
if (mo->player && mo->player->kartstuff[k_spinouttimer] && mo->player->speed <= mo->player->normalspeed/4)