mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +00:00
Merge branch '102-gameplay' into 'master'
v1.0.2 gameplay See merge request KartKrew/Kart!107
This commit is contained in:
commit
a2ab230bfa
21 changed files with 512 additions and 240 deletions
|
@ -348,6 +348,10 @@ typedef enum
|
|||
k_wanted, // Timer for determining WANTED status, lowers when hitting people, prevents the game turning into Camp Lazlo
|
||||
k_yougotem, // "You Got Em" gfx when hitting someone as a karma player via a method that gets you back in the game instantly
|
||||
|
||||
// v1.0.2 vars
|
||||
k_itemblink, // Item flashing after roulette, prevents Hyudoro stealing AND serves as a mashing indicator
|
||||
k_itemblinkmode, // Type of flashing: 0 = white (normal), 1 = red (mashing), 2 = rainbow (enhanced items)
|
||||
|
||||
NUMKARTSTUFF
|
||||
} kartstufftype_t;
|
||||
//}
|
||||
|
|
|
@ -7092,6 +7092,12 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_LIZARDMAN",
|
||||
"S_LIONMAN",
|
||||
|
||||
"S_KARMAFIREWORK1",
|
||||
"S_KARMAFIREWORK2",
|
||||
"S_KARMAFIREWORK3",
|
||||
"S_KARMAFIREWORK4",
|
||||
"S_KARMAFIREWORKTRAIL",
|
||||
|
||||
#ifdef SEENAMES
|
||||
"S_NAMECHECK",
|
||||
#endif
|
||||
|
@ -7877,6 +7883,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_LIZARDMAN",
|
||||
"MT_LIONMAN",
|
||||
|
||||
"MT_KARMAFIREWORK",
|
||||
|
||||
#ifdef SEENAMES
|
||||
"MT_NAMECHECK",
|
||||
#endif
|
||||
|
@ -8270,6 +8278,9 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"COMEBACKMODE",
|
||||
"WANTED",
|
||||
"YOUGOTEM",
|
||||
|
||||
"ITEMBLINK",
|
||||
"ITEMBLINKMODE"
|
||||
};
|
||||
|
||||
static const char *const HUDITEMS_LIST[] = {
|
||||
|
@ -9770,6 +9781,9 @@ static inline int lib_getenum(lua_State *L)
|
|||
} else if (fastcmp(word,"thwompsactive")) {
|
||||
lua_pushboolean(L, thwompsactive);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"spbplace")) {
|
||||
lua_pushinteger(L, spbplace);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -461,6 +461,7 @@ extern tic_t indirectitemcooldown;
|
|||
extern tic_t mapreset;
|
||||
extern UINT8 nospectategrief;
|
||||
extern boolean thwompsactive;
|
||||
extern SINT8 spbplace;
|
||||
|
||||
extern boolean legitimateexit;
|
||||
extern boolean comebackshowninfo;
|
||||
|
|
|
@ -267,6 +267,7 @@ tic_t indirectitemcooldown; // Cooldown before any more Shrink, SPB, or any othe
|
|||
tic_t mapreset; // Map reset delay when enough players have joined an empty game
|
||||
UINT8 nospectategrief; // How many players need to be in-game to eliminate last; for preventing spectate griefing
|
||||
boolean thwompsactive; // Thwomps activate on lap 2
|
||||
SINT8 spbplace; // SPB exists, give the person behind better items
|
||||
|
||||
// Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players)
|
||||
boolean legitimateexit; // Did this client actually finish the match?
|
||||
|
|
43
src/info.c
43
src/info.c
|
@ -68,8 +68,8 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"FROG","CBRA","HOLE","BBRA","EGFG","SMKP","MTYM","THWP","SNOB","ICEB",
|
||||
"CNDL","DOCH","DUCK","GTRE","CHES","CHIM","DRGN","LZMN","PGSS","ZTCH",
|
||||
"MKMA","MKMP","RTCH","BOWL","BOWH","BRRL","BRRR","HRSE","TOAH","BFRT",
|
||||
"OFRT","RFRT","PFRT","ASPK","HBST","HBSO","HBSF","WBLZ","WBLN","XMS4",
|
||||
"XMS5","VIEW"
|
||||
"OFRT","RFRT","PFRT","ASPK","HBST","HBSO","HBSF","WBLZ","WBLN","FWRK",
|
||||
"XMS4","XMS5","VIEW"
|
||||
};
|
||||
|
||||
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
||||
|
@ -3388,6 +3388,12 @@ state_t states[NUMSTATES] =
|
|||
{SPR_WBLZ, 0, -1, {NULL}, 0, 0, S_NULL}, // S_LIZARDMAN
|
||||
{SPR_WBLN, 0, -1, {NULL}, 0, 0, S_NULL}, // S_LIONMAN
|
||||
|
||||
{SPR_FWRK, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARMAFIREWORK2}, // S_KARMAFIREWORK1
|
||||
{SPR_FWRK, 1|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARMAFIREWORK3}, // S_KARMAFIREWORK2
|
||||
{SPR_FWRK, 2|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARMAFIREWORK4}, // S_KARMAFIREWORK3
|
||||
{SPR_FWRK, 3|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARMAFIREWORK1}, // S_KARMAFIREWORK4
|
||||
{SPR_FWRK, 4|FF_FULLBRIGHT, TICRATE, {NULL}, 0, 0, S_NULL}, // S_KARMAFIREWORKTRAIL
|
||||
|
||||
#ifdef SEENAMES
|
||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
|
||||
#endif
|
||||
|
@ -17282,7 +17288,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
8, // speed
|
||||
36*FRACUNIT, // radius
|
||||
37*FRACUNIT, // height
|
||||
0, // display offset
|
||||
-2, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -17309,7 +17315,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
8, // speed
|
||||
36*FRACUNIT, // radius
|
||||
37*FRACUNIT, // height
|
||||
0, // display offset
|
||||
-2, // display offset
|
||||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -17363,7 +17369,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
0, // speed
|
||||
8*FRACUNIT, // radius
|
||||
16*FRACUNIT, // height
|
||||
0, // display offset
|
||||
-1, // display offset
|
||||
0, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
|
@ -20019,6 +20025,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_KARMAFIREWORK
|
||||
-1, // doomednum
|
||||
S_KARMAFIREWORK1, // 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
|
||||
0, // speed
|
||||
8<<FRACBITS, // radius
|
||||
16<<FRACBITS, // height
|
||||
1, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOCLIPTHING|MF_BOUNCE|MF_GRENADEBOUNCE, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
// ============================================================================================================================//
|
||||
|
||||
#ifdef SEENAMES
|
||||
|
|
10
src/info.h
10
src/info.h
|
@ -774,6 +774,8 @@ typedef enum sprite
|
|||
SPR_WBLZ,
|
||||
SPR_WBLN,
|
||||
|
||||
SPR_FWRK,
|
||||
|
||||
// Xmas-specific sprites that don't fit aboxe
|
||||
SPR_XMS4,
|
||||
SPR_XMS5,
|
||||
|
@ -4044,6 +4046,12 @@ typedef enum state
|
|||
S_LIZARDMAN,
|
||||
S_LIONMAN,
|
||||
|
||||
S_KARMAFIREWORK1,
|
||||
S_KARMAFIREWORK2,
|
||||
S_KARMAFIREWORK3,
|
||||
S_KARMAFIREWORK4,
|
||||
S_KARMAFIREWORKTRAIL,
|
||||
|
||||
#ifdef SEENAMES
|
||||
S_NAMECHECK,
|
||||
#endif
|
||||
|
@ -4846,6 +4854,8 @@ typedef enum mobj_type
|
|||
MT_LIZARDMAN,
|
||||
MT_LIONMAN,
|
||||
|
||||
MT_KARMAFIREWORK,
|
||||
|
||||
#ifdef SEENAMES
|
||||
MT_NAMECHECK,
|
||||
#endif
|
||||
|
|
295
src/k_kart.c
295
src/k_kart.c
|
@ -326,12 +326,20 @@ void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color)
|
|||
INT32 starttranscolor;
|
||||
|
||||
// Handle a couple of simple special cases
|
||||
if (skinnum == TC_BOSS || skinnum == TC_ALLWHITE || skinnum == TC_METALSONIC || color == SKINCOLOR_NONE)
|
||||
if (skinnum == TC_BOSS
|
||||
|| skinnum == TC_ALLWHITE
|
||||
|| skinnum == TC_METALSONIC
|
||||
|| skinnum == TC_BLINK
|
||||
|| color == SKINCOLOR_NONE)
|
||||
{
|
||||
for (i = 0; i < NUM_PALETTE_ENTRIES; i++)
|
||||
{
|
||||
if (skinnum == TC_ALLWHITE) dest_colormap[i] = 0;
|
||||
else dest_colormap[i] = (UINT8)i;
|
||||
if (skinnum == TC_ALLWHITE)
|
||||
dest_colormap[i] = 0;
|
||||
else if (skinnum == TC_BLINK)
|
||||
dest_colormap[i] = colortranslations[color][3];
|
||||
else
|
||||
dest_colormap[i] = (UINT8)i;
|
||||
}
|
||||
|
||||
// White!
|
||||
|
@ -574,9 +582,9 @@ static void K_KartGetItemResult(player_t *player, SINT8 getitem)
|
|||
player->kartstuff[k_itemtype] = KITEM_JAWZ;
|
||||
player->kartstuff[k_itemamount] = 2;
|
||||
break;
|
||||
case KITEM_SPB: // Indirect items
|
||||
case KITEM_SHRINK:
|
||||
indirectitemcooldown = 30*TICRATE;
|
||||
case KITEM_SPB:
|
||||
case KITEM_SHRINK: // Indirect items
|
||||
indirectitemcooldown = 20*TICRATE;
|
||||
/* FALLTHRU */
|
||||
default:
|
||||
if (getitem <= 0 || getitem >= NUMKARTRESULTS) // Sad (Fallback)
|
||||
|
@ -648,7 +656,8 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed)
|
|||
|
||||
// POWERITEMODDS handles all of the "frantic item" related functionality, for all of our powerful items.
|
||||
// First, it multiplies it by 2 if franticitems is true; easy-peasy.
|
||||
// Then, it multiplies it further if there's less than 5 players in game.
|
||||
// Next, it multiplies it again if it's in SPB mode and 2nd needs to apply pressure to 1st.
|
||||
// Then, it multiplies it further if there's less than 8 players in game.
|
||||
// This is done to make low player count races more fair & interesting. (1v1s are basically the same as franticitems false in a normal race)
|
||||
// Lastly, it *divides* it by your mashed value, which was determined in K_KartItemRoulette, to punish those who are impatient.
|
||||
// The last two are very fractional and complicated, very sorry!
|
||||
|
@ -760,7 +769,7 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed)
|
|||
|
||||
//{ SRB2kart Roulette Code - Distance Based, no waypoints
|
||||
|
||||
static INT32 K_FindUseodds(player_t *player, fixed_t mashed, INT32 pingame, INT32 bestbumper)
|
||||
static INT32 K_FindUseodds(player_t *player, fixed_t mashed, INT32 pingame, INT32 bestbumper, boolean spbrush)
|
||||
{
|
||||
const INT32 distvar = (64*14);
|
||||
INT32 i;
|
||||
|
@ -840,9 +849,11 @@ static INT32 K_FindUseodds(player_t *player, fixed_t mashed, INT32 pingame, INT3
|
|||
if (oddsvalid[8]) SETUPDISTTABLE(8,1);
|
||||
|
||||
if (franticitems) // Frantic items make the distances between everyone artifically higher, for crazier items
|
||||
pdis = (15*pdis/14);
|
||||
if (pingame < 8 && !G_BattleGametype())
|
||||
pdis = ((28+(8-pingame))*pdis/28);
|
||||
pdis = (15*pdis)/14;
|
||||
if (spbrush) // SPB Rush Mode: It's 2nd place's job to catch-up items and make 1st place's job hell
|
||||
pdis = (3*pdis)/2;
|
||||
if (pingame < 8)
|
||||
pdis = ((28+(8-pingame))*pdis)/28;
|
||||
|
||||
if (pingame == 1 && oddsvalid[0]) // Record Attack, or just alone
|
||||
useodds = 0;
|
||||
|
@ -948,6 +959,8 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
|||
if (player->kartstuff[k_roulettetype] == 2) // Fake items
|
||||
{
|
||||
player->kartstuff[k_eggmanexplode] = 4*TICRATE;
|
||||
//player->kartstuff[k_itemblink] = TICRATE;
|
||||
//player->kartstuff[k_itemblinkmode] = 1;
|
||||
player->kartstuff[k_itemroulette] = 0;
|
||||
player->kartstuff[k_roulettetype] = 0;
|
||||
if (P_IsLocalPlayer(player))
|
||||
|
@ -959,6 +972,8 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
|||
{
|
||||
K_KartGetItemResult(player, cv_kartdebugitem.value);
|
||||
player->kartstuff[k_itemamount] = cv_kartdebugamount.value;
|
||||
player->kartstuff[k_itemblink] = TICRATE;
|
||||
player->kartstuff[k_itemblinkmode] = 2;
|
||||
player->kartstuff[k_itemroulette] = 0;
|
||||
player->kartstuff[k_roulettetype] = 0;
|
||||
if (P_IsLocalPlayer(player))
|
||||
|
@ -971,7 +986,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
|||
spawnchance[i] = 0;
|
||||
|
||||
// Split into another function for a debug function below
|
||||
useodds = K_FindUseodds(player, mashed, pingame, bestbumper);
|
||||
useodds = K_FindUseodds(player, mashed, pingame, bestbumper, (spbplace != -1 && player->kartstuff[k_position] == spbplace+1));
|
||||
|
||||
#define SETITEMRESULT(itemnum) \
|
||||
for (chance = 0; chance < K_KartGetItemOdds(useodds, itemnum, mashed); chance++) \
|
||||
|
@ -991,11 +1006,14 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
|||
player->kartstuff[k_itemamount] = 1;
|
||||
}
|
||||
|
||||
if (P_IsLocalPlayer(player))
|
||||
S_StartSound(NULL, ((player->kartstuff[k_roulettetype] == 1) ? sfx_itrolk : (mashed ? sfx_itrolm : sfx_itrolf)));
|
||||
|
||||
player->kartstuff[k_itemblink] = TICRATE;
|
||||
player->kartstuff[k_itemblinkmode] = ((player->kartstuff[k_roulettetype] == 1) ? 2 : (mashed ? 1 : 0));
|
||||
|
||||
player->kartstuff[k_itemroulette] = 0; // Since we're done, clear the roulette number
|
||||
player->kartstuff[k_roulettetype] = 0; // This too
|
||||
|
||||
if (P_IsLocalPlayer(player))
|
||||
S_StartSound(NULL, sfx_itrolf);
|
||||
}
|
||||
|
||||
//}
|
||||
|
@ -2010,6 +2028,14 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
|
|||
|
||||
player->kartstuff[k_squishedtimer] = TICRATE;
|
||||
|
||||
// Reduce Shrink timer
|
||||
if (player->kartstuff[k_growshrinktimer] < 0)
|
||||
{
|
||||
player->kartstuff[k_growshrinktimer] += TICRATE;
|
||||
if (player->kartstuff[k_growshrinktimer] > -2)
|
||||
player->kartstuff[k_growshrinktimer] = -2;
|
||||
}
|
||||
|
||||
player->powers[pw_flashing] = K_GetKartFlashing(player);
|
||||
|
||||
player->mo->flags |= MF_NOCLIP;
|
||||
|
@ -3033,7 +3059,8 @@ static void K_DoHyudoroSteal(player_t *player)
|
|||
// Has an item
|
||||
&& (players[i].kartstuff[k_itemtype]
|
||||
&& players[i].kartstuff[k_itemamount]
|
||||
&& !players[i].kartstuff[k_itemheld]))
|
||||
&& !players[i].kartstuff[k_itemheld]
|
||||
&& !players[i].kartstuff[k_itemblink]))
|
||||
{
|
||||
playerswappable[numplayers] = i;
|
||||
numplayers++;
|
||||
|
@ -3164,44 +3191,17 @@ static void K_DoShrink(player_t *user)
|
|||
continue;
|
||||
if (players[i].kartstuff[k_position] < user->kartstuff[k_position])
|
||||
{
|
||||
//P_FlashPal(&players[i], PAL_NUKE, 10);
|
||||
|
||||
if (!players[i].kartstuff[k_invincibilitytimer] // Don't hit while invulnerable!
|
||||
// Don't hit while invulnerable!
|
||||
if (!players[i].kartstuff[k_invincibilitytimer]
|
||||
&& players[i].kartstuff[k_growshrinktimer] <= 0
|
||||
&& !players[i].kartstuff[k_hyudorotimer])
|
||||
{
|
||||
// Start shrinking!
|
||||
K_DropItems(&players[i]);
|
||||
players[i].mo->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/TICRATE;
|
||||
players[i].mo->destscale = 6*(mapheaderinfo[gamemap-1]->mobj_scale)/8;
|
||||
if (cv_kartdebugshrink.value && !modeattacking && !players[i].bot)
|
||||
players[i].mo->destscale = 6*players[i].mo->destscale/8;
|
||||
|
||||
if (!players[i].powers[pw_flashing] && !players[i].kartstuff[k_squishedtimer] && !players[i].kartstuff[k_spinouttimer])
|
||||
P_PlayerRingBurst(&players[i], 5);
|
||||
|
||||
// Wipeout
|
||||
K_DropItems(&players[i]);
|
||||
K_SpinPlayer(&players[i], user->mo, 1, false);
|
||||
|
||||
// P_RingDamage
|
||||
P_DoPlayerPain(&players[i], user->mo, user->mo);
|
||||
P_ForceFeed(&players[i], 40, 10, TICRATE, 40 + min((players[i].mo->health-1), 100)*2);
|
||||
P_PlayRinglossSound(players[i].mo); // Ringledingle!
|
||||
|
||||
players[i].mo->momx = players[i].mo->momy = 0;
|
||||
if (P_IsLocalPlayer(&players[i]))
|
||||
{
|
||||
quake.intensity = 32*FRACUNIT;
|
||||
quake.time = 5;
|
||||
}
|
||||
|
||||
players[i].kartstuff[k_sneakertimer] = 0;
|
||||
players[i].kartstuff[k_driftboost] = 0;
|
||||
|
||||
players[i].kartstuff[k_drift] = 0;
|
||||
players[i].kartstuff[k_driftcharge] = 0;
|
||||
players[i].kartstuff[k_pogospring] = 0;
|
||||
|
||||
players[i].kartstuff[k_growshrinktimer] -= (200+(40*(MAXPLAYERS-players[i].kartstuff[k_position])));
|
||||
}
|
||||
|
||||
|
@ -3209,6 +3209,7 @@ static void K_DoShrink(player_t *user)
|
|||
if (players[i].kartstuff[k_growshrinktimer] > 0)
|
||||
players[i].kartstuff[k_growshrinktimer] = 2;
|
||||
|
||||
//P_FlashPal(&players[i], PAL_NUKE, 10);
|
||||
S_StartSound(players[i].mo, sfx_kc59);
|
||||
}
|
||||
}
|
||||
|
@ -4276,6 +4277,13 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->kartstuff[k_justbumped])
|
||||
player->kartstuff[k_justbumped]--;
|
||||
|
||||
// This doesn't go in HUD update because it has potential gameplay ramifications
|
||||
if (player->kartstuff[k_itemblink] && player->kartstuff[k_itemblink]-- <= 0)
|
||||
{
|
||||
player->kartstuff[k_itemblinkmode] = 0;
|
||||
player->kartstuff[k_itemblink] = 0;
|
||||
}
|
||||
|
||||
K_KartPlayerHUDUpdate(player);
|
||||
|
||||
if (player->kartstuff[k_voices])
|
||||
|
@ -5261,7 +5269,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
if (player->kartstuff[k_itemtype] == KITEM_SPB
|
||||
|| player->kartstuff[k_itemtype] == KITEM_SHRINK
|
||||
|| player->kartstuff[k_growshrinktimer] < 0)
|
||||
indirectitemcooldown = 30*TICRATE;
|
||||
indirectitemcooldown = 20*TICRATE;
|
||||
|
||||
if (player->kartstuff[k_hyudorotimer] > 0)
|
||||
{
|
||||
|
@ -6241,29 +6249,84 @@ static void K_drawKartItem(void)
|
|||
INT32 splitflags = K_calcSplitFlags(V_SNAPTOTOP|V_SNAPTOLEFT);
|
||||
const INT32 numberdisplaymin = ((!offset && stplyr->kartstuff[k_itemtype] == KITEM_ORBINAUT) ? 5 : 2);
|
||||
INT32 itembar = 0;
|
||||
UINT8 localcolor = SKINCOLOR_NONE;
|
||||
SINT8 colormode = TC_RAINBOW;
|
||||
UINT8 *colmap = NULL;
|
||||
|
||||
if (stplyr->kartstuff[k_itemroulette])
|
||||
{
|
||||
switch((stplyr->kartstuff[k_itemroulette] % (13*3)) / 3)
|
||||
if (stplyr->skincolor)
|
||||
localcolor = stplyr->skincolor;
|
||||
|
||||
switch((stplyr->kartstuff[k_itemroulette] % (14*3)) / 3)
|
||||
{
|
||||
// Each case is handled in threes, to give three frames of in-game time to see the item on the roulette
|
||||
case 0: localpatch = kp_sneaker[offset]; break; // Sneaker
|
||||
case 1: localpatch = kp_banana[offset]; break; // Banana
|
||||
case 2: localpatch = kp_orbinaut[3+offset]; break; // Orbinaut
|
||||
case 3: localpatch = kp_mine[offset]; break; // Mine
|
||||
case 4: localpatch = kp_grow[offset]; break; // Grow
|
||||
case 5: localpatch = kp_hyudoro[offset]; break; // Hyudoro
|
||||
case 6: localpatch = kp_rocketsneaker[offset]; break; // Rocket Sneaker
|
||||
case 7: localpatch = kp_jawz[offset]; break; // Jawz
|
||||
case 8: localpatch = kp_selfpropelledbomb[offset]; break; // Self-Propelled Bomb
|
||||
case 9: localpatch = kp_shrink[offset]; break; // Shrink
|
||||
case 10: localpatch = localinv; break; // Invincibility
|
||||
case 11: localpatch = kp_eggman[offset]; break; // Eggman Monitor
|
||||
case 12: localpatch = kp_ballhog[offset]; break; // Ballhog
|
||||
case 13: localpatch = kp_thundershield[offset]; break; // Thunder Shield
|
||||
//case 14: localpatch = kp_pogospring[offset]; break; // Pogo Spring
|
||||
//case 15: localpatch = kp_kitchensink[offset]; break; // Kitchen Sink
|
||||
default: break;
|
||||
case 0: // Sneaker
|
||||
localpatch = kp_sneaker[offset];
|
||||
//localcolor = SKINCOLOR_RASPBERRY;
|
||||
break;
|
||||
case 1: // Banana
|
||||
localpatch = kp_banana[offset];
|
||||
//localcolor = SKINCOLOR_YELLOW;
|
||||
break;
|
||||
case 2: // Orbinaut
|
||||
localpatch = kp_orbinaut[3+offset];
|
||||
//localcolor = SKINCOLOR_STEEL;
|
||||
break;
|
||||
case 3: // Mine
|
||||
localpatch = kp_mine[offset];
|
||||
//localcolor = SKINCOLOR_JET;
|
||||
break;
|
||||
case 4: // Grow
|
||||
localpatch = kp_grow[offset];
|
||||
//localcolor = SKINCOLOR_TEAL;
|
||||
break;
|
||||
case 5: // Hyudoro
|
||||
localpatch = kp_hyudoro[offset];
|
||||
//localcolor = SKINCOLOR_STEEL;
|
||||
break;
|
||||
case 6: // Rocket Sneaker
|
||||
localpatch = kp_rocketsneaker[offset];
|
||||
//localcolor = SKINCOLOR_TANGERINE;
|
||||
break;
|
||||
case 7: // Jawz
|
||||
localpatch = kp_jawz[offset];
|
||||
//localcolor = SKINCOLOR_JAWZ;
|
||||
break;
|
||||
case 8: // Self-Propelled Bomb
|
||||
localpatch = kp_selfpropelledbomb[offset];
|
||||
//localcolor = SKINCOLOR_JET;
|
||||
break;
|
||||
case 9: // Shrink
|
||||
localpatch = kp_shrink[offset];
|
||||
//localcolor = SKINCOLOR_ORANGE;
|
||||
break;
|
||||
case 10: // Invincibility
|
||||
localpatch = localinv;
|
||||
//localcolor = SKINCOLOR_GREY;
|
||||
break;
|
||||
case 11: // Eggman Monitor
|
||||
localpatch = kp_eggman[offset];
|
||||
//localcolor = SKINCOLOR_ROSE;
|
||||
break;
|
||||
case 12: // Ballhog
|
||||
localpatch = kp_ballhog[offset];
|
||||
//localcolor = SKINCOLOR_LILAC;
|
||||
break;
|
||||
case 13: // Thunder Shield
|
||||
localpatch = kp_thundershield[offset];
|
||||
//localcolor = SKINCOLOR_CYAN;
|
||||
break;
|
||||
/*case 14: // Pogo Spring
|
||||
localpatch = kp_pogospring[offset];
|
||||
localcolor = SKINCOLOR_TANGERINE;
|
||||
break;
|
||||
case 15: // Kitchen Sink
|
||||
localpatch = kp_kitchensink[offset];
|
||||
localcolor = SKINCOLOR_STEEL;
|
||||
break;*/
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -6319,33 +6382,89 @@ static void K_drawKartItem(void)
|
|||
|
||||
switch(stplyr->kartstuff[k_itemtype])
|
||||
{
|
||||
case KITEM_SNEAKER: localpatch = kp_sneaker[offset]; break;
|
||||
case KITEM_ROCKETSNEAKER: localpatch = kp_rocketsneaker[offset]; break;
|
||||
case KITEM_INVINCIBILITY: localpatch = localinv; localbg = kp_itembg[offset+1]; break;
|
||||
case KITEM_BANANA: localpatch = kp_banana[offset]; break;
|
||||
case KITEM_EGGMAN: localpatch = kp_eggman[offset]; break;
|
||||
case KITEM_ORBINAUT:
|
||||
localpatch = kp_orbinaut[(offset ? 4
|
||||
: min(stplyr->kartstuff[k_itemamount]-1, 3))];
|
||||
case KITEM_SNEAKER:
|
||||
localpatch = kp_sneaker[offset];
|
||||
break;
|
||||
case KITEM_JAWZ: localpatch = kp_jawz[offset]; break;
|
||||
case KITEM_MINE: localpatch = kp_mine[offset]; break;
|
||||
case KITEM_BALLHOG: localpatch = kp_ballhog[offset]; break;
|
||||
case KITEM_SPB: localpatch = kp_selfpropelledbomb[offset]; localbg = kp_itembg[offset+1]; break;
|
||||
case KITEM_GROW: localpatch = kp_grow[offset]; break;
|
||||
case KITEM_SHRINK: localpatch = kp_shrink[offset]; break;
|
||||
case KITEM_THUNDERSHIELD: localpatch = kp_thundershield[offset]; localbg = kp_itembg[offset+1]; break;
|
||||
case KITEM_HYUDORO: localpatch = kp_hyudoro[offset]; break;
|
||||
case KITEM_POGOSPRING: localpatch = kp_pogospring[offset]; break;
|
||||
case KITEM_KITCHENSINK: localpatch = kp_kitchensink[offset]; break;
|
||||
case KITEM_SAD: localpatch = kp_sadface[offset]; break;
|
||||
default: return;
|
||||
case KITEM_ROCKETSNEAKER:
|
||||
localpatch = kp_rocketsneaker[offset];
|
||||
break;
|
||||
case KITEM_INVINCIBILITY:
|
||||
localpatch = localinv;
|
||||
localbg = kp_itembg[offset+1];
|
||||
break;
|
||||
case KITEM_BANANA:
|
||||
localpatch = kp_banana[offset];
|
||||
break;
|
||||
case KITEM_EGGMAN:
|
||||
localpatch = kp_eggman[offset];
|
||||
break;
|
||||
case KITEM_ORBINAUT:
|
||||
localpatch = kp_orbinaut[(offset ? 4 : min(stplyr->kartstuff[k_itemamount]-1, 3))];
|
||||
break;
|
||||
case KITEM_JAWZ:
|
||||
localpatch = kp_jawz[offset];
|
||||
break;
|
||||
case KITEM_MINE:
|
||||
localpatch = kp_mine[offset];
|
||||
break;
|
||||
case KITEM_BALLHOG:
|
||||
localpatch = kp_ballhog[offset];
|
||||
break;
|
||||
case KITEM_SPB:
|
||||
localpatch = kp_selfpropelledbomb[offset];
|
||||
localbg = kp_itembg[offset+1];
|
||||
break;
|
||||
case KITEM_GROW:
|
||||
localpatch = kp_grow[offset];
|
||||
break;
|
||||
case KITEM_SHRINK:
|
||||
localpatch = kp_shrink[offset];
|
||||
break;
|
||||
case KITEM_THUNDERSHIELD:
|
||||
localpatch = kp_thundershield[offset];
|
||||
localbg = kp_itembg[offset+1];
|
||||
break;
|
||||
case KITEM_HYUDORO:
|
||||
localpatch = kp_hyudoro[offset];
|
||||
break;
|
||||
case KITEM_POGOSPRING:
|
||||
localpatch = kp_pogospring[offset];
|
||||
break;
|
||||
case KITEM_KITCHENSINK:
|
||||
localpatch = kp_kitchensink[offset];
|
||||
break;
|
||||
case KITEM_SAD:
|
||||
localpatch = kp_sadface[offset];
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
if (stplyr->kartstuff[k_itemheld] && !(leveltime & 1))
|
||||
localpatch = kp_nodraw;
|
||||
}
|
||||
|
||||
if (stplyr->kartstuff[k_itemblink] && (leveltime & 1))
|
||||
{
|
||||
colormode = TC_BLINK;
|
||||
|
||||
switch (stplyr->kartstuff[k_itemblinkmode])
|
||||
{
|
||||
case 2:
|
||||
localcolor = (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1)));
|
||||
break;
|
||||
case 1:
|
||||
localcolor = SKINCOLOR_RED;
|
||||
break;
|
||||
default:
|
||||
localcolor = SKINCOLOR_WHITE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (localcolor != SKINCOLOR_NONE)
|
||||
colmap = R_GetTranslationColormap(colormode, localcolor, 0);
|
||||
|
||||
V_DrawScaledPatch(ITEM_X, ITEM_Y, V_HUDTRANS|splitflags, localbg);
|
||||
|
||||
|
@ -6353,7 +6472,7 @@ static void K_drawKartItem(void)
|
|||
if (stplyr->kartstuff[k_itemamount] >= numberdisplaymin && !stplyr->kartstuff[k_itemroulette])
|
||||
{
|
||||
V_DrawScaledPatch(ITEM_X, ITEM_Y, V_HUDTRANS|splitflags, kp_itemmulsticker[offset]);
|
||||
V_DrawScaledPatch(ITEM_X, ITEM_Y, V_HUDTRANS|splitflags, localpatch);
|
||||
V_DrawFixedPatch(ITEM_X<<FRACBITS, ITEM_Y<<FRACBITS, FRACUNIT, V_HUDTRANS|splitflags, localpatch, colmap);
|
||||
if (offset)
|
||||
V_DrawString(ITEM_X+24, ITEM_Y+31, V_ALLOWLOWERCASE|V_HUDTRANS|splitflags, va("x%d", stplyr->kartstuff[k_itemamount]));
|
||||
else
|
||||
|
@ -6363,7 +6482,7 @@ static void K_drawKartItem(void)
|
|||
}
|
||||
}
|
||||
else
|
||||
V_DrawScaledPatch(ITEM_X, ITEM_Y, V_HUDTRANS|splitflags, localpatch);
|
||||
V_DrawFixedPatch(ITEM_X<<FRACBITS, ITEM_Y<<FRACBITS, FRACUNIT, V_HUDTRANS|splitflags, localpatch, colmap);
|
||||
|
||||
// Extensible meter, currently only used for rocket sneaker...
|
||||
if (itembar && hudtrans)
|
||||
|
@ -7814,7 +7933,7 @@ static void K_drawDistributionDebugger(void)
|
|||
bestbumper = players[i].kartstuff[k_bumper];
|
||||
}
|
||||
|
||||
useodds = K_FindUseodds(stplyr, 0, pingame, bestbumper);
|
||||
useodds = K_FindUseodds(stplyr, 0, pingame, bestbumper, (spbplace != -1 && stplyr->kartstuff[k_position] == spbplace+1));
|
||||
|
||||
for (i = 1; i < NUMKARTRESULTS; i++)
|
||||
{
|
||||
|
|
|
@ -515,8 +515,8 @@ static int libd_getColormap(lua_State *L)
|
|||
else if (lua_type(L, 1) == LUA_TNUMBER) // skin number
|
||||
{
|
||||
skinnum = (INT32)luaL_checkinteger(L, 1);
|
||||
if (skinnum < TC_ALLWHITE || skinnum >= MAXSKINS)
|
||||
return luaL_error(L, "skin number %d is out of range (%d - %d)", skinnum, TC_ALLWHITE, MAXSKINS-1);
|
||||
if (skinnum < TC_BLINK || skinnum >= MAXSKINS)
|
||||
return luaL_error(L, "skin number %d is out of range (%d - %d)", skinnum, TC_BLINK, MAXSKINS-1);
|
||||
}
|
||||
else // skin name
|
||||
{
|
||||
|
|
|
@ -97,7 +97,7 @@ static UINT8 cheatf_warp(void)
|
|||
|
||||
if (success)
|
||||
{
|
||||
G_SetGameModified(false);
|
||||
G_SaveGameData(true); //G_SetGameModified(false);
|
||||
S_StartSound(0, sfx_kc42);
|
||||
}
|
||||
|
||||
|
|
|
@ -535,6 +535,12 @@ UINT8 M_AnySecretUnlocked(void)
|
|||
UINT8 M_SecretUnlocked(INT32 type)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
#if 1
|
||||
if (dedicated)
|
||||
return true;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < MAXUNLOCKABLES; ++i)
|
||||
{
|
||||
if (unlockables[i].type == type && unlockables[i].unlocked)
|
||||
|
|
|
@ -8354,10 +8354,33 @@ void A_SPBChase(mobj_t *actor)
|
|||
if (actor->threshold) // Just fired, go straight.
|
||||
{
|
||||
actor->lastlook = -1;
|
||||
spbplace = -1;
|
||||
P_InstaThrust(actor, actor->angle, wspeed);
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the player with the best rank
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator || players[i].exiting)
|
||||
continue; // not in-game
|
||||
|
||||
if (!players[i].mo)
|
||||
continue; // no mobj
|
||||
|
||||
if (players[i].mo->health <= 0)
|
||||
continue; // dead
|
||||
|
||||
/*if (players[i].kartstuff[k_respawn])
|
||||
continue;*/ // respawning
|
||||
|
||||
if (players[i].kartstuff[k_position] < bestrank)
|
||||
{
|
||||
bestrank = players[i].kartstuff[k_position];
|
||||
player = &players[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (actor->extravalue1 == 1) // MODE: TARGETING
|
||||
{
|
||||
if (actor->tracer && actor->tracer->health)
|
||||
|
@ -8369,11 +8392,21 @@ void A_SPBChase(mobj_t *actor)
|
|||
if (actor->tracer->player) // 7/8ths max speed for Knuckles, 3/4ths max speed for min accel, exactly max speed for max accel
|
||||
{
|
||||
actor->lastlook = actor->tracer->player-players; // Save the player num for death scumming...
|
||||
|
||||
if (!P_IsObjectOnGround(actor->tracer) /*&& !actor->tracer->player->kartstuff[k_pogospring]*/)
|
||||
defspeed = (7*actor->tracer->player->speed)/8; // In the air you have no control; basically don't hit unless you make a near complete stop
|
||||
else
|
||||
defspeed = ((33 - actor->tracer->player->kartspeed) * K_GetKartSpeed(actor->tracer->player, false)) / 32;
|
||||
|
||||
defspeed -= (9*R_PointToDist2(0, 0, actor->tracer->player->cmomx, actor->tracer->player->cmomy))/8; // Be fairer on conveyors
|
||||
|
||||
// Switch targets if you're no longer 1st for long enough
|
||||
if (actor->tracer->player->kartstuff[k_position] <= bestrank)
|
||||
actor->extravalue2 = 7*TICRATE;
|
||||
else if (actor->extravalue2-- <= 0)
|
||||
actor->extravalue1 = 0; // back to SEEKING
|
||||
|
||||
spbplace = actor->tracer->player->kartstuff[k_position];
|
||||
}
|
||||
|
||||
// Play the intimidating gurgle
|
||||
|
@ -8458,41 +8491,28 @@ void A_SPBChase(mobj_t *actor)
|
|||
else if (actor->extravalue1 == 2) // MODE: WAIT...
|
||||
{
|
||||
actor->momx = actor->momy = actor->momz = 0; // Stoooop
|
||||
if (actor->extravalue2-- <= 0)
|
||||
{
|
||||
|
||||
if (actor->lastlook != -1 && playeringame[actor->lastlook] && players[actor->lastlook].mo)
|
||||
{
|
||||
spbplace = players[actor->lastlook].kartstuff[k_position];
|
||||
if (actor->extravalue2-- <= 0)
|
||||
{
|
||||
P_SetTarget(&actor->tracer, players[actor->lastlook].mo);
|
||||
actor->extravalue1 = 1; // TARGETING
|
||||
actor->extravalue2 = 7*TICRATE;
|
||||
actor->extravalue2 = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->extravalue1 = 0; // SEEKING
|
||||
actor->extravalue2 = 0;
|
||||
spbplace = -1;
|
||||
}
|
||||
}
|
||||
else // MODE: SEEKING
|
||||
{
|
||||
// Find the player with the best rank
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator || players[i].exiting)
|
||||
continue; // not in-game
|
||||
|
||||
if (!players[i].mo)
|
||||
continue; // no mobj
|
||||
|
||||
if (players[i].mo->health <= 0)
|
||||
continue; // dead
|
||||
|
||||
/*if (players[i].kartstuff[k_respawn])
|
||||
continue;*/ // respawning
|
||||
|
||||
if (players[i].kartstuff[k_position] < bestrank)
|
||||
{
|
||||
bestrank = players[i].kartstuff[k_position];
|
||||
player = &players[i];
|
||||
}
|
||||
}
|
||||
actor->lastlook = -1; // Just make sure this is reset
|
||||
|
||||
// No one there?
|
||||
if (player == NULL || !player->mo)
|
||||
|
@ -8509,11 +8529,13 @@ void A_SPBChase(mobj_t *actor)
|
|||
#else
|
||||
actor->momx = actor->momy = actor->momz = 0;
|
||||
#endif
|
||||
spbplace = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
// Found someone, now get close enough to initiate the slaughter...
|
||||
P_SetTarget(&actor->tracer, player->mo);
|
||||
spbplace = bestrank;
|
||||
|
||||
dist = P_AproxDistance(P_AproxDistance(actor->x-actor->tracer->x, actor->y-actor->tracer->y), actor->z-actor->tracer->z);
|
||||
|
||||
|
@ -8560,6 +8582,7 @@ void A_SPBChase(mobj_t *actor)
|
|||
{
|
||||
S_StartSound(actor, actor->info->attacksound); // Siren sound; might not need this anymore, but I'm keeping it for now just for debugging.
|
||||
actor->extravalue1 = 1; // TARGET ACQUIRED
|
||||
actor->extravalue2 = 7*TICRATE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -497,9 +497,18 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
else if (special->target->player->kartstuff[k_comebackmode] == 1 && P_CanPickupItem(player, 1))
|
||||
{
|
||||
mobj_t *poof = P_SpawnMobj(tmthing->x, tmthing->y, tmthing->z, MT_EXPLODE);
|
||||
mobj_t *poof = P_SpawnMobj(special->x, special->y, special->z, MT_EXPLODE);
|
||||
S_StartSound(poof, special->info->seesound);
|
||||
|
||||
// Karma fireworks
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
mobj_t *firework = P_SpawnMobj(special->x, special->y, special->z, MT_KARMAFIREWORK);
|
||||
P_Thrust(firework, FixedAngle((72*i)<<FRACBITS), P_RandomRange(1,8)*special->scale);
|
||||
P_SetObjectMomZ(firework, P_RandomRange(1,8)*special->scale, false);
|
||||
firework->color = special->target->color;
|
||||
}
|
||||
|
||||
special->target->player->kartstuff[k_comebackmode] = 0;
|
||||
special->target->player->kartstuff[k_comebackpoints]++;
|
||||
|
||||
|
@ -2003,19 +2012,6 @@ boolean P_CheckRacers(void)
|
|||
countdown = countdown2 = 0;
|
||||
return true;
|
||||
}
|
||||
else if (!countdown) // Check to see if the winners have finished, to set countdown.
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
continue;
|
||||
if (players[i].exiting || K_IsPlayerLosing(&players[i])) // Only start countdown when all winners are declared
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (i == MAXPLAYERS)
|
||||
countdown = (((netgame || multiplayer) ? cv_countdowntime.value : 30)*TICRATE) + 1; // 30 seconds to finish, get going!
|
||||
}
|
||||
|
||||
if (cv_karteliminatelast.value)
|
||||
{
|
||||
|
@ -2046,6 +2042,28 @@ boolean P_CheckRacers(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (!countdown) // Check to see if the winners have finished, to set countdown.
|
||||
{
|
||||
UINT8 numingame = 0, numexiting = 0;
|
||||
UINT8 winningpos = 1;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
continue;
|
||||
numingame++;
|
||||
if (players[i].exiting)
|
||||
numexiting++;
|
||||
}
|
||||
|
||||
winningpos = max(1, numingame/2);
|
||||
if (numingame % 2) // any remainder?
|
||||
winningpos++;
|
||||
|
||||
if (numexiting >= winningpos)
|
||||
countdown = (((netgame || multiplayer) ? cv_countdowntime.value : 30)*TICRATE) + 1; // 30 seconds to finish, get going!
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
22
src/p_map.c
22
src/p_map.c
|
@ -3844,7 +3844,7 @@ void P_BouncePlayerMove(mobj_t *mo)
|
|||
if (!mo->player)
|
||||
return;
|
||||
|
||||
if ((mo->eflags & MFE_JUSTBOUNCEDWALL) || (mo->player->spectator))
|
||||
if (mo->player->spectator)
|
||||
{
|
||||
P_SlideMove(mo, true);
|
||||
return;
|
||||
|
@ -3898,8 +3898,16 @@ void P_BouncePlayerMove(mobj_t *mo)
|
|||
if (bestslidefrac <= 0)
|
||||
return;
|
||||
|
||||
if (mo->eflags & MFE_JUSTBOUNCEDWALL) // Stronger push-out
|
||||
{
|
||||
tmxmove = mmomx;
|
||||
tmymove = mmomy;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmxmove = FixedMul(mmomx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||
tmymove = FixedMul(mmomy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||
}
|
||||
|
||||
{
|
||||
mobj_t *fx = P_SpawnMobj(mo->x, mo->y, mo->z, MT_BUMP);
|
||||
|
@ -3936,18 +3944,18 @@ void P_BounceMove(mobj_t *mo)
|
|||
INT32 hitcount;
|
||||
fixed_t mmomx = 0, mmomy = 0;
|
||||
|
||||
if (mo->eflags & MFE_JUSTBOUNCEDWALL)
|
||||
{
|
||||
P_SlideMove(mo, true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mo->player)
|
||||
{
|
||||
P_BouncePlayerMove(mo);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mo->eflags & MFE_JUSTBOUNCEDWALL)
|
||||
{
|
||||
P_SlideMove(mo, true);
|
||||
return;
|
||||
}
|
||||
|
||||
slidemo = mo;
|
||||
hitcount = 0;
|
||||
|
||||
|
|
56
src/p_mobj.c
56
src/p_mobj.c
|
@ -1413,6 +1413,9 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
case MT_SIGN:
|
||||
gravityadd /= 8;
|
||||
break;
|
||||
case MT_KARMAFIREWORK:
|
||||
gravityadd /= 3;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2525,7 +2528,7 @@ static boolean P_ZMovement(mobj_t *mo)
|
|||
if (P_MobjFlip(mo)*mom.z < 0)
|
||||
{
|
||||
// If going slower than a fracunit, just stop.
|
||||
if (abs(mom.z) < FixedMul(FRACUNIT, mo->scale))
|
||||
if (abs(mom.z) < mo->scale)
|
||||
{
|
||||
mom.x = mom.y = mom.z = 0;
|
||||
|
||||
|
@ -6834,6 +6837,18 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
P_SetScale(mobj->tracer, (mobj->tracer->destscale = mobj->scale));
|
||||
}
|
||||
|
||||
// Do this in an easy way
|
||||
if (mobj->target->player->kartstuff[k_itemroulette])
|
||||
{
|
||||
mobj->tracer->color = mobj->target->player->skincolor;
|
||||
mobj->tracer->colorized = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mobj->tracer->color = SKINCOLOR_NONE;
|
||||
mobj->tracer->colorized = false;
|
||||
}
|
||||
|
||||
if (!(mobj->flags2 & MF2_DONTDRAW))
|
||||
{
|
||||
const INT32 numberdisplaymin = ((mobj->target->player->kartstuff[k_itemtype] == KITEM_ORBINAUT) ? 5 : 2);
|
||||
|
@ -8156,7 +8171,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
mobj->threshold--;
|
||||
break;
|
||||
case MT_SPB:
|
||||
indirectitemcooldown = 30*TICRATE;
|
||||
indirectitemcooldown = 20*TICRATE;
|
||||
/* FALLTHRU */
|
||||
case MT_BALLHOG:
|
||||
P_SpawnGhostMobj(mobj)->fuse = 3;
|
||||
|
@ -8601,7 +8616,9 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
if (!S_SoundPlaying(mobj, mobj->info->attacksound))
|
||||
S_StartSound(mobj, mobj->info->attacksound);
|
||||
|
||||
if (mobj->extravalue2 > 70) // fire + smoke pillar
|
||||
if (mobj->extravalue2 <= 8) // Short delay
|
||||
mobj->extravalue2++; // flametimer
|
||||
else // fire + smoke pillar
|
||||
{
|
||||
UINT8 i;
|
||||
mobj_t *fire = P_SpawnMobj(mobj->x + (P_RandomRange(-32, 32)*mobj->scale), mobj->y + (P_RandomRange(-32, 32)*mobj->scale), mobj->z, MT_THOK);
|
||||
|
@ -8625,20 +8642,6 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
smoke->scalespeed = mobj->scale/24;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mobj->extravalue2++; // flametimer
|
||||
|
||||
if (mobj->extravalue2 > 8)
|
||||
{
|
||||
mobj_t *smoke = P_SpawnMobj(mobj->x + (P_RandomRange(-31, 31)*mobj->scale), mobj->y + (P_RandomRange(-31, 31)*mobj->scale),
|
||||
mobj->z + (P_RandomRange(0, 48)*mobj->scale), MT_THOK);
|
||||
|
||||
P_SetMobjState(smoke, S_FZEROSMOKE1);
|
||||
smoke->tics += P_RandomRange(-3, 4);
|
||||
smoke->scale = mobj->scale*2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MT_EZZPROPELLER:
|
||||
if (mobj->hnext)
|
||||
|
@ -9083,6 +9086,22 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case MT_KARMAFIREWORK:
|
||||
if (mobj->momz == 0)
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
mobj_t *trail = P_SpawnMobj(mobj->x, mobj->y, mobj->z, MT_THOK);
|
||||
P_SetMobjState(trail, S_KARMAFIREWORKTRAIL);
|
||||
P_SetScale(trail, mobj->scale);
|
||||
trail->destscale = 1;
|
||||
trail->scalespeed = mobj->scale/12;
|
||||
trail->color = mobj->color;
|
||||
}
|
||||
break;
|
||||
//}
|
||||
case MT_TURRET:
|
||||
P_MobjCheckWater(mobj);
|
||||
|
@ -10380,6 +10399,9 @@ void P_RemoveMobj(mobj_t *mobj)
|
|||
if (mobj->type == MT_SHADOW)
|
||||
P_RemoveShadow(mobj);
|
||||
|
||||
if (mobj->type == MT_SPB)
|
||||
spbplace = -1;
|
||||
|
||||
mobj->health = 0; // Just because
|
||||
|
||||
// unlink from sector and block lists
|
||||
|
|
|
@ -3287,6 +3287,7 @@ static void P_NetArchiveMisc(void)
|
|||
WRITEUINT32(save_p, mapreset);
|
||||
WRITEUINT8(save_p, nospectategrief);
|
||||
WRITEUINT8(save_p, thwompsactive);
|
||||
WRITESINT8(save_p, spbplace);
|
||||
|
||||
// Is it paused?
|
||||
if (paused)
|
||||
|
@ -3393,6 +3394,7 @@ static inline boolean P_NetUnArchiveMisc(void)
|
|||
mapreset = READUINT32(save_p);
|
||||
nospectategrief = READUINT8(save_p);
|
||||
thwompsactive = (boolean)READUINT8(save_p);
|
||||
spbplace = READSINT8(save_p);
|
||||
|
||||
// Is it paused?
|
||||
if (READUINT8(save_p) == 0x2f)
|
||||
|
|
|
@ -3046,6 +3046,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
mapreset = 0;
|
||||
nospectategrief = 0;
|
||||
thwompsactive = false;
|
||||
spbplace = -1;
|
||||
|
||||
// clear special respawning que
|
||||
iquehead = iquetail = 0;
|
||||
|
|
|
@ -7758,7 +7758,10 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius)
|
|||
}
|
||||
|
||||
if (mo->type == MT_SPB) // If you destroy a SPB, you don't get the luxury of a cooldown.
|
||||
{
|
||||
spbplace = -1;
|
||||
indirectitemcooldown = 0;
|
||||
}
|
||||
|
||||
if (mo == inflictor) // Don't nuke yourself, dummy!
|
||||
continue;
|
||||
|
|
|
@ -136,6 +136,7 @@ UINT32 nflatxshift, nflatyshift, nflatshiftup, nflatmask;
|
|||
#define METALSONIC_TT_CACHE_INDEX (MAXSKINS + 2)
|
||||
#define ALLWHITE_TT_CACHE_INDEX (MAXSKINS + 3)
|
||||
#define RAINBOW_TT_CACHE_INDEX (MAXSKINS + 4)
|
||||
#define BLINK_TT_CACHE_INDEX (MAXSKINS + 5)
|
||||
#define SKIN_RAMP_LENGTH 16
|
||||
#define DEFAULT_STARTTRANSCOLOR 160
|
||||
#define NUM_PALETTE_ENTRIES 256
|
||||
|
@ -530,6 +531,7 @@ UINT8* R_GetTranslationColormap(INT32 skinnum, skincolors_t color, UINT8 flags)
|
|||
else if (skinnum == TC_METALSONIC) skintableindex = METALSONIC_TT_CACHE_INDEX;
|
||||
else if (skinnum == TC_ALLWHITE) skintableindex = ALLWHITE_TT_CACHE_INDEX;
|
||||
else if (skinnum == TC_RAINBOW) skintableindex = RAINBOW_TT_CACHE_INDEX;
|
||||
else if (skinnum == TC_BLINK) skintableindex = BLINK_TT_CACHE_INDEX;
|
||||
else skintableindex = skinnum;
|
||||
|
||||
if (flags & GTC_CACHE)
|
||||
|
|
|
@ -108,6 +108,7 @@ extern lumpnum_t viewborderlump[8];
|
|||
#define TC_METALSONIC -3 // For Metal Sonic battle
|
||||
#define TC_ALLWHITE -4 // For Cy-Brak-demon
|
||||
#define TC_RAINBOW -5 // For invincibility power
|
||||
#define TC_BLINK -6 // For item blinking
|
||||
|
||||
// Initialize color translation tables, for player rendering etc.
|
||||
void R_InitTranslationTables(void);
|
||||
|
|
|
@ -792,6 +792,8 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"itrol7", true, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"itrol8", true, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"itrolf", true, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Roulette end
|
||||
{"itrolm", true, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Roulette end (mashed)
|
||||
{"itrolk", true, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Roulette end (karma enhanced)
|
||||
{"itrole", true, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Roulette end (Eggman)
|
||||
{"vroom", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Krew opening vroom
|
||||
{"chaooo", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Chao audience cheer
|
||||
|
|
|
@ -867,6 +867,8 @@ typedef enum
|
|||
sfx_itrol7,
|
||||
sfx_itrol8,
|
||||
sfx_itrolf,
|
||||
sfx_itrolm,
|
||||
sfx_itrolk,
|
||||
sfx_itrole,
|
||||
sfx_vroom,
|
||||
sfx_chaooo,
|
||||
|
|
Loading…
Reference in a new issue