Adjusted bonustime, Goldshrooms work, added intermediate boostspeed for between Megashroom size
This commit is contained in:
parent
7b7a6e5458
commit
493436dc1a
|
@ -2823,7 +2823,7 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum);
|
||||||
// called one time at init
|
// called one time at init
|
||||||
void D_ClientServerInit(void)
|
void D_ClientServerInit(void)
|
||||||
{
|
{
|
||||||
DEBFILE(va("- - -== SRB2 v%d.%.2d.%d "VERSIONSTRING" debugfile ==- - -\n",
|
DEBFILE(va("- - -== SRB2Kart v%d.%.2d.%d "VERSIONSTRING" debugfile ==- - -\n",
|
||||||
VERSION/100, VERSION%100, SUBVERSION));
|
VERSION/100, VERSION%100, SUBVERSION));
|
||||||
|
|
||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
|
|
|
@ -1597,8 +1597,8 @@ void I_RemoveExitFunc(void (*func)())
|
||||||
static inline void exception_handler(int num)
|
static inline void exception_handler(int num)
|
||||||
{
|
{
|
||||||
static char msg[255];
|
static char msg[255];
|
||||||
sprintf(msg,"Sonic Robo Blast 2 "VERSIONSTRING"\r\n"
|
sprintf(msg,"SRB2Kart "VERSIONSTRING"\r\n"
|
||||||
"This is a error of SRB2, try to send the following info to programmers\r\n");
|
"This is a error of SRB2Kart, try to send the following info to programmers\r\n");
|
||||||
|
|
||||||
//D_QuitNetGame (); //say 'byebye' to other players when your machine
|
//D_QuitNetGame (); //say 'byebye' to other players when your machine
|
||||||
// crashes?... hmm... do they have to die with you???
|
// crashes?... hmm... do they have to die with you???
|
||||||
|
|
|
@ -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
|
#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
|
#ifdef DEVELOP
|
||||||
#define VERSION 100 // Game version
|
#define VERSION 100 // Game version
|
||||||
#define SUBVERSION 5 // more precise version number
|
#define SUBVERSION 6 // more precise version number
|
||||||
#define VERSIONSTRING "Development EXE"
|
#define VERSIONSTRING "Development EXE"
|
||||||
#define VERSIONSTRINGW "v1.0.05"
|
#define VERSIONSTRINGW "v1.0.06"
|
||||||
// most interface strings are ignored in development mode.
|
// most interface strings are ignored in development mode.
|
||||||
// we use comprevision and compbranch instead.
|
// we use comprevision and compbranch instead.
|
||||||
#else
|
#else
|
||||||
#define VERSION 100 // Game version
|
#define VERSION 100 // Game version
|
||||||
#define SUBVERSION 5 // more precise version number
|
#define SUBVERSION 6 // more precise version number
|
||||||
#define VERSIONSTRING "v1.0.05"
|
#define VERSIONSTRING "v1.0.06"
|
||||||
#define VERSIONSTRINGW L"v1.0.05"
|
#define VERSIONSTRINGW L"v1.0.06"
|
||||||
// Hey! If you change this, add 1 to the MODVERSION below!
|
// Hey! If you change this, add 1 to the MODVERSION below!
|
||||||
// Otherwise we can't force updates!
|
// Otherwise we can't force updates!
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -199,7 +199,7 @@ UINT16 extralifetics = 4*TICRATE;
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
INT32 bootime = 7*TICRATE;
|
INT32 bootime = 7*TICRATE;
|
||||||
INT32 mushroomtime = TICRATE + (TICRATE/3);
|
INT32 mushroomtime = TICRATE + (TICRATE/3);
|
||||||
INT32 bonustime = 20*TICRATE;
|
INT32 bonustime = 10*TICRATE;
|
||||||
|
|
||||||
INT32 gameovertics = 15*TICRATE;
|
INT32 gameovertics = 15*TICRATE;
|
||||||
|
|
||||||
|
|
77
src/k_kart.c
77
src/k_kart.c
|
@ -1091,33 +1091,41 @@ fixed_t K_GetKartBoostPower(player_t *player)
|
||||||
&& player->kartstuff[k_offroad] >= 0)
|
&& player->kartstuff[k_offroad] >= 0)
|
||||||
boostpower = FixedDiv(boostpower, player->kartstuff[k_offroad] + FRACUNIT);
|
boostpower = FixedDiv(boostpower, player->kartstuff[k_offroad] + FRACUNIT);
|
||||||
|
|
||||||
if (player->kartstuff[k_growshrinktimer] < -1) // Shrink
|
if (player->kartstuff[k_growshrinktimer] < -1)
|
||||||
{
|
{ // Shrink
|
||||||
boostvalue += 6; // 6/8 speed (*0.750)
|
boostvalue += 6; // 6/8 speed (*0.750)
|
||||||
numboosts++;
|
numboosts++;
|
||||||
}
|
}
|
||||||
if (player->kartstuff[k_squishedtimer] > 0) // Squished
|
if (player->kartstuff[k_squishedtimer] > 0)
|
||||||
{
|
{ // Squished
|
||||||
boostvalue += 7; // 7/8 speed (*0.875)
|
boostvalue += 7; // 7/8 speed (*0.875)
|
||||||
numboosts++;
|
numboosts++;
|
||||||
}
|
}
|
||||||
if (player->kartstuff[k_growshrinktimer] > 1) // Mega Mushroom
|
if (player->kartstuff[k_growshrinktimer] > 1
|
||||||
{
|
&& (player->kartstuff[k_growshrinktimer] > (bonustime - 25)
|
||||||
|
|| player->kartstuff[k_growshrinktimer] <= 26))
|
||||||
|
{ // Mega Mushroom - Mid-size
|
||||||
|
boostvalue += 9; // 9/8 speed (*1.125)
|
||||||
|
numboosts++;
|
||||||
|
}
|
||||||
|
if (player->kartstuff[k_growshrinktimer] < (bonustime - 25)
|
||||||
|
&& player->kartstuff[k_growshrinktimer] > 26)
|
||||||
|
{ // Mega Mushroom
|
||||||
boostvalue += 10; // 10/8 speed (*1.250)
|
boostvalue += 10; // 10/8 speed (*1.250)
|
||||||
numboosts++;
|
numboosts++;
|
||||||
}
|
}
|
||||||
if (player->kartstuff[k_startimer]) // Star
|
if (player->kartstuff[k_startimer])
|
||||||
{
|
{ // Star
|
||||||
boostvalue += 11; // 11/8 speed (*1.375)
|
boostvalue += 11; // 11/8 speed (*1.375)
|
||||||
numboosts++;
|
numboosts++;
|
||||||
}
|
}
|
||||||
if (player->kartstuff[k_driftboost]) // Drift Boost
|
if (player->kartstuff[k_driftboost])
|
||||||
{
|
{ // Drift Boost
|
||||||
boostvalue += 12; // 12/8 speed (*1.500)
|
boostvalue += 12; // 12/8 speed (*1.500)
|
||||||
numboosts++;
|
numboosts++;
|
||||||
}
|
}
|
||||||
if (player->kartstuff[k_mushroomtimer]) // Mushroom
|
if (player->kartstuff[k_mushroomtimer])
|
||||||
{
|
{ // Mushroom
|
||||||
boostvalue += 14; // 14/8 speed (*1.750)
|
boostvalue += 14; // 14/8 speed (*1.750)
|
||||||
numboosts++;
|
numboosts++;
|
||||||
}
|
}
|
||||||
|
@ -1957,17 +1965,33 @@ static void K_KartUpdatePosition(player_t *player)
|
||||||
}
|
}
|
||||||
player->kartstuff[k_position] = position;
|
player->kartstuff[k_position] = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean K_CheckForHoldItem(player_t *player)
|
||||||
|
{
|
||||||
|
if ( player->kartstuff[k_greenshell] == 1
|
||||||
|
|| player->kartstuff[k_redshell] == 1
|
||||||
|
|| player->kartstuff[k_banana] == 1
|
||||||
|
|| player->kartstuff[k_fakeitem] == 1
|
||||||
|
|| player->kartstuff[k_bobomb] == 1
|
||||||
|
|| player->kartstuff[k_triplegreenshell] & 1
|
||||||
|
|| player->kartstuff[k_triplegreenshell] & 2
|
||||||
|
|| player->kartstuff[k_triplegreenshell] & 4
|
||||||
|
|| player->kartstuff[k_tripleredshell] & 1
|
||||||
|
|| player->kartstuff[k_tripleredshell] & 2
|
||||||
|
|| player->kartstuff[k_tripleredshell] & 4
|
||||||
|
|| player->kartstuff[k_triplebanana] & 1
|
||||||
|
|| player->kartstuff[k_triplebanana] & 2
|
||||||
|
|| player->kartstuff[k_triplebanana] & 4
|
||||||
|
) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// K_MoveKartPlayer
|
// K_MoveKartPlayer
|
||||||
//
|
//
|
||||||
void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
|
void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
|
||||||
{
|
{
|
||||||
boolean ATTACK_IS_DOWN = ((cmd->buttons & BT_ATTACK) && !(player->pflags & PF_ATTACKDOWN));
|
boolean ATTACK_IS_DOWN = ((cmd->buttons & BT_ATTACK) && !(player->pflags & PF_ATTACKDOWN));
|
||||||
boolean HOLDING_ITEM = (player->kartstuff[k_greenshell] == 1 || player->kartstuff[k_redshell] == 1
|
boolean HOLDING_ITEM = K_CheckForHoldItem(player);
|
||||||
|| player->kartstuff[k_banana] == 1 || player->kartstuff[k_fakeitem] == 1 || player->kartstuff[k_bobomb] == 1
|
|
||||||
|| player->kartstuff[k_triplegreenshell] & 1 || player->kartstuff[k_triplegreenshell] & 2 || player->kartstuff[k_triplegreenshell] & 4
|
|
||||||
|| player->kartstuff[k_tripleredshell] & 1 || player->kartstuff[k_tripleredshell] & 2 || player->kartstuff[k_tripleredshell] & 4
|
|
||||||
|| player->kartstuff[k_triplebanana] & 1 || player->kartstuff[k_triplebanana] & 2 || player->kartstuff[k_triplebanana] & 4);
|
|
||||||
boolean NO_BOO = (player->kartstuff[k_boostolentimer] == 0 && player->kartstuff[k_bootaketimer] == 0);
|
boolean NO_BOO = (player->kartstuff[k_boostolentimer] == 0 && player->kartstuff[k_bootaketimer] == 0);
|
||||||
|
|
||||||
K_KartUpdatePosition(player);
|
K_KartUpdatePosition(player);
|
||||||
|
@ -2024,7 +2048,8 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
|
||||||
// Lightning
|
// Lightning
|
||||||
|
|
||||||
// GoldenMushroom power
|
// GoldenMushroom power
|
||||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && player->kartstuff[k_goldshroom] == 1 && player->kartstuff[k_goldshroomtimer] == 0 && NO_BOO)
|
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && player->kartstuff[k_goldshroom] == 1
|
||||||
|
&& player->kartstuff[k_goldshroomtimer] == 0 && NO_BOO)
|
||||||
{
|
{
|
||||||
K_DoMushroom(player, true);
|
K_DoMushroom(player, true);
|
||||||
player->kartstuff[k_goldshroomtimer] = bonustime;
|
player->kartstuff[k_goldshroomtimer] = bonustime;
|
||||||
|
@ -2034,9 +2059,9 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
|
||||||
else if (ATTACK_IS_DOWN && player->kartstuff[k_goldshroomtimer] > 1 && onground && NO_BOO)
|
else if (ATTACK_IS_DOWN && player->kartstuff[k_goldshroomtimer] > 1 && onground && NO_BOO)
|
||||||
{
|
{
|
||||||
K_DoMushroom(player, true);
|
K_DoMushroom(player, true);
|
||||||
player->kartstuff[k_goldshroomtimer] -= 5;
|
//player->kartstuff[k_goldshroomtimer] -= 10;
|
||||||
if (player->kartstuff[k_goldshroomtimer] < 1)
|
//if (player->kartstuff[k_goldshroomtimer] < 1)
|
||||||
player->kartstuff[k_goldshroomtimer] = 1;
|
// player->kartstuff[k_goldshroomtimer] = 1;
|
||||||
}
|
}
|
||||||
// TripleMushroom power
|
// TripleMushroom power
|
||||||
else if (ATTACK_IS_DOWN && !HOLDING_ITEM && player->kartstuff[k_mushroom] == 4 && onground && NO_BOO)
|
else if (ATTACK_IS_DOWN && !HOLDING_ITEM && player->kartstuff[k_mushroom] == 4 && onground && NO_BOO)
|
||||||
|
@ -2366,7 +2391,7 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
|
||||||
if (!P_IsLocalPlayer(player))
|
if (!P_IsLocalPlayer(player))
|
||||||
S_StartSound(player->mo, sfx_mega);
|
S_StartSound(player->mo, sfx_mega);
|
||||||
//K_PlayTauntSound(player->mo);
|
//K_PlayTauntSound(player->mo);
|
||||||
player->kartstuff[k_growshrinktimer] = bonustime/2;
|
player->kartstuff[k_growshrinktimer] = bonustime;
|
||||||
S_StartSound(player->mo, sfx_mario3);
|
S_StartSound(player->mo, sfx_mario3);
|
||||||
player->pflags |= PF_ATTACKDOWN;
|
player->pflags |= PF_ATTACKDOWN;
|
||||||
player->kartstuff[k_megashroom] = 0;
|
player->kartstuff[k_megashroom] = 0;
|
||||||
|
@ -2388,7 +2413,9 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mushroom Boost
|
// Mushroom Boost
|
||||||
if (player->kartstuff[k_mushroomtimer] > 0 && player->kartstuff[k_boosting] == 0 && onground)
|
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)
|
||||||
{
|
{
|
||||||
cmd->forwardmove = 1;
|
cmd->forwardmove = 1;
|
||||||
if (player->kartstuff[k_drift] >= 1)
|
if (player->kartstuff[k_drift] >= 1)
|
||||||
|
@ -2403,7 +2430,7 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
|
||||||
player->kartstuff[k_boosting] = 0;
|
player->kartstuff[k_boosting] = 0;
|
||||||
|
|
||||||
// Megashroom - Make the player grow!
|
// Megashroom - Make the player grow!
|
||||||
if (player->kartstuff[k_growshrinktimer] > (bonustime/2 - 25))
|
if (player->kartstuff[k_growshrinktimer] > (bonustime - 25))
|
||||||
{
|
{
|
||||||
if (leveltime & 2)
|
if (leveltime & 2)
|
||||||
player->mo->destscale = FRACUNIT*3/2;
|
player->mo->destscale = FRACUNIT*3/2;
|
||||||
|
@ -2411,7 +2438,7 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
|
||||||
player->mo->destscale = FRACUNIT;
|
player->mo->destscale = FRACUNIT;
|
||||||
}
|
}
|
||||||
else if (player->kartstuff[k_growshrinktimer] > 26
|
else if (player->kartstuff[k_growshrinktimer] > 26
|
||||||
&& player->kartstuff[k_growshrinktimer] <= (bonustime/2 - 25))
|
&& player->kartstuff[k_growshrinktimer] <= (bonustime - 25))
|
||||||
player->mo->destscale = FRACUNIT*3/2;
|
player->mo->destscale = FRACUNIT*3/2;
|
||||||
// Megashroom - Back to normal...
|
// Megashroom - Back to normal...
|
||||||
else if (player->kartstuff[k_growshrinktimer] > 1
|
else if (player->kartstuff[k_growshrinktimer] > 1
|
||||||
|
|
|
@ -8132,7 +8132,9 @@ void A_ItemPop(mobj_t *actor)
|
||||||
|| actor->target->player->kartstuff[k_lightning] || actor->target->player->kartstuff[k_megashroom]
|
|| actor->target->player->kartstuff[k_lightning] || actor->target->player->kartstuff[k_megashroom]
|
||||||
|| actor->target->player->kartstuff[k_itemroulette]
|
|| actor->target->player->kartstuff[k_itemroulette]
|
||||||
|| actor->target->player->kartstuff[k_boo] || actor->target->player->kartstuff[k_bootaketimer]
|
|| actor->target->player->kartstuff[k_boo] || actor->target->player->kartstuff[k_bootaketimer]
|
||||||
|| actor->target->player->kartstuff[k_boostolentimer]))
|
|| actor->target->player->kartstuff[k_boostolentimer]
|
||||||
|
|| actor->target->player->kartstuff[k_growshrinktimer] > 1
|
||||||
|
|| actor->target->player->kartstuff[k_goldshroomtimer]))
|
||||||
actor->target->player->kartstuff[k_itemroulette] = 1;
|
actor->target->player->kartstuff[k_itemroulette] = 1;
|
||||||
else if(cv_debug && !(actor->target && actor->target->player))
|
else if(cv_debug && !(actor->target && actor->target->player))
|
||||||
CONS_Printf("ERROR: Powerup has no target!\n");
|
CONS_Printf("ERROR: Powerup has no target!\n");
|
||||||
|
|
Loading…
Reference in New Issue