mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-22 10:51:54 +00:00
BATLLE MODE
AAAAAA
This commit is contained in:
parent
10aa83e614
commit
31a13e245c
16 changed files with 513 additions and 122 deletions
|
@ -1447,8 +1447,8 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
|||
INT32 newvalue, max;
|
||||
|
||||
// count pointlimit better
|
||||
if (var == &cv_pointlimit && (gametype == GT_MATCH))
|
||||
increment *= 50;
|
||||
/*if (var == &cv_pointlimit && (gametype == GT_MATCH))
|
||||
increment *= 50;*/
|
||||
newvalue = var->value + increment;
|
||||
|
||||
if (var->PossibleValue)
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "lzf.h"
|
||||
#include "lua_script.h"
|
||||
#include "lua_hook.h"
|
||||
#include "k_kart.h"
|
||||
|
||||
#ifdef CLIENT_LOADINGSCREEN
|
||||
// cl loading screen
|
||||
|
@ -2421,6 +2422,8 @@ static void CL_RemovePlayer(INT32 playernum)
|
|||
|
||||
if (G_TagGametype()) //Check if you still have a game. Location flexible. =P
|
||||
P_CheckSurvivors();
|
||||
else if (gametype == GT_MATCH || gametype == GT_TEAMMATCH || gametype == GT_CTF)
|
||||
K_CheckBalloons(); // SRB2Kart
|
||||
else if (gametype == GT_RACE || gametype == GT_COMPETITION)
|
||||
P_CheckRacers();
|
||||
}
|
||||
|
|
|
@ -316,6 +316,8 @@ consvar_t cv_lightning = {"lightning", "On", CV_NETVAR|CV_CHEAT, CV_OnOff,
|
|||
|
||||
consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcc = {"kartcc", "100cc", CV_NETVAR, kartcc_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t kartballoons_cons_t[] = {{1, "MIN"}, {5, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_kartballoons = {"kartballoons", "3", CV_NETVAR, kartballoons_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t speedometer_cons_t[] = {{0, "Off"}, {1, "Kilometers"}, {2, "Miles"}, {3, "Fracunits"}, {0, NULL}};
|
||||
consvar_t cv_speedometer = {"speedometer", "Kilometers", CV_SAVE, speedometer_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display
|
||||
|
||||
|
@ -1063,7 +1065,7 @@ UINT8 CanChangeSkin(INT32 playernum)
|
|||
return true;
|
||||
|
||||
// Can change skin during initial countdown.
|
||||
if ((gametype == GT_RACE || gametype == GT_COMPETITION) && leveltime < 4*TICRATE)
|
||||
if (leveltime < 4*TICRATE)
|
||||
return true;
|
||||
|
||||
if (G_TagGametype())
|
||||
|
@ -1868,8 +1870,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
// a copy of color
|
||||
if (players[0].mo)
|
||||
players[0].mo->color = players[0].skincolor;
|
||||
|
||||
CV_StealthSetValue(&cv_kartcc, 150); // srb2kart
|
||||
}
|
||||
if (metalrecording)
|
||||
G_BeginMetal();
|
||||
|
@ -2661,6 +2661,8 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
// In tag, check to see if you still have a game.
|
||||
if (G_TagGametype())
|
||||
P_CheckSurvivors();
|
||||
else if (gametype == GT_MATCH || gametype == GT_TEAMMATCH || gametype == GT_CTF)
|
||||
K_CheckBalloons(); // SRB2Kart
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -3496,9 +3498,9 @@ void D_GameTypeChanged(INT32 lastgametype)
|
|||
case GT_TEAMMATCH:
|
||||
if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits
|
||||
{
|
||||
// default settings for match: timelimit 10 mins, no pointlimit
|
||||
// default settings for match: no timelimit, no pointlimit
|
||||
CV_SetValue(&cv_pointlimit, 0);
|
||||
CV_SetValue(&cv_timelimit, 10);
|
||||
CV_SetValue(&cv_timelimit, 0);
|
||||
}
|
||||
if (!cv_itemrespawntime.changed)
|
||||
CV_Set(&cv_itemrespawntime, cv_itemrespawntime.defaultvalue); // respawn normally
|
||||
|
@ -3556,7 +3558,7 @@ void D_GameTypeChanged(INT32 lastgametype)
|
|||
|
||||
// When swapping to a gametype that supports spectators,
|
||||
// make everyone a spectator initially.
|
||||
if (!splitscreen && (G_GametypeHasSpectators()))
|
||||
/*if (!splitscreen && (G_GametypeHasSpectators()))
|
||||
{
|
||||
INT32 i;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
|
@ -3565,7 +3567,7 @@ void D_GameTypeChanged(INT32 lastgametype)
|
|||
players[i].ctfteam = 0;
|
||||
players[i].spectator = true;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// don't retain teams in other modes or between changes from ctf to team match.
|
||||
// also, stop any and all forms of team scrambling that might otherwise take place.
|
||||
|
|
|
@ -106,6 +106,7 @@ extern consvar_t cv_blueshell, cv_jaws, cv_fireflower, cv_tripleredshell, cv_lig
|
|||
|
||||
extern consvar_t cv_karthud;
|
||||
extern consvar_t cv_kartcc;
|
||||
extern consvar_t cv_kartballoons;
|
||||
extern consvar_t cv_speedometer;
|
||||
|
||||
extern consvar_t cv_collideminimum;
|
||||
|
|
|
@ -302,6 +302,8 @@ typedef enum
|
|||
// 0x4 = 3 Red Shells orbiting, 0x8 = Triple Red Shell in inventory
|
||||
k_lightning, // 0x1 = Lightning in inventory
|
||||
k_kitchensink, // 0x1 = Sink in inventory
|
||||
k_balloon, // 0x1 = 1 hit left, 0x2 = 2 hits left, 0x4 = 3 hits left
|
||||
// 0x8 = 4 hits left, 0x16 = 5 hits left
|
||||
|
||||
NUMKARTSTUFF
|
||||
} kartstufftype_t;
|
||||
|
|
|
@ -6381,6 +6381,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_SINKTRAIL2",
|
||||
"S_SINKTRAIL3",
|
||||
|
||||
// Battle Mode balloon
|
||||
"S_BATTLEBALLOON",
|
||||
|
||||
// Pokey
|
||||
"S_POKEY1",
|
||||
"S_POKEY2",
|
||||
|
@ -6953,6 +6956,14 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_SINK", // Kitchen Sink Stuff
|
||||
"MT_SINKTRAIL",
|
||||
|
||||
"MT_BATTLEBALLOON1", // Battle Mode balloon stuff
|
||||
"MT_BATTLEBALLOON2",
|
||||
"MT_BATTLEBALLOON3",
|
||||
"MT_BATTLEBALLOON4",
|
||||
"MT_BATTLEBALLOON5",
|
||||
|
||||
"MT_LAKITU",
|
||||
|
||||
"MT_POKEY", // Huh, thought this was a default asset for some reason, guess not.
|
||||
"MT_ENEMYFLIP",
|
||||
"MT_WAYPOINT",
|
||||
|
|
141
src/info.c
141
src/info.c
|
@ -57,8 +57,8 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
//SRB2kart Sprites
|
||||
"SPRG","BSPR","RNDM","RPOP","KFRE","DRIF","DSMO","FITM","DFAK","BANA",
|
||||
"DBAN","GSHE","GSTR","DGSH","RSHE","RSTR","DRSH","BOMB","BLIG","LIGH",
|
||||
"SINK","SITR","LAKI","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS",
|
||||
"BUZB","CHOM","SACO","CRAB", "SHAD"
|
||||
"SINK","SITR","KBLN","LAKI","POKE","AUDI","DECO","DOOD","SNES","GBAS",
|
||||
"SPRS","BUZB","CHOM","SACO","CRAB", "SHAD"
|
||||
};
|
||||
|
||||
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
||||
|
@ -2718,6 +2718,8 @@ state_t states[NUMSTATES] =
|
|||
{SPR_SITR, 1, 5, {NULL}, 0, 0, S_SINKTRAIL3}, // S_SINKTRAIL2
|
||||
{SPR_SITR, 2, 3, {NULL}, 0, 0, S_NULL}, // S_SINKTRAIL3
|
||||
|
||||
{SPR_KBLN, 0, 1, {NULL}, 0, 0, S_BATTLEBALLOON}, // S_BATTLEBALLOON
|
||||
|
||||
{SPR_LAKI, 0, 64, {NULL}, 1, 0, S_LAKITU2}, // S_LAKITU1
|
||||
{SPR_LAKI, 1, 35, {NULL}, 0, 0, S_NULL}, // S_LAKITU2
|
||||
|
||||
|
@ -15133,6 +15135,141 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BATTLEBALLOON1
|
||||
-1, // doomednum
|
||||
S_BATTLEBALLOON,// spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
5*FRACUNIT, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
1, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BATTLEBALLOON2
|
||||
-1, // doomednum
|
||||
S_BATTLEBALLOON,// spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
5*FRACUNIT, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
1, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BATTLEBALLOON3
|
||||
-1, // doomednum
|
||||
S_BATTLEBALLOON,// spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
5*FRACUNIT, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
1, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BATTLEBALLOON4
|
||||
-1, // doomednum
|
||||
S_BATTLEBALLOON,// spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
5*FRACUNIT, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
1, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BATTLEBALLOON5
|
||||
-1, // doomednum
|
||||
S_BATTLEBALLOON,// spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
5*FRACUNIT, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
1, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_LAKITU
|
||||
-1, // doomednum
|
||||
S_LAKITU1, // spawnstate
|
||||
|
|
10
src/info.h
10
src/info.h
|
@ -600,6 +600,7 @@ typedef enum sprite
|
|||
SPR_LIGH, // Lightning
|
||||
SPR_SINK, // Kitchen Sink
|
||||
SPR_SITR, // Kitchen Sink Trail
|
||||
SPR_KBLN, // Battle Mode Balloon
|
||||
|
||||
SPR_LAKI, // Lakitu
|
||||
|
||||
|
@ -3223,6 +3224,9 @@ typedef enum state
|
|||
S_SINKTRAIL2,
|
||||
S_SINKTRAIL3,
|
||||
|
||||
// Battle Mode balloons
|
||||
S_BATTLEBALLOON,
|
||||
|
||||
// Lakitu
|
||||
S_LAKITU1,
|
||||
S_LAKITU2,
|
||||
|
@ -3939,6 +3943,12 @@ typedef enum mobj_type
|
|||
MT_SINK, // Kitchen Sink Stuff
|
||||
MT_SINKTRAIL,
|
||||
|
||||
MT_BATTLEBALLOON1, // Battle Mode balloons
|
||||
MT_BATTLEBALLOON2,
|
||||
MT_BATTLEBALLOON3,
|
||||
MT_BATTLEBALLOON4,
|
||||
MT_BATTLEBALLOON5,
|
||||
|
||||
MT_LAKITU,
|
||||
|
||||
MT_POKEY, // Huh, thought this was a default asset for some reason, guess not.
|
||||
|
|
244
src/k_kart.c
244
src/k_kart.c
|
@ -295,6 +295,7 @@ void K_RegisterKartStuff(void)
|
|||
CV_RegisterVar(&cv_lightning);
|
||||
|
||||
CV_RegisterVar(&cv_kartcc);
|
||||
CV_RegisterVar(&cv_kartballoons);
|
||||
CV_RegisterVar(&cv_speedometer);
|
||||
CV_RegisterVar(&cv_collideminimum);
|
||||
CV_RegisterVar(&cv_collidesoundnum);
|
||||
|
@ -303,6 +304,16 @@ void K_RegisterKartStuff(void)
|
|||
|
||||
//}
|
||||
|
||||
UINT8 K_GetKartCC(void)
|
||||
{
|
||||
if (gametype == GT_MATCH)
|
||||
return 50;
|
||||
else if (modeattacking)
|
||||
return 150;
|
||||
else
|
||||
return cv_kartcc.value;
|
||||
}
|
||||
|
||||
//{ SRB2kart Roulette Code - Position Based
|
||||
|
||||
#define NUMKARTITEMS 18
|
||||
|
@ -667,28 +678,28 @@ static INT32 K_KartItemOddsPosition_Retro[MAXPLAYERS][NUMKARTITEMS][MAXPLAYERS]
|
|||
*/
|
||||
|
||||
// Less ugly 2D arrays
|
||||
static INT32 K_KartItemOddsDistance_Retro[NUMKARTITEMS][9] =
|
||||
static INT32 K_KartItemOddsDistance_Retro[NUMKARTITEMS][10] =
|
||||
{
|
||||
//P-Odds 0 1 2 3 4 5 6 7 8
|
||||
/*Magnet*/ { 0, 1, 2, 0, 0, 0, 0, 0, 0 }, // Magnet
|
||||
/*Boo*/ { 0, 0, 2, 2, 1, 0, 0, 0, 0 }, // Boo
|
||||
/*Mushroom*/ { 1, 0, 0, 3, 7, 5, 0, 0, 0 }, // Mushroom
|
||||
/*Triple Mushroom*/ { 0, 0, 0, 0, 3,10, 6, 4, 0 }, // Triple Mushroom
|
||||
/*Mega Mushroom*/ { 0, 0, 0, 0, 0, 1, 1, 0, 0 }, // Mega Mushroom
|
||||
/*Gold Mushroom*/ { 0, 0, 0, 0, 0, 1, 6, 8,12 }, // Gold Mushroom
|
||||
/*Star*/ { 0, 0, 0, 0, 0, 0, 4, 6, 8 }, // Star
|
||||
//P-Odds 0 1 2 3 4 5 6 7 8 9
|
||||
/*Magnet*/ { 2, 0, 1, 2, 0, 0, 0, 0, 0, 0 }, // Magnet
|
||||
/*Boo*/ { 1, 0, 0, 2, 2, 1, 0, 0, 0, 0 }, // Boo
|
||||
/*Mushroom*/ { 1, 1, 0, 0, 3, 7, 5, 0, 0, 0 }, // Mushroom
|
||||
/*Triple Mushroom*/ { 0, 0, 0, 0, 0, 3,10, 6, 4, 0 }, // Triple Mushroom
|
||||
/*Mega Mushroom*/ { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 }, // Mega Mushroom
|
||||
/*Gold Mushroom*/ { 0, 0, 0, 0, 0, 0, 1, 6, 8,12 }, // Gold Mushroom
|
||||
/*Star*/ { 1, 0, 0, 0, 0, 0, 0, 4, 6, 8 }, // Star
|
||||
|
||||
/*Triple Banana*/ { 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // Triple Banana
|
||||
/*Fake Item*/ { 0, 4, 2, 1, 0, 0, 0, 0, 0 }, // Fake Item
|
||||
/*Banana*/ { 0, 9, 4, 2, 1, 0, 0, 0, 0 }, // Banana
|
||||
/*Green Shell*/ { 0, 6, 4, 3, 2, 0, 0, 0, 0 }, // Green Shell
|
||||
/*Red Shell*/ { 0, 0, 3, 2, 2, 1, 0, 0, 0 }, // Red Shell
|
||||
/*Triple Green Shell*/ { 0, 0, 0, 1, 1, 1, 0, 0, 0 }, // Triple Green Shell
|
||||
/*Bob-omb*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Bob-omb
|
||||
/*Blue Shell*/ { 0, 0, 0, 0, 0, 1, 2, 0, 0 }, // Blue Shell
|
||||
/*Fire Flower*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Fire Flower
|
||||
/*Triple Red Shell*/ { 0, 0, 0, 1, 1, 0, 0, 0, 0 }, // Triple Red Shell
|
||||
/*Lightning*/ { 0, 0, 0, 0, 0, 0, 1, 2, 0 } // Lightning
|
||||
/*Triple Banana*/ { 1, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // Triple Banana
|
||||
/*Fake Item*/ { 0, 0, 4, 2, 1, 0, 0, 0, 0, 0 }, // Fake Item
|
||||
/*Banana*/ { 3, 0, 9, 4, 2, 1, 0, 0, 0, 0 }, // Banana
|
||||
/*Green Shell*/ { 4, 0, 6, 4, 3, 2, 0, 0, 0, 0 }, // Green Shell
|
||||
/*Red Shell*/ { 1, 0, 0, 3, 2, 2, 1, 0, 0, 0 }, // Red Shell
|
||||
/*Triple Green Shell*/ { 2, 0, 0, 0, 1, 1, 1, 0, 0, 0 }, // Triple Green Shell
|
||||
/*Bob-omb*/ { 2, 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Bob-omb
|
||||
/*Blue Shell*/ { 0, 0, 0, 0, 0, 0, 1, 2, 0, 0 }, // Blue Shell
|
||||
/*Fire Flower*/ { 2, 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Fire Flower
|
||||
/*Triple Red Shell*/ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0 }, // Triple Red Shell
|
||||
/*Lightning*/ { 0, 0, 0, 0, 0, 0, 0, 1, 2, 0 } // Lightning
|
||||
};
|
||||
|
||||
/** \brief Item Roulette for Kart
|
||||
|
@ -969,15 +980,16 @@ static void K_KartItemRouletteByDistance(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
player->kartstuff[k_itemclose] = 0; // Reset the item window closer.
|
||||
|
||||
if (pingame == 1) useodds = 0;
|
||||
else if (pdis <= distvar * 0) useodds = 1; // (64*14) * 0 = 0
|
||||
else if (pdis <= distvar * 1) useodds = 2; // (64*14) * 1 = 896
|
||||
else if (pdis <= distvar * 2) useodds = 3; // (64*14) * 2 = 1792
|
||||
else if (pdis <= distvar * 4) useodds = 4; // (64*14) * 4 = 3584
|
||||
else if (pdis <= distvar * 6) useodds = 5; // (64*14) * 6 = 5376
|
||||
else if (pdis <= distvar * 9) useodds = 6; // (64*14) * 9 = 8064
|
||||
else if (pdis <= distvar * 12) useodds = 7; // (64*14) * 12 = 10752
|
||||
else useodds = 8;
|
||||
if (gametype == GT_MATCH) useodds = 0; // Battle Mode
|
||||
else if (pingame == 1) useodds = 1; // Record Attack, or just alone
|
||||
else if (pdis <= distvar * 0) useodds = 2; // (64*14) * 0 = 0
|
||||
else if (pdis <= distvar * 1) useodds = 3; // (64*14) * 1 = 896
|
||||
else if (pdis <= distvar * 2) useodds = 4; // (64*14) * 2 = 1792
|
||||
else if (pdis <= distvar * 4) useodds = 5; // (64*14) * 4 = 3584
|
||||
else if (pdis <= distvar * 6) useodds = 6; // (64*14) * 6 = 5376
|
||||
else if (pdis <= distvar * 9) useodds = 7; // (64*14) * 9 = 8064
|
||||
else if (pdis <= distvar * 12) useodds = 8; // (64*14) * 12 = 10752
|
||||
else useodds = 9;
|
||||
|
||||
#define SETITEMRESULT(pos, itemnum) \
|
||||
for (chance = 0; chance < K_KartItemOddsDistance_Retro[itemnum-1][pos]; chance++) spawnchance[numchoices++] = itemnum
|
||||
|
@ -1497,7 +1509,7 @@ static fixed_t K_GetKartBoostPower(player_t *player, boolean speed)
|
|||
{ // Mushroom
|
||||
if (speed)
|
||||
{
|
||||
switch (cv_kartcc.value)
|
||||
switch (K_GetKartCC())
|
||||
{
|
||||
case 50:
|
||||
boostvalue = max(boostvalue, 53740+768);
|
||||
|
@ -1525,8 +1537,7 @@ fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower)
|
|||
fixed_t g_cc = FRACUNIT;
|
||||
fixed_t xspd = 3072; // 4.6875 aka 3/64
|
||||
fixed_t finalspeed;
|
||||
|
||||
switch (cv_kartcc.value)
|
||||
switch (K_GetKartCC())
|
||||
{
|
||||
case 50:
|
||||
g_cc = 53248 + xspd; // 50cc = 81.25 + 4.69 = 85.94%
|
||||
|
@ -1594,7 +1605,7 @@ fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove
|
|||
|
||||
void K_SpinPlayer(player_t *player, mobj_t *source)
|
||||
{
|
||||
(void) source;
|
||||
//(void) source;
|
||||
if (player->health <= 0)
|
||||
return;
|
||||
|
||||
|
@ -1605,6 +1616,29 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
|
|||
player->kartstuff[k_mushroomtimer] = 0;
|
||||
player->kartstuff[k_driftboost] = 0;
|
||||
|
||||
if (gametype == GT_MATCH && gameaction != ga_completed)
|
||||
{
|
||||
if (player->kartstuff[k_balloon] & 16)
|
||||
player->kartstuff[k_balloon] &= ~16;
|
||||
else if (player->kartstuff[k_balloon] & 8)
|
||||
player->kartstuff[k_balloon] &= ~8;
|
||||
else if (player->kartstuff[k_balloon] & 4)
|
||||
player->kartstuff[k_balloon] &= ~4;
|
||||
else if (player->kartstuff[k_balloon] & 2)
|
||||
player->kartstuff[k_balloon] &= ~2;
|
||||
else if (player->kartstuff[k_balloon] & 1)
|
||||
{
|
||||
player->kartstuff[k_balloon] &= ~1;
|
||||
//P_DamageMobj(player->mo, NULL, NULL, 10000);
|
||||
//return;
|
||||
}
|
||||
|
||||
if (source && source->player)
|
||||
source->player->score++;
|
||||
|
||||
K_CheckBalloons();
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_spinouttype] <= 0)
|
||||
{
|
||||
if (player->kartstuff[k_spinouttype] == 0)
|
||||
|
@ -1635,7 +1669,7 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
|
|||
|
||||
void K_SquishPlayer(player_t *player, mobj_t *source)
|
||||
{
|
||||
(void) source;
|
||||
//(void) source;
|
||||
if (player->health <= 0)
|
||||
return;
|
||||
|
||||
|
@ -1646,6 +1680,29 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
|
|||
player->kartstuff[k_mushroomtimer] = 0;
|
||||
player->kartstuff[k_driftboost] = 0;
|
||||
|
||||
if (gametype == GT_MATCH && gameaction != ga_completed)
|
||||
{
|
||||
if (player->kartstuff[k_balloon] & 16)
|
||||
player->kartstuff[k_balloon] &= ~16;
|
||||
else if (player->kartstuff[k_balloon] & 8)
|
||||
player->kartstuff[k_balloon] &= ~8;
|
||||
else if (player->kartstuff[k_balloon] & 4)
|
||||
player->kartstuff[k_balloon] &= ~4;
|
||||
else if (player->kartstuff[k_balloon] & 2)
|
||||
player->kartstuff[k_balloon] &= ~2;
|
||||
else if (player->kartstuff[k_balloon] & 1)
|
||||
{
|
||||
player->kartstuff[k_balloon] &= ~1;
|
||||
//P_DamageMobj(player->mo, NULL, NULL, 10000);
|
||||
//return;
|
||||
}
|
||||
|
||||
if (source && source->player)
|
||||
source->player->score++;
|
||||
|
||||
K_CheckBalloons();
|
||||
}
|
||||
|
||||
player->kartstuff[k_squishedtimer] = 1*TICRATE;
|
||||
|
||||
player->powers[pw_flashing] = flashingtics;
|
||||
|
@ -1662,7 +1719,7 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
|
|||
|
||||
void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we just throw the player up higher here and extend their spinout timer
|
||||
{
|
||||
(void) source;
|
||||
//(void) source;
|
||||
if (player->health <= 0)
|
||||
return;
|
||||
|
||||
|
@ -1676,6 +1733,29 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
|
|||
player->kartstuff[k_mushroomtimer] = 0;
|
||||
player->kartstuff[k_driftboost] = 0;
|
||||
|
||||
if (gametype == GT_MATCH && gameaction != ga_completed)
|
||||
{
|
||||
if (player->kartstuff[k_balloon] & 16)
|
||||
player->kartstuff[k_balloon] &= ~16;
|
||||
else if (player->kartstuff[k_balloon] & 8)
|
||||
player->kartstuff[k_balloon] &= ~8;
|
||||
else if (player->kartstuff[k_balloon] & 4)
|
||||
player->kartstuff[k_balloon] &= ~4;
|
||||
else if (player->kartstuff[k_balloon] & 2)
|
||||
player->kartstuff[k_balloon] &= ~2;
|
||||
else if (player->kartstuff[k_balloon] & 1)
|
||||
{
|
||||
player->kartstuff[k_balloon] &= ~1;
|
||||
//P_DamageMobj(player->mo, NULL, NULL, 10000);
|
||||
//return;
|
||||
}
|
||||
|
||||
if (source && source->player)
|
||||
source->player->score++;
|
||||
|
||||
K_CheckBalloons();
|
||||
}
|
||||
|
||||
player->kartstuff[k_spinouttype] = 1;
|
||||
player->kartstuff[k_spinouttimer] = 2*TICRATE+(TICRATE/2);
|
||||
player->kartstuff[k_spinout] = player->kartstuff[k_spinouttimer];
|
||||
|
@ -1896,7 +1976,7 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
|
|||
return NULL;
|
||||
|
||||
// Figure out projectile speed by CC
|
||||
switch (cv_kartcc.value)
|
||||
switch (K_GetKartCC())
|
||||
{
|
||||
case 50:
|
||||
PROJSPEED = 85*FRACUNIT; // Avg Speed is 34
|
||||
|
@ -2084,6 +2164,7 @@ static void K_DoBooSteal(player_t *player)
|
|||
if (playeringame[i] && players[i].mo && players[i].mo->health > 0 && players[i].playerstate == PST_LIVE
|
||||
&& !players[i].exiting && !players[i].powers[pw_super] && !((netgame || multiplayer) && players[i].spectator)
|
||||
&& players[i].kartstuff[k_position] < player->kartstuff[k_position] && player != &players[i]
|
||||
&& (gametype == GT_MATCH && players[i].kartstuff[k_balloon] > 0)
|
||||
|
||||
&& (players[i].kartstuff[k_star] || players[i].kartstuff[k_mushroom] || players[i].kartstuff[k_goldshroom]
|
||||
|| players[i].kartstuff[k_megashroom] || players[i].kartstuff[k_lightning] || players[i].kartstuff[k_blueshell]
|
||||
|
@ -2540,7 +2621,32 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
boolean HOLDING_ITEM = K_CheckForHoldItem(player);
|
||||
boolean NO_BOO = (player->kartstuff[k_boostolentimer] == 0 && player->kartstuff[k_bootaketimer] == 0);
|
||||
|
||||
K_KartUpdatePosition(player);
|
||||
if (gametype == GT_RACE)
|
||||
K_KartUpdatePosition(player);
|
||||
else if (gametype == GT_MATCH && player->kartstuff[k_balloon] <= 0) // dead in match? BOO!
|
||||
{
|
||||
player->kartstuff[k_bootaketimer] = bootime;
|
||||
player->kartstuff[k_magnet] = 0; // reset all those dang items
|
||||
player->kartstuff[k_boo] = 0;
|
||||
player->kartstuff[k_mushroom] = 0;
|
||||
player->kartstuff[k_megashroom] = 0;
|
||||
player->kartstuff[k_goldshroom] = 0;
|
||||
player->kartstuff[k_star] = 0;
|
||||
player->kartstuff[k_triplebanana] = 0;
|
||||
player->kartstuff[k_fakeitem] = 0;
|
||||
player->kartstuff[k_banana] = 0;
|
||||
player->kartstuff[k_greenshell] = 0;
|
||||
player->kartstuff[k_redshell] = 0;
|
||||
player->kartstuff[k_laserwisp] = 0;
|
||||
player->kartstuff[k_triplegreenshell] = 0;
|
||||
player->kartstuff[k_bobomb] = 0;
|
||||
player->kartstuff[k_blueshell] = 0;
|
||||
player->kartstuff[k_jaws] = 0;
|
||||
player->kartstuff[k_fireflower] = 0;
|
||||
player->kartstuff[k_tripleredshell] = 0;
|
||||
player->kartstuff[k_lightning] = 0;
|
||||
player->kartstuff[k_kitchensink] = 0;
|
||||
}
|
||||
|
||||
// Position Taunt
|
||||
// If you were behind someone but just passed them, taunt at them!
|
||||
|
@ -3091,6 +3197,34 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
}
|
||||
}
|
||||
|
||||
void K_CheckBalloons(void)
|
||||
{
|
||||
UINT8 i;
|
||||
INT8 winnernum = -1;
|
||||
|
||||
if (gameaction == ga_completed)
|
||||
return;
|
||||
|
||||
if (!D_NumPlayers())
|
||||
return;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator || players[i].kartstuff[k_balloon] <= 0)
|
||||
continue;
|
||||
|
||||
if (winnernum > -1)
|
||||
return;
|
||||
|
||||
winnernum = i;
|
||||
}
|
||||
|
||||
players[winnernum].score += 20;
|
||||
CONS_Printf(M_GetText("%s has recieved 20 points for surviving!\n"), player_names[winnernum]);
|
||||
if (server)
|
||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
}
|
||||
|
||||
//}
|
||||
|
||||
//{ SRB2kart HUD Code
|
||||
|
@ -4029,29 +4163,31 @@ void K_drawKartHUD(void)
|
|||
else
|
||||
K_drawKartRetroItem();
|
||||
|
||||
// If not splitscreen, draw...
|
||||
// The little triple-item icons at the bottom
|
||||
// The top-four faces on the left
|
||||
if (!(splitscreen || modeattacking))
|
||||
//K_DrawKartTripleItem();
|
||||
|
||||
if (gametype == GT_RACE) // Race-only elements
|
||||
{
|
||||
//K_DrawKartTripleItem();
|
||||
K_drawKartPositionFaces();
|
||||
// If not splitscreen, draw...
|
||||
// The little triple-item icons at the bottom
|
||||
// The top-four faces on the left
|
||||
if (!(splitscreen || modeattacking))
|
||||
{
|
||||
K_drawKartPositionFaces();
|
||||
// Draw the numerical position
|
||||
K_DrawKartPositionNum(stplyr->kartstuff[k_position]);
|
||||
}
|
||||
|
||||
// Draw the lap counter
|
||||
V_DrawScaledPatch(LAPS_X, STRINGY(LAPS_Y), 0, kp_lapsticker);
|
||||
if (stplyr->exiting)
|
||||
V_DrawKartString(LAPS_X+33, STRINGY(LAPS_Y+3), 0, "FIN");
|
||||
else
|
||||
V_DrawKartString(LAPS_X+33, STRINGY(LAPS_Y+3), 0, va("%d/%d", stplyr->laps+1, cv_numlaps.value));
|
||||
}
|
||||
|
||||
// Draw the timestamp
|
||||
K_drawKartTimestamp();
|
||||
|
||||
// Draw the lap counter
|
||||
V_DrawScaledPatch(LAPS_X, STRINGY(LAPS_Y), 0, kp_lapsticker);
|
||||
if (stplyr->exiting)
|
||||
V_DrawKartString(LAPS_X+33, STRINGY(LAPS_Y+3), 0, "FIN");
|
||||
else
|
||||
V_DrawKartString(LAPS_X+33, STRINGY(LAPS_Y+3), 0, va("%d/%d", stplyr->laps+1, cv_numlaps.value));
|
||||
|
||||
// Draw the numerical position
|
||||
if (!modeattacking)
|
||||
K_DrawKartPositionNum(stplyr->kartstuff[k_position]);
|
||||
|
||||
// Draw the speedometer
|
||||
// TODO: Make a better speedometer.
|
||||
K_drawKartSpeedometer();
|
||||
|
|
|
@ -28,6 +28,7 @@ void K_MomentumToFacing(player_t *player);
|
|||
fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower);
|
||||
fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove);
|
||||
void K_MoveKartPlayer(player_t *player, boolean onground);
|
||||
void K_CheckBalloons(void);
|
||||
|
||||
void K_LoadKartHUDGraphics(void);
|
||||
void K_drawKartHUD(void);
|
||||
|
|
|
@ -850,7 +850,7 @@ void A_Look(mobj_t *actor)
|
|||
if (!P_LookForPlayers(actor, locvar1 & 65535, false , FixedMul((locvar1 >> 16)*FRACUNIT, actor->scale)))
|
||||
return;
|
||||
|
||||
if (leveltime < 4*TICRATE && gametype == GT_RACE) // SRB2kart - no looking before race starts
|
||||
if (leveltime < 4*TICRATE) // SRB2kart - no looking before race starts
|
||||
return;
|
||||
|
||||
// go into chase state
|
||||
|
|
|
@ -2004,6 +2004,16 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
|||
target->target->player->kartstuff[k_triplebanana] &= ~2;
|
||||
else if (target->type == MT_TRIPLEBANANASHIELD3 && target->target->player->kartstuff[k_triplebanana] & 4)
|
||||
target->target->player->kartstuff[k_triplebanana] &= ~4;
|
||||
else if (target->type == MT_BATTLEBALLOON1 && target->target->player->kartstuff[k_balloon] & 1)
|
||||
target->target->player->kartstuff[k_balloon] &= ~1;
|
||||
else if (target->type == MT_BATTLEBALLOON2 && target->target->player->kartstuff[k_balloon] & 2)
|
||||
target->target->player->kartstuff[k_balloon] &= ~2;
|
||||
else if (target->type == MT_BATTLEBALLOON3 && target->target->player->kartstuff[k_balloon] & 4)
|
||||
target->target->player->kartstuff[k_balloon] &= ~4;
|
||||
else if (target->type == MT_BATTLEBALLOON4 && target->target->player->kartstuff[k_balloon] & 8)
|
||||
target->target->player->kartstuff[k_balloon] &= ~8;
|
||||
else if (target->type == MT_BATTLEBALLOON5 && target->target->player->kartstuff[k_balloon] & 16)
|
||||
target->target->player->kartstuff[k_balloon] &= ~16;
|
||||
}
|
||||
//
|
||||
|
||||
|
@ -2224,6 +2234,10 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (gametype == GT_MATCH)
|
||||
{
|
||||
K_CheckBalloons();
|
||||
}
|
||||
}
|
||||
|
||||
if (source && target && target->player && source->player)
|
||||
|
|
|
@ -153,7 +153,7 @@ void P_DoJumpShield(player_t *player);
|
|||
void P_BlackOw(player_t *player);
|
||||
void P_ElementalFireTrail(player_t *player);
|
||||
|
||||
void P_DoPityCheck(player_t *player);
|
||||
//void P_DoPityCheck(player_t *player);
|
||||
void P_PlayerThink(player_t *player);
|
||||
void P_PlayerAfterThink(player_t *player);
|
||||
void P_DoPlayerExit(player_t *player);
|
||||
|
|
108
src/p_mobj.c
108
src/p_mobj.c
|
@ -218,7 +218,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
{
|
||||
// Start flashing, since you've landed.
|
||||
player->powers[pw_flashing] = flashingtics-1;
|
||||
P_DoPityCheck(player);
|
||||
//P_DoPityCheck(player);
|
||||
}
|
||||
|
||||
// Set animation state
|
||||
|
@ -6573,6 +6573,11 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
case MT_TRIPLEBANANASHIELD1:
|
||||
case MT_TRIPLEBANANASHIELD2:
|
||||
case MT_TRIPLEBANANASHIELD3:
|
||||
case MT_BATTLEBALLOON1:
|
||||
case MT_BATTLEBALLOON2:
|
||||
case MT_BATTLEBALLOON3:
|
||||
case MT_BATTLEBALLOON4:
|
||||
case MT_BATTLEBALLOON5:
|
||||
if (mobj->health > 0 && mobj->target && mobj->target->player && mobj->target->player->mo
|
||||
&& mobj->target->player->health > 0 && !mobj->target->player->spectator)
|
||||
{
|
||||
|
@ -6588,7 +6593,9 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
|
||||
//mobj->angle += FixedAngle(12*FRACUNIT); // mobj's actual speed.
|
||||
if (mobj->type == MT_TRIPLEGREENSHIELD1 || mobj->type == MT_TRIPLEGREENSHIELD2 || mobj->type == MT_TRIPLEGREENSHIELD3
|
||||
|| mobj->type == MT_TRIPLEREDSHIELD1 || mobj->type == MT_TRIPLEREDSHIELD2 || mobj->type == MT_TRIPLEREDSHIELD3)
|
||||
|| mobj->type == MT_TRIPLEREDSHIELD1 || mobj->type == MT_TRIPLEREDSHIELD2 || mobj->type == MT_TRIPLEREDSHIELD3
|
||||
|| mobj->type == MT_BATTLEBALLOON1 || mobj->type == MT_BATTLEBALLOON2 || mobj->type == MT_BATTLEBALLOON3
|
||||
|| mobj->type == MT_BATTLEBALLOON4 || mobj->type == MT_BATTLEBALLOON5)
|
||||
mobj->angle += FixedAngle(mobj->info->speed);
|
||||
else if (mobj->type == MT_TRIPLEBANANASHIELD2)
|
||||
mobj->angle = (mobj->target->angle + ANGLE_135);
|
||||
|
@ -6597,8 +6604,12 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
else
|
||||
mobj->angle = (mobj->target->angle + ANGLE_180);
|
||||
|
||||
if (mobj->type == MT_BATTLEBALLOON1 || mobj->type == MT_BATTLEBALLOON2 || mobj->type == MT_BATTLEBALLOON3
|
||||
|| mobj->type == MT_BATTLEBALLOON4 || mobj->type == MT_BATTLEBALLOON5)
|
||||
mobj->color = mobj->target->color;
|
||||
|
||||
// If the player is on the ceiling, then flip your items as well.
|
||||
if (mobj->target->player && mobj->target->eflags & MFE_VERTICALFLIP)
|
||||
if (mobj->target->eflags & MFE_VERTICALFLIP)
|
||||
{
|
||||
mobj->eflags |= MFE_VERTICALFLIP;
|
||||
HEIGHT = mobj->target->height / 2;
|
||||
|
@ -6610,8 +6621,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
|
||||
// Shrink your items if the player shrunk too.
|
||||
if (mobj->target->player)
|
||||
mobj->scale = mobj->target->scale;
|
||||
mobj->scale = mobj->target->scale;
|
||||
|
||||
P_UnsetThingPosition(mobj);
|
||||
{
|
||||
|
@ -6636,7 +6646,12 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
|| (mobj->type == MT_TRIPLEBANANASHIELD2 && !(mobj->target->player->kartstuff[k_triplebanana] & 2))
|
||||
|| (mobj->type == MT_TRIPLEBANANASHIELD3 && !(mobj->target->player->kartstuff[k_triplebanana] & 4))
|
||||
|| (mobj->type == MT_BOMBSHIELD && !(mobj->target->player->kartstuff[k_bobomb] & 1))
|
||||
|| (mobj->type == MT_FAKESHIELD && !(mobj->target->player->kartstuff[k_fakeitem] & 1)))
|
||||
|| (mobj->type == MT_FAKESHIELD && !(mobj->target->player->kartstuff[k_fakeitem] & 1))
|
||||
|| (mobj->type == MT_BATTLEBALLOON1 && !(mobj->target->player->kartstuff[k_balloon] & 1))
|
||||
|| (mobj->type == MT_BATTLEBALLOON2 && !(mobj->target->player->kartstuff[k_balloon] & 2))
|
||||
|| (mobj->type == MT_BATTLEBALLOON3 && !(mobj->target->player->kartstuff[k_balloon] & 4))
|
||||
|| (mobj->type == MT_BATTLEBALLOON4 && !(mobj->target->player->kartstuff[k_balloon] & 8))
|
||||
|| (mobj->type == MT_BATTLEBALLOON5 && !(mobj->target->player->kartstuff[k_balloon] & 16)))
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
|
@ -9030,13 +9045,13 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
{
|
||||
// Special case for (NiGHTS) special stages!
|
||||
// if stage has already started, force players to become spectators until the next stage
|
||||
if (multiplayer && netgame && G_IsSpecialStage(gamemap) && useNightsSS && leveltime > 0)
|
||||
/*if (multiplayer && netgame && G_IsSpecialStage(gamemap) && useNightsSS && leveltime > 0)
|
||||
p->spectator = true;
|
||||
else
|
||||
else*/
|
||||
p->spectator = false;
|
||||
}
|
||||
else if (netgame && p->jointime < 1)
|
||||
p->spectator = true;
|
||||
/*p->spectator = true*/;
|
||||
else if (multiplayer && !netgame)
|
||||
{
|
||||
// If you're in a team game and you don't have a team assigned yet...
|
||||
|
@ -9106,7 +9121,80 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
P_FlashPal(p, 0, 0); // Resets
|
||||
|
||||
// Spawn with a pity shield if necessary.
|
||||
P_DoPityCheck(p);
|
||||
//P_DoPityCheck(p);
|
||||
|
||||
if (gametype == GT_MATCH && p->playerstate != PST_REBORN) // srb2kart
|
||||
{
|
||||
angle_t newangle, diff;
|
||||
fixed_t newx;
|
||||
fixed_t newy;
|
||||
mobj_t *mo, *mo2, *mo3, *mo4, *mo5;
|
||||
|
||||
switch (cv_kartballoons.value) // Fallthrough intentional
|
||||
{
|
||||
case 5:
|
||||
p->kartstuff[k_balloon] |= 0x16;
|
||||
case 4:
|
||||
p->kartstuff[k_balloon] |= 0x08;
|
||||
case 3:
|
||||
p->kartstuff[k_balloon] |= 0x04;
|
||||
case 2:
|
||||
p->kartstuff[k_balloon] |= 0x02;
|
||||
case 1:
|
||||
p->kartstuff[k_balloon] |= 0x01;
|
||||
break;
|
||||
default:
|
||||
p->kartstuff[k_balloon] = 0x01|0x02|0x04;
|
||||
break;
|
||||
}
|
||||
|
||||
newangle = mobj->angle;
|
||||
diff = FixedAngle(360*FRACUNIT/cv_kartballoons.value);
|
||||
newx = mobj->x + P_ReturnThrustX(mobj, newangle + ANGLE_180, 64*FRACUNIT);
|
||||
newy = mobj->y + P_ReturnThrustY(mobj, newangle + ANGLE_180, 64*FRACUNIT);
|
||||
|
||||
mo = P_SpawnMobj(newx, newy, mobj->z, MT_BATTLEBALLOON1);
|
||||
mo->threshold = 10;
|
||||
P_SetTarget(&mo->target, mobj);
|
||||
mo->angle = 0;
|
||||
mo->color = mobj->color;
|
||||
|
||||
if (p->kartstuff[k_balloon] & 2)
|
||||
{
|
||||
mo2 = P_SpawnMobj(newx, newy, mobj->z, MT_BATTLEBALLOON2);
|
||||
mo2->threshold = 10;
|
||||
P_SetTarget(&mo2->target, mobj);
|
||||
mo2->angle = diff;
|
||||
mo2->color = mobj->color;
|
||||
}
|
||||
|
||||
if (p->kartstuff[k_balloon] & 4)
|
||||
{
|
||||
mo3 = P_SpawnMobj(newx, newy, mobj->z, MT_BATTLEBALLOON3);
|
||||
mo3->threshold = 10;
|
||||
P_SetTarget(&mo3->target, mobj);
|
||||
mo3->angle = diff*2;
|
||||
mo3->color = mobj->color;
|
||||
}
|
||||
|
||||
if (p->kartstuff[k_balloon] & 8)
|
||||
{
|
||||
mo4 = P_SpawnMobj(newx, newy, mobj->z, MT_BATTLEBALLOON4);
|
||||
mo4->threshold = 10;
|
||||
P_SetTarget(&mo4->target, mobj);
|
||||
mo4->angle = diff*3;
|
||||
mo4->color = mobj->color;
|
||||
}
|
||||
|
||||
if (p->kartstuff[k_balloon] & 16)
|
||||
{
|
||||
mo5 = P_SpawnMobj(newx, newy, mobj->z, MT_BATTLEBALLOON5);
|
||||
mo5->threshold = 10;
|
||||
P_SetTarget(&mo5->target, mobj);
|
||||
mo5->angle = diff*4;
|
||||
mo5->color = mobj->color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void P_AfterPlayerSpawn(INT32 playernum)
|
||||
|
|
|
@ -2566,8 +2566,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
|
||||
// chasecam on in chaos, race, coop
|
||||
// chasecam off in match, tag, capture the flag
|
||||
chase = (gametype == GT_RACE || gametype == GT_COMPETITION || gametype == GT_COOP)
|
||||
|| (maptol & TOL_2D);
|
||||
chase = true; // srb2kart: always on
|
||||
|
||||
if (!dedicated)
|
||||
{
|
||||
|
|
73
src/p_user.c
73
src/p_user.c
|
@ -8038,41 +8038,33 @@ static void P_DeathThink(player_t *player)
|
|||
}
|
||||
}
|
||||
|
||||
if (gametype == GT_RACE || gametype == GT_COMPETITION || (gametype == GT_COOP && (multiplayer || netgame)))
|
||||
// Keep time rolling
|
||||
if (!(countdown2 && !countdown) && !player->exiting && !(player->pflags & PF_TIMEOVER))
|
||||
{
|
||||
if (leveltime >= 4*TICRATE)
|
||||
player->realtime = leveltime - 4*TICRATE;
|
||||
else
|
||||
player->realtime = 0;
|
||||
}
|
||||
|
||||
if ((gametype == GT_RACE || gametype == GT_COMPETITION || (gametype == GT_COOP && (multiplayer || netgame))) && (player->lives <= 0))
|
||||
{
|
||||
// Keep time rolling in race mode
|
||||
if (!(countdown2 && !countdown) && !player->exiting && !(player->pflags & PF_TIMEOVER))
|
||||
{
|
||||
if (gametype == GT_RACE || gametype == GT_COMPETITION)
|
||||
{
|
||||
if (leveltime >= 4*TICRATE)
|
||||
player->realtime = leveltime - 4*TICRATE;
|
||||
else
|
||||
player->realtime = 0;
|
||||
}
|
||||
else
|
||||
player->realtime = leveltime;
|
||||
}
|
||||
|
||||
// Return to level music
|
||||
if (player->lives <= 0)
|
||||
if (netgame)
|
||||
{
|
||||
if (netgame)
|
||||
{
|
||||
if (player->deadtimer == gameovertics && P_IsLocalPlayer(player))
|
||||
S_ChangeMusic(mapmusname, mapmusflags, true);
|
||||
}
|
||||
else if (multiplayer) // local multiplayer only
|
||||
{
|
||||
if (player->deadtimer != gameovertics)
|
||||
;
|
||||
// Restore the other player's music once we're dead for long enough
|
||||
// -- that is, as long as they aren't dead too
|
||||
else if (player == &players[displayplayer] && players[secondarydisplayplayer].lives > 0)
|
||||
P_RestoreMusic(&players[secondarydisplayplayer]);
|
||||
else if (player == &players[secondarydisplayplayer] && players[displayplayer].lives > 0)
|
||||
P_RestoreMusic(&players[displayplayer]);
|
||||
}
|
||||
if (player->deadtimer == gameovertics && P_IsLocalPlayer(player))
|
||||
S_ChangeMusic(mapmusname, mapmusflags, true);
|
||||
}
|
||||
else if (multiplayer) // local multiplayer only
|
||||
{
|
||||
if (player->deadtimer != gameovertics)
|
||||
;
|
||||
// Restore the other player's music once we're dead for long enough
|
||||
// -- that is, as long as they aren't dead too
|
||||
else if (player == &players[displayplayer] && players[secondarydisplayplayer].lives > 0)
|
||||
P_RestoreMusic(&players[secondarydisplayplayer]);
|
||||
else if (player == &players[secondarydisplayplayer] && players[displayplayer].lives > 0)
|
||||
P_RestoreMusic(&players[displayplayer]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9007,7 +8999,7 @@ static void P_CalcPostImg(player_t *player)
|
|||
#endif
|
||||
}
|
||||
|
||||
void P_DoPityCheck(player_t *player)
|
||||
/*void P_DoPityCheck(player_t *player)
|
||||
{
|
||||
// No pity outside of match or CTF.
|
||||
if (player->spectator
|
||||
|
@ -9024,7 +9016,7 @@ void P_DoPityCheck(player_t *player)
|
|||
player->powers[pw_shield] = SH_PITY;
|
||||
P_SpawnShieldOrb(player);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//
|
||||
// P_PlayerThink
|
||||
|
@ -9252,7 +9244,7 @@ void P_PlayerThink(player_t *player)
|
|||
playerdeadview = false;
|
||||
|
||||
// SRB2kart 010217
|
||||
if (gametype == GT_RACE && leveltime < 4*TICRATE)
|
||||
if (leveltime < 4*TICRATE)
|
||||
player->powers[pw_nocontrol] = 2;
|
||||
/*
|
||||
if ((gametype == GT_RACE || gametype == GT_COMPETITION) && leveltime < 4*TICRATE)
|
||||
|
@ -9266,15 +9258,10 @@ void P_PlayerThink(player_t *player)
|
|||
// Synchronizes the "real" amount of time spent in the level.
|
||||
if (!player->exiting)
|
||||
{
|
||||
if (gametype == GT_RACE || gametype == GT_COMPETITION)
|
||||
{
|
||||
if (leveltime >= 4*TICRATE)
|
||||
player->realtime = leveltime - 4*TICRATE;
|
||||
else
|
||||
player->realtime = 0;
|
||||
}
|
||||
if (leveltime >= 4*TICRATE)
|
||||
player->realtime = leveltime - 4*TICRATE;
|
||||
else
|
||||
player->realtime = leveltime;
|
||||
player->realtime = 0;
|
||||
}
|
||||
|
||||
if ((netgame || splitscreen) && player->spectator && cmd->buttons & BT_ATTACK && !player->powers[pw_flashing])
|
||||
|
|
Loading…
Reference in a new issue