mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-21 03:11:24 +00:00
Merge remote-tracking branch 'refs/remotes/origin/battle' into quads
# Conflicts: # src/g_game.c # src/k_kart.c
This commit is contained in:
commit
122eb82170
23 changed files with 275 additions and 166 deletions
|
@ -458,8 +458,9 @@ static void D_Display(void)
|
|||
}
|
||||
}
|
||||
|
||||
// render the fourth screen
|
||||
if (splitscreen4 && players[fourthdisplayplayer].mo)
|
||||
//if (splitscreen3) // Fill up the fourth screen in 3P mode so you aren't gazing into the abyss :V
|
||||
//V_DrawFill(viewwidth, viewheight, viewwidth, viewheight, 31);
|
||||
if (splitscreen4 && players[fourthdisplayplayer].mo) // render the fourth screen
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
|
|
|
@ -343,12 +343,13 @@ consvar_t cv_feather = {"feathers", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NU
|
|||
consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcheck = {"kartcheck", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t kartstarsfx_cons_t[] = {{0, "Music"}, {1, "SMK"}, {0, NULL}};
|
||||
consvar_t cv_kartstarsfx = {"kartstarsfx", "SMK", CV_SAVE, kartstarsfx_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // change default to "SMK"?
|
||||
consvar_t cv_kartstarsfx = {"kartstarsfx", "SMK", CV_SAVE, kartstarsfx_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"}, {12, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_kartballoons = {"kartballoons", "3", CV_NETVAR, kartballoons_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartfrantic = {"kartfrantic", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcomeback = {"kartcomeback", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartmirror = {"kartmirror", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, 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
|
||||
|
||||
|
|
|
@ -122,6 +122,7 @@ extern consvar_t cv_kartcc;
|
|||
extern consvar_t cv_kartballoons;
|
||||
extern consvar_t cv_kartfrantic;
|
||||
extern consvar_t cv_kartcomeback;
|
||||
extern consvar_t cv_kartmirror;
|
||||
extern consvar_t cv_speedometer;
|
||||
|
||||
extern consvar_t cv_collideminimum;
|
||||
|
|
|
@ -276,7 +276,6 @@ typedef enum
|
|||
k_goldshroomtimer, // Gold Mushroom duration timer
|
||||
k_startimer, // Invincibility timer
|
||||
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
||||
//k_wipeouttimer, // Wipe-out from a shell, waits a short amount of time before making you stop and spinning out in place
|
||||
k_laserwisptimer, // The duration and relative angle of the laser
|
||||
k_justbumped, // Prevent players from endlessly bumping into each other
|
||||
k_poweritemtimer, // Battle mode, how long before you're allowed another power item (Star, Megashroom)
|
||||
|
|
|
@ -981,6 +981,7 @@ static const struct {
|
|||
{"RACE",TOL_RACE},
|
||||
|
||||
{"MATCH",TOL_MATCH},
|
||||
{"BATTLE",TOL_MATCH}, // SRB2kart
|
||||
{"TAG",TOL_TAG},
|
||||
{"CTF",TOL_CTF},
|
||||
|
||||
|
@ -989,13 +990,13 @@ static const struct {
|
|||
{"2D",TOL_2D},
|
||||
{"MARIO",TOL_MARIO},
|
||||
{"NIGHTS",TOL_NIGHTS},
|
||||
{"OLDBRAK",TOL_ERZ3},
|
||||
//{"OLDBRAK",TOL_ERZ3},
|
||||
|
||||
{"XMAS",TOL_XMAS},
|
||||
{"CHRISTMAS",TOL_XMAS},
|
||||
{"WINTER",TOL_XMAS},
|
||||
|
||||
{"KART",TOL_KART}, // SRB2kart
|
||||
//{"KART",TOL_KART}, // SRB2kart
|
||||
|
||||
{NULL, 0}
|
||||
};
|
||||
|
@ -1252,9 +1253,20 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
|||
}
|
||||
|
||||
else if (fastcmp(word, "LEVELFLAGS"))
|
||||
mapheaderinfo[num-1]->levelflags = (UINT8)i;
|
||||
mapheaderinfo[num-1]->levelflags = get_number(word2);
|
||||
else if (fastcmp(word, "MENUFLAGS"))
|
||||
mapheaderinfo[num-1]->menuflags = (UINT8)i;
|
||||
mapheaderinfo[num-1]->menuflags = get_number(word2);
|
||||
|
||||
// SRB2Kart
|
||||
/*else if (fastcmp(word, "AUTOMAP"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->automap = true;
|
||||
else
|
||||
mapheaderinfo[num-1]->automap = false;
|
||||
}*/
|
||||
else if (fastcmp(word, "MOBJSCALE"))
|
||||
mapheaderinfo[num-1]->mobj_scale = get_number(word2);
|
||||
|
||||
// Individual triggers for level flags, for ease of use (and 2.0 compatibility)
|
||||
else if (fastcmp(word, "SCRIPTISFILE"))
|
||||
|
@ -6426,6 +6438,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_PLAYERARROW_ROULETTE",
|
||||
|
||||
"S_PLAYERBOMB", // Player bomb overlay
|
||||
"S_PLAYERBOMB_WHEEL",
|
||||
|
||||
#ifdef SEENAMES
|
||||
"S_NAMECHECK",
|
||||
|
@ -7326,6 +7339,7 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"THROWDIR",
|
||||
"CAMSPIN",
|
||||
"LAPANIMATION",
|
||||
"CARDANIMATION",
|
||||
"SOUNDS",
|
||||
|
||||
"BOOSTING",
|
||||
|
@ -7526,8 +7540,9 @@ struct {
|
|||
{"TOL_2D",TOL_2D},
|
||||
{"TOL_MARIO",TOL_MARIO},
|
||||
{"TOL_NIGHTS",TOL_NIGHTS},
|
||||
{"TOL_ERZ3",TOL_ERZ3},
|
||||
//{"TOL_ERZ3",TOL_ERZ3},
|
||||
{"TOL_XMAS",TOL_XMAS},
|
||||
//{"TOL_KART",TOL_KART},
|
||||
|
||||
// Level flags
|
||||
{"LF_SCRIPTISFILE",LF_SCRIPTISFILE},
|
||||
|
|
|
@ -254,13 +254,14 @@ typedef struct
|
|||
UINT8 numGradedMares; ///< Internal. For grade support.
|
||||
nightsgrades_t *grades; ///< NiGHTS grades. Allocated dynamically for space reasons. Be careful.
|
||||
|
||||
// SRB2kart
|
||||
//boolean automap; ///< Displays a level's white map outline in modified games
|
||||
fixed_t mobj_scale; ///< Replacement for TOL_ERZ3
|
||||
|
||||
// Lua stuff.
|
||||
// (This is not ifdeffed so the map header structure can stay identical, just in case.)
|
||||
UINT8 numCustomOptions; ///< Internal. For Lua custom value support.
|
||||
customoption_t *customopts; ///< Custom options. Allocated dynamically for space reasons. Be careful.
|
||||
|
||||
// SRB2kart
|
||||
boolean automap; ///< Displays a level's white map outline in modified games
|
||||
} mapheader_t;
|
||||
|
||||
// level flags
|
||||
|
@ -298,9 +299,9 @@ enum TypeOfLevel
|
|||
TOL_2D = 0x0100, ///< 2D
|
||||
TOL_MARIO = 0x0200, ///< Mario
|
||||
TOL_NIGHTS = 0x0400, ///< NiGHTS
|
||||
TOL_ERZ3 = 0x0800, ///< ERZ3
|
||||
TOL_XMAS = 0x1000, ///< Christmas NiGHTS
|
||||
TOL_KART = 0x4000 ///< Kart 32768
|
||||
//TOL_ERZ3 = 0x0800, ///< ERZ3
|
||||
TOL_XMAS = 0x1000 ///< Christmas NiGHTS
|
||||
//TOL_KART = 0x4000 ///< Kart 32768
|
||||
};
|
||||
|
||||
// Gametypes
|
||||
|
|
|
@ -259,7 +259,8 @@ typedef enum
|
|||
postimg_water,
|
||||
postimg_motion,
|
||||
postimg_flip,
|
||||
postimg_heat
|
||||
postimg_heat,
|
||||
postimg_mirror
|
||||
} postimg_t;
|
||||
|
||||
typedef UINT32 lumpnum_t; // 16 : 16 unsigned long (wad num: lump num)
|
||||
|
|
18
src/g_game.c
18
src/g_game.c
|
@ -1267,6 +1267,15 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
turnleft = InputDown(gc_turnleft, ssplayer);
|
||||
|
||||
axis = JoyAxis(AXISTURN, ssplayer);
|
||||
|
||||
if (cv_kartmirror.value)
|
||||
{
|
||||
turnright ^= turnleft; // swap these using three XORs
|
||||
turnleft ^= turnright;
|
||||
turnright ^= turnleft;
|
||||
axis = -axis;
|
||||
}
|
||||
|
||||
if (gamepadjoystickmove && axis != 0)
|
||||
{
|
||||
turnright = turnright || (axis > 0);
|
||||
|
@ -1541,8 +1550,13 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
cmd->forwardmove = (SINT8)(cmd->forwardmove + forward);
|
||||
cmd->sidemove = (SINT8)(cmd->sidemove + side);
|
||||
|
||||
if (cv_kartmirror.value)
|
||||
cmd->sidemove = -cmd->sidemove;
|
||||
|
||||
//{ SRB2kart - Drift support
|
||||
axis = JoyAxis(AXISTURN, ssplayer);
|
||||
if (cv_kartmirror.value)
|
||||
axis = -axis;
|
||||
|
||||
if (cmd->angleturn > 0) // Drifting to the left
|
||||
cmd->buttons |= BT_DRIFTLEFT;
|
||||
|
@ -2287,6 +2301,7 @@ void G_PlayerReborn(INT32 player)
|
|||
INT32 offroad;
|
||||
INT32 balloon;
|
||||
INT32 comebackpoints;
|
||||
INT32 comebackshowninfo;
|
||||
|
||||
score = players[player].score;
|
||||
lives = players[player].lives;
|
||||
|
@ -2344,6 +2359,7 @@ void G_PlayerReborn(INT32 player)
|
|||
offroad = players[player].kartstuff[k_offroad];
|
||||
balloon = players[player].kartstuff[k_balloon];
|
||||
comebackpoints = players[player].kartstuff[k_comebackpoints];
|
||||
comebackshowninfo = players[player].kartstuff[k_comebackshowninfo];
|
||||
|
||||
p = &players[player];
|
||||
memset(p, 0, sizeof (*p));
|
||||
|
@ -2400,8 +2416,10 @@ void G_PlayerReborn(INT32 player)
|
|||
// SRB2kart
|
||||
p->kartstuff[k_starpostwp] = starpostwp; // TODO: get these out of kartstuff, it causes desync
|
||||
p->kartstuff[k_offroad] = offroad;
|
||||
|
||||
p->kartstuff[k_balloon] = balloon;
|
||||
p->kartstuff[k_comebackpoints] = comebackpoints;
|
||||
p->kartstuff[k_comebackshowninfo] = comebackshowninfo;
|
||||
p->kartstuff[k_comebacktimer] = comebacktime;
|
||||
|
||||
// Don't do anything immediately
|
||||
|
|
|
@ -109,6 +109,7 @@ typedef struct
|
|||
FLOAT fovxangle, fovyangle;
|
||||
INT32 splitscreen;
|
||||
boolean flip; // screenflip
|
||||
boolean mirror; // SRB2Kart: Mirror Mode
|
||||
} FTransform;
|
||||
|
||||
// Transformed vector, as passed to HWR API
|
||||
|
|
|
@ -5615,6 +5615,11 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
|||
else
|
||||
atransform.flip = false;
|
||||
|
||||
if (*type == postimg_mirror)
|
||||
atransform.mirror = true;
|
||||
else
|
||||
atransform.mirror = false;
|
||||
|
||||
atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx)
|
||||
atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy)
|
||||
atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz)
|
||||
|
@ -5642,6 +5647,11 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
|||
else
|
||||
stransform.flip = false;
|
||||
|
||||
if (*type == postimg_mirror)
|
||||
stransform.mirror = true;
|
||||
else
|
||||
stransform.mirror = false;
|
||||
|
||||
stransform.x = 0.0f;
|
||||
stransform.y = 0.0f;
|
||||
stransform.z = 0.0f;
|
||||
|
@ -5879,6 +5889,11 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
|||
else
|
||||
atransform.flip = false;
|
||||
|
||||
if (*type == postimg_mirror)
|
||||
atransform.mirror = true;
|
||||
else
|
||||
atransform.mirror = false;
|
||||
|
||||
atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx)
|
||||
atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy)
|
||||
atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz)
|
||||
|
@ -5906,6 +5921,11 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
|||
else
|
||||
stransform.flip = false;
|
||||
|
||||
if (*type == postimg_mirror)
|
||||
stransform.mirror = true;
|
||||
else
|
||||
stransform.mirror = false;
|
||||
|
||||
stransform.x = 0.0f;
|
||||
stransform.y = 0.0f;
|
||||
stransform.z = 0.0f;
|
||||
|
|
|
@ -2013,7 +2013,9 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
|
|||
// keep a trace of the transformation for md2
|
||||
memcpy(&md2_transform, stransform, sizeof (md2_transform));
|
||||
|
||||
if (stransform->flip)
|
||||
if (stransform->mirror)
|
||||
pglScalef(-stransform->scalex, stransform->scaley, -stransform->scalez);
|
||||
else if (stransform->flip)
|
||||
pglScalef(stransform->scalex, -stransform->scaley, -stransform->scalez);
|
||||
else
|
||||
pglScalef(stransform->scalex, stransform->scaley, -stransform->scalez);
|
||||
|
|
|
@ -2881,7 +2881,8 @@ state_t states[NUMSTATES] =
|
|||
{SPR_ARRO, FF_FULLBRIGHT|16, -1, {NULL}, 0, 0, S_NULL}, // S_PLAYERARROW_EMPTY
|
||||
{SPR_ARRO, FF_FULLBRIGHT|FF_ANIMATE|1, -1, {NULL}, 5, 3, S_NULL}, // S_PLAYERARROW_ROULETTE
|
||||
|
||||
{SPR_PBOM, 0, -1, {NULL}, 1, 0, S_NULL}, // S_PLAYERBOMB
|
||||
{SPR_PBOM, FF_ANIMATE, -1, {NULL}, 3, 3, S_NULL}, // S_PLAYERBOMB
|
||||
{SPR_PBOM, 4, -1, {NULL}, 0, 0, S_NULL}, // S_PLAYERBOMB_WHEEL
|
||||
|
||||
#ifdef SEENAMES
|
||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
|
||||
|
|
|
@ -3403,6 +3403,7 @@ typedef enum state
|
|||
S_PLAYERARROW_ROULETTE,
|
||||
|
||||
S_PLAYERBOMB,
|
||||
S_PLAYERBOMB_WHEEL,
|
||||
|
||||
#ifdef SEENAMES
|
||||
S_NAMECHECK,
|
||||
|
|
249
src/k_kart.c
249
src/k_kart.c
|
@ -309,6 +309,7 @@ void K_RegisterKartStuff(void)
|
|||
CV_RegisterVar(&cv_kartballoons);
|
||||
CV_RegisterVar(&cv_kartfrantic);
|
||||
CV_RegisterVar(&cv_kartcomeback);
|
||||
CV_RegisterVar(&cv_kartmirror);
|
||||
CV_RegisterVar(&cv_speedometer);
|
||||
CV_RegisterVar(&cv_collideminimum);
|
||||
CV_RegisterVar(&cv_collidesoundnum);
|
||||
|
@ -728,7 +729,7 @@ static INT32 K_KartItemOddsBalloons[NUMKARTITEMS][5] =
|
|||
/*Gold Mushroom*/ { 0, 0, 0, 0, 0 }, // Gold Mushroom
|
||||
/*Star*/ { 1, 1, 0, 0, 0 }, // Star
|
||||
|
||||
/*Triple Banana*/ { 0, 3, 3, 1, 0 }, // Triple Banana
|
||||
/*Triple Banana*/ { 0, 3, 1, 1, 0 }, // Triple Banana
|
||||
/*Fake Item*/ { 0, 0, 2, 2, 1 }, // Fake Item
|
||||
/*Banana*/ { 0, 0, 3, 1, 1 }, // Banana
|
||||
/*Green Shell*/ { 0, 0, 5, 3, 1 }, // Green Shell
|
||||
|
@ -1455,17 +1456,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->kartstuff[k_spinout] == 0 && player->kartstuff[k_spinouttimer] == 0 && player->powers[pw_flashing] == K_GetKartFlashing())
|
||||
player->powers[pw_flashing]--;
|
||||
|
||||
/*if (player->kartstuff[k_wipeouttimer])
|
||||
{
|
||||
if (player->kartstuff[k_wipeouttimer] == 1)
|
||||
{
|
||||
player->kartstuff[k_spinouttype] = 1;
|
||||
K_SpinPlayer(player, NULL);
|
||||
player->mo->momx = player->mo->momy = 0;
|
||||
}
|
||||
player->kartstuff[k_wipeouttimer]--;
|
||||
}*/
|
||||
|
||||
if (player->kartstuff[k_magnettimer])
|
||||
player->kartstuff[k_magnettimer]--;
|
||||
|
||||
|
@ -1489,7 +1479,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
if (player->kartstuff[k_growshrinktimer] == 1 || player->kartstuff[k_growshrinktimer] == -1)
|
||||
{
|
||||
player->mo->destscale = FRACUNIT;
|
||||
player->mo->destscale = mapheaderinfo[gamemap-1]->mobj_scale;
|
||||
P_RestoreMusic(player);
|
||||
}
|
||||
|
||||
|
@ -1521,13 +1511,20 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->kartstuff[k_lapanimation])
|
||||
player->kartstuff[k_lapanimation]--;
|
||||
|
||||
if (gametype != GT_RACE && (player->exiting || (player->kartstuff[k_balloon] <= 0 && player->kartstuff[k_comebacktimer])))
|
||||
if (gametype != GT_RACE && (player->exiting || player->kartstuff[k_comebacktimer]))
|
||||
{
|
||||
if ((player->exiting < 6*TICRATE)
|
||||
|| (player->kartstuff[k_comebacktimer] > 7*TICRATE && player->kartstuff[k_comebacktimer] < 9*TICRATE))
|
||||
player->kartstuff[k_cardanimation] += ((164-player->kartstuff[k_cardanimation])/8)+1;
|
||||
else if (player->kartstuff[k_comebacktimer] < 5*TICRATE && !player->exiting)
|
||||
player->kartstuff[k_cardanimation] -= ((164-player->kartstuff[k_cardanimation])/8)+1;
|
||||
if (player->exiting)
|
||||
{
|
||||
if (player->exiting < 6*TICRATE)
|
||||
player->kartstuff[k_cardanimation] += ((164-player->kartstuff[k_cardanimation])/8)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->kartstuff[k_comebacktimer] < 6*TICRATE)
|
||||
player->kartstuff[k_cardanimation] -= ((164-player->kartstuff[k_cardanimation])/8)+1;
|
||||
else if (player->kartstuff[k_comebacktimer] < 9*TICRATE)
|
||||
player->kartstuff[k_cardanimation] += ((164-player->kartstuff[k_cardanimation])/8)+1;
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_cardanimation] > 164)
|
||||
player->kartstuff[k_cardanimation] = 164;
|
||||
|
@ -1860,42 +1857,6 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
|
|||
return;
|
||||
}
|
||||
|
||||
/*void K_WipeoutPlayer(player_t *player, mobj_t *source)
|
||||
{
|
||||
if (player->health <= 0)
|
||||
return;
|
||||
|
||||
if (player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || (player->kartstuff[k_spinouttimer] > 0 && player->kartstuff[k_spinout] > 0)
|
||||
|| player->kartstuff[k_startimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_bootimer] > 0
|
||||
|| (gametype != GT_RACE && ((player->kartstuff[k_balloon] <= 0 && player->kartstuff[k_comebacktimer]) || player->kartstuff[k_comebackmode] == 1)))
|
||||
return;
|
||||
|
||||
if (source && source != player->mo && source->player && !source->player->kartstuff[k_sounds])
|
||||
{
|
||||
S_StartSound(source, sfx_hitem);
|
||||
source->player->kartstuff[k_sounds] = 50;
|
||||
}
|
||||
|
||||
if (gametype != GT_RACE)
|
||||
{
|
||||
if (source && source->player && player != source->player)
|
||||
P_AddPlayerScore(source->player, 1);
|
||||
}
|
||||
|
||||
P_RingDamage(player, NULL, source, player->mo->health-1);
|
||||
P_PlayerRingBurst(player, 5);
|
||||
|
||||
if (P_IsLocalPlayer(player))
|
||||
{
|
||||
quake.intensity = 32*FRACUNIT;
|
||||
quake.time = 5;
|
||||
}
|
||||
|
||||
player->kartstuff[k_wipeouttimer] = 21;
|
||||
|
||||
return;
|
||||
}*/
|
||||
|
||||
void K_SquishPlayer(player_t *player, mobj_t *source)
|
||||
{
|
||||
if (player->health <= 0)
|
||||
|
@ -3170,9 +3131,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
else if (ATTACK_IS_DOWN && player->kartstuff[k_goldshroomtimer] > 1 && onground && NO_BOO)
|
||||
{
|
||||
K_DoMushroom(player, true, false);
|
||||
//player->kartstuff[k_goldshroomtimer] -= 10;
|
||||
//if (player->kartstuff[k_goldshroomtimer] < 1)
|
||||
// player->kartstuff[k_goldshroomtimer] = 1;
|
||||
player->kartstuff[k_goldshroomtimer] -= 10;
|
||||
if (player->kartstuff[k_goldshroomtimer] < 1)
|
||||
player->kartstuff[k_goldshroomtimer] = 1;
|
||||
}
|
||||
// TripleMushroom power
|
||||
else if (ATTACK_IS_DOWN && !HOLDING_ITEM && player->kartstuff[k_mushroom] == 4 && onground && NO_BOO)
|
||||
|
@ -3563,21 +3524,21 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
if (player->kartstuff[k_growshrinktimer] > ((itemtime + TICRATE*2) - 25))
|
||||
{
|
||||
if (leveltime & 2)
|
||||
player->mo->destscale = FRACUNIT*3/2;
|
||||
player->mo->destscale = (mapheaderinfo[gamemap-1]->mobj_scale)*3/2;
|
||||
else
|
||||
player->mo->destscale = FRACUNIT;
|
||||
player->mo->destscale = (mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
}
|
||||
else if (player->kartstuff[k_growshrinktimer] > 26
|
||||
&& player->kartstuff[k_growshrinktimer] <= ((itemtime + TICRATE*2) - 25))
|
||||
player->mo->destscale = FRACUNIT*3/2;
|
||||
player->mo->destscale = (mapheaderinfo[gamemap-1]->mobj_scale)*3/2;
|
||||
// Megashroom - Back to normal...
|
||||
else if (player->kartstuff[k_growshrinktimer] > 1
|
||||
&& player->kartstuff[k_growshrinktimer] <= 26)
|
||||
{
|
||||
if (leveltime & 2)
|
||||
player->mo->destscale = FRACUNIT;
|
||||
player->mo->destscale = (mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
else
|
||||
player->mo->destscale = FRACUNIT*3/2;
|
||||
player->mo->destscale = (mapheaderinfo[gamemap-1]->mobj_scale)*3/2;
|
||||
}
|
||||
if (player->kartstuff[k_growshrinktimer] == 26)
|
||||
S_StartSound(player->mo, sfx_mario8);
|
||||
|
@ -3620,10 +3581,12 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
player->mo->flags2 |= MF2_SHADOW;
|
||||
|
||||
if (!(player->mo->tracer))
|
||||
{
|
||||
player->mo->tracer = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_OVERLAY);
|
||||
P_SetMobjState(player->mo->tracer, S_PLAYERBOMB);
|
||||
}
|
||||
|
||||
P_SetTarget(&player->mo->tracer->target, player->mo);
|
||||
P_SetMobjState(player->mo->tracer, S_PLAYERBOMB);
|
||||
player->mo->tracer->color = player->mo->color;
|
||||
|
||||
if (player->kartstuff[k_comebacktimer] > 0)
|
||||
|
@ -3714,7 +3677,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
player->kartstuff[k_boostcharge] = 0;
|
||||
// Increase your size while charging your engine.
|
||||
if (leveltime < 150)
|
||||
player->mo->destscale = FRACUNIT + (player->kartstuff[k_boostcharge]*655);
|
||||
player->mo->destscale = (mapheaderinfo[gamemap-1]->mobj_scale) + (player->kartstuff[k_boostcharge]*655);
|
||||
|
||||
// Determine the outcome of your charge.
|
||||
if (leveltime > 140 && player->kartstuff[k_boostcharge])
|
||||
|
@ -4174,14 +4137,17 @@ static void K_drawKartItemClose(void)
|
|||
patch_t *localpatch = kp_nodraw;
|
||||
|
||||
INT32 splitflags = 0;
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
if (stplyr != &players[displayplayer])
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
}
|
||||
}
|
||||
|
||||
/*if ()
|
||||
|
@ -4219,16 +4185,18 @@ static void K_drawKartItemRoulette(void)
|
|||
patch_t *localpatch = kp_nodraw;
|
||||
|
||||
INT32 splitflags = 0;
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
if (stplyr != &players[displayplayer])
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
}
|
||||
}
|
||||
|
||||
/*if ()
|
||||
switch(stplyr->kartstuff[k_itemroulette] % 53)
|
||||
{
|
||||
|
@ -4293,14 +4261,17 @@ static void K_drawKartRetroItem(void)
|
|||
patch_t *localpatch = kp_nodraw;
|
||||
|
||||
INT32 splitflags = 0;
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
if (stplyr != &players[displayplayer])
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
}
|
||||
}
|
||||
|
||||
// I'm doing this a little weird and drawing mostly in reverse order
|
||||
|
@ -4446,14 +4417,17 @@ static void K_drawKartTimestamp(void)
|
|||
INT32 TIME_XB;
|
||||
|
||||
INT32 splitflags = 0;
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
if (stplyr != &players[displayplayer])
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
}
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(TIME_X, TIME_Y, V_SNAPTOTOP|V_SNAPTORIGHT|splitflags, kp_timestickerwide);
|
||||
|
@ -4515,14 +4489,17 @@ static void K_DrawKartPositionNum(INT32 num)
|
|||
patch_t *localpatch = kp_positionnum[0][0];
|
||||
|
||||
INT32 splitflags = 0;
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
if (stplyr != &players[displayplayer])
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
}
|
||||
}
|
||||
|
||||
// Special case for 0
|
||||
|
@ -4747,14 +4724,17 @@ static void K_drawKartPositionFaces(void)
|
|||
static void K_drawKartLaps(void)
|
||||
{
|
||||
INT32 splitflags = 0;
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
if (stplyr != &players[displayplayer])
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
}
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(LAPS_X, LAPS_Y, V_SNAPTOLEFT|V_SNAPTOBOTTOM|splitflags, kp_lapsticker);
|
||||
|
@ -4770,14 +4750,17 @@ static void K_drawKartSpeedometer(void)
|
|||
fixed_t convSpeed;
|
||||
|
||||
INT32 splitflags = 0;
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
if (stplyr != &players[displayplayer])
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
}
|
||||
}
|
||||
|
||||
if (cv_speedometer.value == 1)
|
||||
|
@ -4802,14 +4785,17 @@ static void K_drawKartBalloonsOrKarma(void)
|
|||
UINT8 *colormap = R_GetTranslationColormap(-1, stplyr->skincolor, 0);
|
||||
|
||||
INT32 splitflags = 0;
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
if (stplyr != &players[displayplayer])
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
}
|
||||
}
|
||||
|
||||
if (stplyr->kartstuff[k_balloon] <= 0)
|
||||
|
@ -4852,9 +4838,15 @@ fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my
|
|||
if (diff < ANGLE_90 || diff > ANGLE_270)
|
||||
return -320;
|
||||
else
|
||||
x = (FixedMul(FINETANGENT(((diff+ANGLE_90)>>ANGLETOFINESHIFT) & 4095), 160<<FRACBITS) + (160<<FRACBITS));
|
||||
x = (FixedMul(FINETANGENT(((diff+ANGLE_90)>>ANGLETOFINESHIFT) & 4095), 160<<FRACBITS) + (160<<FRACBITS))>>FRACBITS;
|
||||
|
||||
return (x>>FRACBITS);
|
||||
if (cv_kartmirror.value)
|
||||
x = 320-x;
|
||||
|
||||
if (splitscreen3 || splitscreen4)
|
||||
x /= 2;
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
static void K_drawKartPlayerCheck(void)
|
||||
|
@ -4865,14 +4857,17 @@ static void K_drawKartPlayerCheck(void)
|
|||
patch_t *localpatch;
|
||||
|
||||
INT32 splitflags = 0;
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
if (stplyr != &players[displayplayer])
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
else if (splitscreen3 || splitscreen4)
|
||||
{
|
||||
if (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_SPLITSCREEN;
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
splitflags |= V_HORZSCREEN;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(stplyr->mo))
|
||||
|
@ -5008,7 +5003,10 @@ static void K_drawStartLakitu(void)
|
|||
else
|
||||
adjustY = 200;
|
||||
|
||||
V_DrawSmallScaledPatch(LAKI_X, LAKI_Y + adjustY, V_SNAPTOTOP, localpatch);
|
||||
if (cv_kartmirror.value)
|
||||
V_DrawSmallScaledPatch(320-LAKI_X, LAKI_Y + adjustY, V_SNAPTOTOP|V_FLIP, localpatch);
|
||||
else
|
||||
V_DrawSmallScaledPatch(LAKI_X, LAKI_Y + adjustY, V_SNAPTOTOP, localpatch);
|
||||
}
|
||||
|
||||
static void K_drawLapLakitu(void)
|
||||
|
@ -5078,7 +5076,10 @@ static void K_drawLapLakitu(void)
|
|||
adjustY = 200;
|
||||
}
|
||||
|
||||
V_DrawSmallScaledPatch(LAKI_X+14+(swoopTimer/4), LAKI_Y + adjustY, V_SNAPTOTOP, localpatch);
|
||||
if (cv_kartmirror.value)
|
||||
V_DrawSmallScaledPatch(320-(LAKI_X+14+(swoopTimer/4)), LAKI_Y + adjustY, V_SNAPTOTOP|V_FLIP, localpatch);
|
||||
else
|
||||
V_DrawSmallScaledPatch(LAKI_X+14+(swoopTimer/4), LAKI_Y + adjustY, V_SNAPTOTOP, localpatch);
|
||||
}
|
||||
|
||||
void K_drawKartHUD(void)
|
||||
|
|
|
@ -23,7 +23,6 @@ void K_LakituChecker(player_t *player);
|
|||
void K_KartMoveAnimation(player_t *player);
|
||||
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
|
||||
void K_SpinPlayer(player_t *player, mobj_t *source);
|
||||
//void K_WipeoutPlayer(player_t *player, mobj_t *source);
|
||||
void K_SquishPlayer(player_t *player, mobj_t *source);
|
||||
void K_ExplodePlayer(player_t *player, mobj_t *source);
|
||||
void K_StealBalloon(player_t *player, player_t *victim, boolean force);
|
||||
|
|
|
@ -1235,6 +1235,10 @@ static int mapheaderinfo_get(lua_State *L)
|
|||
lua_pushinteger(L, header->levelflags);
|
||||
else if (fastcmp(field,"menuflags"))
|
||||
lua_pushinteger(L, header->menuflags);
|
||||
/*else if (fastcmp(field,"automap"))
|
||||
lua_pushboolean(L, header->automap);*/
|
||||
else if (fastcmp(field,"mobj_scale"))
|
||||
lua_pushfixed(L, header->mobj_scale);
|
||||
// TODO add support for reading numGradedMares and grades
|
||||
else {
|
||||
// Read custom vars now
|
||||
|
|
|
@ -8094,6 +8094,10 @@ void A_ToggleFlameJet(mobj_t* actor)
|
|||
void A_ItemPop(mobj_t *actor)
|
||||
{
|
||||
mobj_t *remains;
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_ItemPop", actor))
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (!(actor->target && actor->target->player))
|
||||
{
|
||||
|
@ -8151,6 +8155,10 @@ void A_RedShellChase(mobj_t *actor)
|
|||
INT32 c = 0;
|
||||
INT32 stop;
|
||||
player_t *player;
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_RedShellChase", actor))
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (actor->tracer)
|
||||
{
|
||||
|
@ -8252,6 +8260,10 @@ void A_BobombExplode(mobj_t *actor)
|
|||
INT32 d;
|
||||
INT32 locvar1 = var1;
|
||||
mobjtype_t type;
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_BobombExplode", actor))
|
||||
return;
|
||||
#endif
|
||||
|
||||
type = (mobjtype_t)locvar1;
|
||||
|
||||
|
|
|
@ -2939,7 +2939,7 @@ static void P_RingDamage(player_t *player, mobj_t *inflictor, mobj_t *source, IN
|
|||
S_StartSound(player->mo, sfx_spkdth);
|
||||
}
|
||||
|
||||
/*if (source && source->player && !player->powers[pw_super]) //don't score points against super players
|
||||
if (source && source->player && !player->powers[pw_super]) //don't score points against super players
|
||||
{
|
||||
// Award no points when players shoot each other when cv_friendlyfire is on.
|
||||
if (!G_GametypeHasTeams() || !(source->player->ctfteam == player->ctfteam && source != player->mo))
|
||||
|
@ -2955,7 +2955,7 @@ static void P_RingDamage(player_t *player, mobj_t *inflictor, mobj_t *source, IN
|
|||
if (!G_GametypeHasTeams() || !(source->player->ctfteam == player->ctfteam && source != player->mo))
|
||||
P_AddPlayerScore(source->player, 1);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// Ring loss sound plays despite hitting spikes
|
||||
P_PlayRinglossSound(player->mo); // Ringledingle!
|
||||
|
@ -3218,7 +3218,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
|| inflictor->type == MT_TRIPLEREDSHIELD1 || inflictor->type == MT_TRIPLEREDSHIELD2 || inflictor->type == MT_TRIPLEREDSHIELD3
|
||||
|| inflictor->player))
|
||||
{
|
||||
//K_WipeoutPlayer(player, source);
|
||||
player->kartstuff[k_spinouttype] = 1;
|
||||
K_SpinPlayer(player, source);
|
||||
damage = player->mo->health - 1;
|
||||
|
|
29
src/p_mobj.c
29
src/p_mobj.c
|
@ -3603,7 +3603,9 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
|||
|| (thiscam == &camera4 && players[fourthdisplayplayer].mo && (players[fourthdisplayplayer].mo->flags2 & MF2_TWOD)))
|
||||
itsatwodlevel = true;
|
||||
|
||||
if (player->pflags & PF_FLIPCAM && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP)
|
||||
if (cv_kartmirror.value)
|
||||
postimg = postimg_mirror;
|
||||
else if (player->pflags & PF_FLIPCAM && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP)
|
||||
postimg = postimg_flip;
|
||||
else if (player->awayviewtics)
|
||||
{
|
||||
|
@ -5952,6 +5954,13 @@ void P_Attract(mobj_t *source, mobj_t *dest, boolean nightsgrab) // Home in on y
|
|||
if (!dest || dest->health <= 0 || !dest->player || !source->tracer)
|
||||
return;
|
||||
|
||||
if (dest->player && dest->player->kartstuff[k_comebackmode] == 1)
|
||||
{
|
||||
P_TeleportMove(source, dest->x+dest->momx, dest->y+dest->momy, dest->z+dest->momz);
|
||||
source->angle = dest->angle;
|
||||
return;
|
||||
}
|
||||
|
||||
// change angle
|
||||
source->angle = R_PointToAngle2(source->x, source->y, tx, ty);
|
||||
|
||||
|
@ -6534,7 +6543,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
|
||||
// Actor's distance from its Target, or Radius.
|
||||
radius = FixedDiv(7, mobj->target->scale)*FRACUNIT;
|
||||
radius = 7*mobj->target->scale;
|
||||
|
||||
// Switch blue flames to red flames
|
||||
if (mobj->target->player && mobj->type == MT_DRIFT
|
||||
|
@ -6559,8 +6568,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
|
||||
// Shrink if the player shrunk too.
|
||||
if (mobj->target->player)
|
||||
mobj->scale = mobj->target->scale;
|
||||
mobj->scale = mobj->target->scale;
|
||||
|
||||
P_UnsetThingPosition(mobj);
|
||||
{
|
||||
|
@ -8492,9 +8500,8 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
|||
mobj->destscale = mobj->scale;
|
||||
mobj->scalespeed = FRACUNIT/12;
|
||||
|
||||
// TODO: Make this a special map header
|
||||
if ((maptol & TOL_ERZ3) && !(mobj->type == MT_BLACKEGGMAN))
|
||||
mobj->destscale = FRACUNIT/2;
|
||||
if (mapheaderinfo[gamemap-1] && mapheaderinfo[gamemap-1]->mobj_scale != FRACUNIT) //&& !(mobj->type == MT_BLACKEGGMAN)
|
||||
mobj->destscale = mapheaderinfo[gamemap-1]->mobj_scale;
|
||||
|
||||
// set subsector and/or block links
|
||||
P_SetThingPosition(mobj);
|
||||
|
@ -8763,9 +8770,8 @@ mobj_t *P_SpawnShadowMobj(mobj_t * caster)
|
|||
mobj->destscale = mobj->scale;
|
||||
mobj->scalespeed = FRACUNIT/12;
|
||||
|
||||
// TODO: Make this a special map header
|
||||
if ((maptol & TOL_ERZ3) && !(mobj->type == MT_BLACKEGGMAN))
|
||||
mobj->destscale = FRACUNIT/2;
|
||||
if (mapheaderinfo[gamemap-1] && mapheaderinfo[gamemap-1]->mobj_scale != FRACUNIT) //&& !(mobj->type == MT_BLACKEGGMAN)
|
||||
mobj->destscale = mapheaderinfo[gamemap-1]->mobj_scale;
|
||||
|
||||
// set subsector and/or block links
|
||||
P_SetThingPosition(mobj);
|
||||
|
@ -9527,6 +9533,9 @@ void P_SpawnPlayer(INT32 playernum)
|
|||
overheadarrow->flags2 |= MF2_DONTDRAW;
|
||||
P_SetScale(overheadarrow, mobj->destscale);
|
||||
|
||||
if (leveltime < 1)
|
||||
p->kartstuff[k_comebackshowninfo] = 0;
|
||||
|
||||
if (gametype != GT_RACE)
|
||||
{
|
||||
/*INT32 i;
|
||||
|
|
|
@ -160,7 +160,7 @@ FUNCNORETURN static ATTRNORETURN void CorruptMapError(const char *msg)
|
|||
I_Error("Invalid or corrupt map.\nLook in log file or text console for technical details.");
|
||||
}
|
||||
|
||||
#define NUMLAPS_DEFAULT 4
|
||||
#define NUMLAPS_DEFAULT 3
|
||||
|
||||
/** Clears the data from a single map header.
|
||||
*
|
||||
|
@ -224,9 +224,14 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
|
|||
DEH_WriteUndoline("LEVELFLAGS", va("%d", mapheaderinfo[num]->levelflags), UNDO_NONE);
|
||||
mapheaderinfo[num]->levelflags = 0;
|
||||
DEH_WriteUndoline("MENUFLAGS", va("%d", mapheaderinfo[num]->menuflags), UNDO_NONE);
|
||||
mapheaderinfo[num]->menuflags = LF2_RECORDATTACK|LF2_NOVISITNEEDED; // 0
|
||||
mapheaderinfo[num]->menuflags = 0;
|
||||
// TODO grades support for delfile (pfft yeah right)
|
||||
P_DeleteGrades(num);
|
||||
// SRB2Kart
|
||||
//DEH_WriteUndoline("AUTOMAP", va("%d", mapheaderinfo[num]->automap), UNDO_NONE);
|
||||
//mapheaderinfo[num]->automap = false;
|
||||
DEH_WriteUndoline("MOBJSCALE", va("%d", mapheaderinfo[num]->mobj_scale), UNDO_NONE);
|
||||
mapheaderinfo[num]->mobj_scale = FRACUNIT;
|
||||
// an even further impossibility, delfile custom opts support
|
||||
mapheaderinfo[num]->customopts = NULL;
|
||||
mapheaderinfo[num]->numCustomOptions = 0;
|
||||
|
|
|
@ -4892,7 +4892,7 @@ static void P_3dMovement(player_t *player)
|
|||
P_Thrust(player->mo, movepushangle, movepushforward);
|
||||
#endif
|
||||
}
|
||||
else if (!player->kartstuff[k_spinouttimer])
|
||||
else if (!(player->kartstuff[k_spinouttimer]))
|
||||
{
|
||||
K_MomentumToFacing(player);
|
||||
}
|
||||
|
@ -9140,6 +9140,9 @@ static void P_CalcPostImg(player_t *player)
|
|||
*param = 5;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cv_kartmirror.value) // srb2kart
|
||||
*type = postimg_mirror;
|
||||
}
|
||||
|
||||
/*void P_DoPityCheck(player_t *player)
|
||||
|
|
|
@ -1345,7 +1345,7 @@ void R_RenderPlayerView(player_t *player)
|
|||
|
||||
if (cv_homremoval.value && player == &players[displayplayer]) // if this is display player 1
|
||||
{
|
||||
if (cv_homremoval.value == 1)
|
||||
if (cv_homremoval.value == 1 || splitscreen3) // BAD HACK, V_DrawFill isn't letting me cover up only the 4th screen, so let's just sliently force this
|
||||
V_DrawFill(0, 0, vid.width, vid.height, 31); // No HOM effect!
|
||||
else //'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
|
||||
V_DrawFill(0, 0, vid.width, vid.height, 128+(timeinmap&15));
|
||||
|
|
|
@ -1974,7 +1974,7 @@ void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param)
|
|||
(void)type;
|
||||
(void)param;
|
||||
#else
|
||||
INT32 yoffset;
|
||||
INT32 yoffset, xoffset;
|
||||
|
||||
#ifdef HWRENDER
|
||||
// draw a hardware converted patch
|
||||
|
@ -1993,10 +1993,10 @@ void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param)
|
|||
else
|
||||
yoffset = 0;
|
||||
|
||||
/*if (view & 1 && !splitscreen)
|
||||
if (view & 1 && !splitscreen)
|
||||
xoffset = viewwidth;
|
||||
else
|
||||
xoffset = 0;*/
|
||||
xoffset = 0;
|
||||
|
||||
if (type == postimg_water)
|
||||
{
|
||||
|
@ -2083,10 +2083,10 @@ Unoptimized version
|
|||
INT32 y, y2;
|
||||
|
||||
for (y = yoffset, y2 = yoffset+viewheight - 1; y < yoffset+viewheight; y++, y2--)
|
||||
M_Memcpy(&tmpscr[y2*vid.width], &srcscr[y*vid.width], vid.width);
|
||||
M_Memcpy(&tmpscr[y2*vid.width+xoffset], &srcscr[y*vid.width+xoffset], viewwidth);
|
||||
|
||||
VID_BlitLinearScreen(tmpscr+vid.width*vid.bpp*yoffset, screens[0]+vid.width*vid.bpp*yoffset,
|
||||
vid.width*vid.bpp, viewheight, vid.width*vid.bpp, vid.width);
|
||||
VID_BlitLinearScreen(tmpscr+vid.width*vid.bpp*yoffset+xoffset, screens[0]+vid.width*vid.bpp*yoffset+xoffset,
|
||||
viewwidth*vid.bpp, viewheight, vid.width*vid.bpp, vid.width);
|
||||
}
|
||||
else if (type == postimg_heat) // Heat wave
|
||||
{
|
||||
|
@ -2132,6 +2132,21 @@ Unoptimized version
|
|||
VID_BlitLinearScreen(tmpscr+vid.width*vid.bpp*yoffset, screens[0]+vid.width*vid.bpp*yoffset,
|
||||
vid.width*vid.bpp, viewheight, vid.width*vid.bpp, vid.width);
|
||||
}
|
||||
else if (type == postimg_mirror) // Flip the screen on the x axis
|
||||
{
|
||||
UINT8 *tmpscr = screens[4];
|
||||
UINT8 *srcscr = screens[0];
|
||||
INT32 y, x, x2;
|
||||
|
||||
for (y = yoffset; y < yoffset+viewheight; y++)
|
||||
{
|
||||
for (x = 0, x2 = (viewwidth*vid.bpp)-1; x < (viewwidth*vid.bpp); x++, x2--)
|
||||
tmpscr[y*vid.width+xoffset + x2] = srcscr[y*vid.width+xoffset + x];
|
||||
}
|
||||
|
||||
VID_BlitLinearScreen(tmpscr+vid.width*vid.bpp*yoffset+xoffset, screens[0]+vid.width*vid.bpp*yoffset+xoffset,
|
||||
viewwidth*vid.bpp, viewheight, vid.width*vid.bpp, vid.width);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue