mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-15 17:21:34 +00:00
Merge branch 'master' into net-screen
This commit is contained in:
commit
7900af2a0a
13 changed files with 318 additions and 295 deletions
|
@ -799,10 +799,10 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_consolechat);
|
||||
CV_RegisterVar(&cv_chatnotifications);
|
||||
CV_RegisterVar(&cv_chatbacktint);
|
||||
CV_RegisterVar(&cv_crosshair);
|
||||
CV_RegisterVar(&cv_crosshair2);
|
||||
CV_RegisterVar(&cv_crosshair3);
|
||||
CV_RegisterVar(&cv_crosshair4);
|
||||
//CV_RegisterVar(&cv_crosshair);
|
||||
//CV_RegisterVar(&cv_crosshair2);
|
||||
//CV_RegisterVar(&cv_crosshair3);
|
||||
//CV_RegisterVar(&cv_crosshair4);
|
||||
//CV_RegisterVar(&cv_alwaysfreelook);
|
||||
//CV_RegisterVar(&cv_alwaysfreelook2);
|
||||
|
||||
|
|
70
src/g_game.c
70
src/g_game.c
|
@ -340,7 +340,7 @@ void SendWeaponPref2(void);
|
|||
void SendWeaponPref3(void);
|
||||
void SendWeaponPref4(void);
|
||||
|
||||
static CV_PossibleValue_t crosshair_cons_t[] = {{0, "Off"}, {1, "Cross"}, {2, "Angle"}, {3, "Point"}, {0, NULL}};
|
||||
//static CV_PossibleValue_t crosshair_cons_t[] = {{0, "Off"}, {1, "Cross"}, {2, "Angle"}, {3, "Point"}, {0, NULL}};
|
||||
static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
|
||||
#ifdef _WII
|
||||
{1, "LStick.X"}, {2, "LStick.Y"}, {-1, "LStick.X-"}, {-2, "LStick.Y-"},
|
||||
|
@ -428,10 +428,10 @@ consvar_t cv_chatbacktint = {"chatbacktint", "Off", CV_SAVE, CV_OnOff, NULL, 0,
|
|||
static CV_PossibleValue_t consolechat_cons_t[] = {{0, "Window"}, {1, "Console"}, {0, NULL}};
|
||||
consvar_t cv_consolechat = {"chatmode", "Window", CV_SAVE, consolechat_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_crosshair = {"crosshair", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_crosshair2 = {"crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_crosshair3 = {"crosshair3", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_crosshair4 = {"crosshair4", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
/*consvar_t cv_crosshair = {"crosshair", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_crosshair2 = {"crosshair2", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_crosshair3 = {"crosshair3", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_crosshair4 = {"crosshair4", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};*/
|
||||
consvar_t cv_invertmouse = {"invertmouse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_alwaysfreelook = {"alwaysmlook", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_invertmouse2 = {"invertmouse2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -1812,25 +1812,41 @@ static INT32 spectatedelay, spectatedelay2, spectatedelay3, spectatedelay4 = 0;
|
|||
boolean G_Responder(event_t *ev)
|
||||
{
|
||||
// allow spy mode changes even during the demo
|
||||
if (gamestate == GS_LEVEL && ev->type == ev_keydown && ev->data1 == KEY_F12)
|
||||
if (gamestate == GS_LEVEL && ev->type == ev_keydown
|
||||
&& (ev->data1 == gamecontrol[gc_viewpoint][0] || ev->data1 == gamecontrol[gc_viewpoint][1]))
|
||||
{
|
||||
if (splitscreen || !netgame)
|
||||
displayplayer = consoleplayer;
|
||||
else
|
||||
{
|
||||
// spy mode
|
||||
do
|
||||
UINT8 i = 0; // spy mode
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
displayplayer++;
|
||||
if (displayplayer == MAXPLAYERS)
|
||||
displayplayer = 0;
|
||||
|
||||
if (displayplayer == consoleplayer)
|
||||
break; // End loop
|
||||
|
||||
if (!playeringame[displayplayer])
|
||||
continue;
|
||||
|
||||
if (players[displayplayer].spectator)
|
||||
continue;
|
||||
|
||||
// SRB2Kart: Only go through players who are actually playing
|
||||
if (players[displayplayer].exiting)
|
||||
continue;
|
||||
|
||||
// I don't know if we want this actually, but I'll humor the suggestion anyway
|
||||
if (G_BattleGametype())
|
||||
{
|
||||
if (players[displayplayer].kartstuff[k_bumper] <= 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
// SRB2Kart: we have no team-based modes, YET...
|
||||
/*if (G_GametypeHasTeams())
|
||||
{
|
||||
if (players[consoleplayer].ctfteam
|
||||
|
@ -1855,24 +1871,13 @@ boolean G_Responder(event_t *ev)
|
|||
continue;
|
||||
}*/
|
||||
|
||||
// SRB2Kart: Ehhh, who cares, Mario Kart's designed around screen-cheating anyway
|
||||
/*if (gametype != GT_RACE)
|
||||
{
|
||||
if (players[consoleplayer].kartstuff[k_bumper] > 0)
|
||||
continue;
|
||||
}*/
|
||||
|
||||
break;
|
||||
} while (displayplayer != consoleplayer);
|
||||
}
|
||||
|
||||
// change statusbar also if playing back demo
|
||||
if (singledemo)
|
||||
ST_changeDemoView();
|
||||
|
||||
// tell who's the view
|
||||
CONS_Printf(M_GetText("Viewpoint: %s\n"), player_names[displayplayer]);
|
||||
P_ResetCamera(&players[displayplayer], &camera);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -2280,28 +2285,11 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
|||
{
|
||||
if (legitimateexit && !demoplayback && !mapreset) // (yes you're allowed to unlock stuff this way when the game is modified)
|
||||
{
|
||||
UINT8 i = 0;
|
||||
|
||||
if (netgame)
|
||||
matchesplayed++;
|
||||
if (M_UpdateUnlockablesAndExtraEmblems(true))
|
||||
{
|
||||
// check to see if there's anyone else at all
|
||||
for (; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (i == consoleplayer)
|
||||
continue;
|
||||
if (playeringame[i] && !stplyr->spectator)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i != MAXPLAYERS) // Not FREE PLAY
|
||||
{
|
||||
matchesplayed++;
|
||||
if (M_UpdateUnlockablesAndExtraEmblems(true))
|
||||
{
|
||||
S_StartSound(NULL, sfx_ncitem);
|
||||
G_SaveGameData(true); // only save if unlocked something
|
||||
}
|
||||
S_StartSound(NULL, sfx_ncitem);
|
||||
G_SaveGameData(true); // only save if unlocked something
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ extern INT16 rw_maximums[NUM_WEAPONS];
|
|||
|
||||
// used in game menu
|
||||
extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatspamprotection, cv_chatbacktint;
|
||||
extern consvar_t cv_crosshair, cv_crosshair2, cv_crosshair3, cv_crosshair4;
|
||||
//extern consvar_t cv_crosshair, cv_crosshair2, cv_crosshair3, cv_crosshair4;
|
||||
extern consvar_t cv_invertmouse, cv_alwaysfreelook, cv_mousemove;
|
||||
extern consvar_t cv_turnaxis,cv_moveaxis,cv_brakeaxis,cv_aimaxis,cv_lookaxis,cv_fireaxis,cv_driftaxis;
|
||||
extern consvar_t cv_turnaxis2,cv_moveaxis2,cv_brakeaxis2,cv_aimaxis2,cv_lookaxis2,cv_fireaxis2,cv_driftaxis2;
|
||||
|
|
|
@ -1209,6 +1209,9 @@ static const char *gamecontrolname[num_gamecontrols] =
|
|||
"console",
|
||||
"pause",
|
||||
"systemmenu",
|
||||
"screenshot",
|
||||
"recordgif",
|
||||
"viewpoint",
|
||||
"custom1",
|
||||
"custom2",
|
||||
"custom3",
|
||||
|
@ -1293,6 +1296,9 @@ void G_Controldefault(void)
|
|||
// Extra controls
|
||||
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_screenshot ][0] = KEY_F8;
|
||||
gamecontrol[gc_recordgif ][0] = KEY_F9;
|
||||
gamecontrol[gc_viewpoint ][0] = KEY_F12;
|
||||
gamecontrol[gc_talkkey ][0] = 't';
|
||||
//gamecontrol[gc_teamkey ][0] = 'y';
|
||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||
|
@ -1303,11 +1309,11 @@ void G_Controldefault(void)
|
|||
gamecontrol[gc_camreset ][0] = KEY_HOME;
|
||||
gamecontrol[gc_camtoggle ][0] = KEY_BACKSPACE;
|
||||
|
||||
//gamecontrol[gc_viewpoint ][1] = KEY_JOY1+3; // Y
|
||||
gamecontrol[gc_viewpoint ][1] = KEY_JOY1+3; // Y
|
||||
gamecontrol[gc_pause ][1] = KEY_JOY1+6; // Back
|
||||
gamecontrol[gc_systemmenu ][0] = KEY_JOY1+7; // Start
|
||||
gamecontrol[gc_camtoggle ][1] = KEY_HAT1+0; // D-Pad Up
|
||||
//gamecontrol[gc_screenshot ][1] = KEY_HAT1+1; // D-Pad Down
|
||||
gamecontrol[gc_screenshot ][1] = KEY_HAT1+1; // D-Pad Down
|
||||
gamecontrol[gc_talkkey ][1] = KEY_HAT1+2; // D-Pad Left
|
||||
gamecontrol[gc_scores ][1] = KEY_HAT1+3; // D-Pad Right
|
||||
|
||||
|
|
|
@ -115,6 +115,9 @@ typedef enum
|
|||
gc_console,
|
||||
gc_pause,
|
||||
gc_systemmenu,
|
||||
gc_screenshot,
|
||||
gc_recordgif,
|
||||
gc_viewpoint,
|
||||
gc_custom1, // Lua scriptable
|
||||
gc_custom2, // Lua scriptable
|
||||
gc_custom3, // Lua scriptable
|
||||
|
|
|
@ -857,6 +857,10 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
|||
else if (!(color & V_SNAPTOTOP))
|
||||
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 2;
|
||||
}
|
||||
if (color & V_SPLITSCREEN)
|
||||
fy += ((float)BASEVIDHEIGHT * dupy)/2;
|
||||
if (color & V_HORZSCREEN)
|
||||
fx += ((float)BASEVIDWIDTH * dupx)/2;
|
||||
}
|
||||
|
||||
if (fx >= vid.width || fy >= vid.height)
|
||||
|
@ -963,6 +967,10 @@ void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color, INT32
|
|||
else if (!(options & V_SNAPTOTOP))
|
||||
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 2;
|
||||
}
|
||||
if (options & V_SPLITSCREEN)
|
||||
fy += ((float)BASEVIDHEIGHT * dupy)/2;
|
||||
if (options & V_HORZSCREEN)
|
||||
fx += ((float)BASEVIDWIDTH * dupx)/2;
|
||||
}
|
||||
|
||||
if (fx >= vid.width || fy >= vid.height)
|
||||
|
|
|
@ -1195,7 +1195,10 @@ boolean HU_Responder(event_t *ev)
|
|||
c_input = 0; // reset input cursor
|
||||
chat_scrollmedown = true; // you hit enter, so you might wanna autoscroll to see what you just sent. :)
|
||||
}
|
||||
else if (c == KEY_ESCAPE)
|
||||
else if (c == KEY_ESCAPE
|
||||
|| ((c == gamecontrol[gc_talkkey][0] || c == gamecontrol[gc_talkkey][1]
|
||||
|| c == gamecontrol[gc_teamkey][0] || c == gamecontrol[gc_teamkey][1])
|
||||
&& c >= KEY_MOUSE1)) // If it's not a keyboard key, then the chat button is used as a toggle.
|
||||
{
|
||||
chat_on = false;
|
||||
c_input = 0; // reset input cursor
|
||||
|
@ -1809,7 +1812,7 @@ static void HU_DrawChat_Old(void)
|
|||
//
|
||||
// Crosshairs are pre-cached at HU_Init
|
||||
|
||||
static inline void HU_DrawCrosshair(void)
|
||||
/*static inline void HU_DrawCrosshair(void)
|
||||
{
|
||||
INT32 i, x, y;
|
||||
|
||||
|
@ -1961,7 +1964,7 @@ static inline void HU_DrawCrosshair4(void)
|
|||
|
||||
V_DrawScaledPatch(x, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
static void HU_DrawCEcho(void)
|
||||
{
|
||||
|
@ -2135,7 +2138,7 @@ void HU_Drawer(void)
|
|||
return;
|
||||
|
||||
// draw the crosshair, not when viewing demos nor with chasecam
|
||||
if (!automapactive && !demoplayback)
|
||||
/*if (!automapactive && !demoplayback)
|
||||
{
|
||||
if (cv_crosshair.value && !camera.chase && !players[displayplayer].spectator)
|
||||
HU_DrawCrosshair();
|
||||
|
@ -2148,7 +2151,7 @@ void HU_Drawer(void)
|
|||
|
||||
if (cv_crosshair4.value && !camera4.chase && !players[fourthdisplayplayer].spectator)
|
||||
HU_DrawCrosshair4();
|
||||
}
|
||||
}*/
|
||||
|
||||
// draw desynch text
|
||||
if (hu_resynching)
|
||||
|
|
67
src/k_kart.c
67
src/k_kart.c
|
@ -256,8 +256,6 @@ UINT8 colortranslations[MAXSKINCOLORS][16] = {
|
|||
*/
|
||||
};
|
||||
|
||||
//#define SALLYALTRAINBOW // Sal's edited version of the below, which keeps a colors' lightness, and looks better with hue-shifted colors like Ruby & Dream. Not strictly *better*, just different...
|
||||
|
||||
// Define for getting accurate color brightness readings according to how the human eye sees them.
|
||||
// https://en.wikipedia.org/wiki/Relative_luminance
|
||||
// 0.2126 to red
|
||||
|
@ -277,7 +275,6 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
|
|||
INT32 i;
|
||||
RGBA_t color;
|
||||
UINT8 brightness;
|
||||
#ifndef SALLYALTRAINBOW
|
||||
INT32 j;
|
||||
UINT8 colorbrightnesses[16];
|
||||
UINT16 brightdif;
|
||||
|
@ -289,7 +286,6 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
|
|||
color = V_GetColor(colortranslations[skincolor][i]);
|
||||
SETBRIGHTNESS(colorbrightnesses[i], color.s.red, color.s.green, color.s.blue);
|
||||
}
|
||||
#endif
|
||||
|
||||
// next, for every colour in the palette, choose the transcolor that has the closest brightness
|
||||
for (i = 0; i < NUM_PALETTE_ENTRIES; i++)
|
||||
|
@ -301,10 +297,6 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
|
|||
}
|
||||
color = V_GetColor(i);
|
||||
SETBRIGHTNESS(brightness, color.s.red, color.s.green, color.s.blue);
|
||||
#ifdef SALLYALTRAINBOW
|
||||
brightness = 15-(brightness/16); // Yes, 15.
|
||||
dest_colormap[i] = colortranslations[skincolor][brightness];
|
||||
#else
|
||||
brightdif = 256;
|
||||
for (j = 0; j < 16; j++)
|
||||
{
|
||||
|
@ -315,7 +307,6 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
|
|||
dest_colormap[i] = colortranslations[skincolor][j];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -934,12 +925,12 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
|||
#undef PLAYROULETTESND
|
||||
}
|
||||
|
||||
roulettestop = (TICRATE*1) + (3*(pingame - player->kartstuff[k_position]));
|
||||
roulettestop = TICRATE + (3*(pingame - player->kartstuff[k_position]));
|
||||
|
||||
// If the roulette finishes or the player presses BT_ATTACK, stop the roulette and calculate the item.
|
||||
// I'm returning via the exact opposite, however, to forgo having another bracket embed. Same result either way, I think.
|
||||
// Finally, if you get past this check, now you can actually start calculating what item you get.
|
||||
if ((cmd->buttons & BT_ATTACK) && !(player->kartstuff[k_eggmanheld] || player->kartstuff[k_itemheld]) && player->kartstuff[k_itemroulette] >= roulettestop)
|
||||
if ((cmd->buttons & BT_ATTACK) && !(player->kartstuff[k_eggmanheld] || player->kartstuff[k_itemheld]) && player->kartstuff[k_itemroulette] >= roulettestop && !modeattacking)
|
||||
{
|
||||
// Mashing reduces your chances for the good items
|
||||
mashed = FixedDiv((player->kartstuff[k_itemroulette])*FRACUNIT, ((TICRATE*3)+roulettestop)*FRACUNIT) - FRACUNIT;
|
||||
|
@ -2206,6 +2197,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
|
|||
dust->angle = (ANGLE_180/16) * i;
|
||||
P_SetScale(dust, source->scale);
|
||||
dust->destscale = source->scale*10;
|
||||
dust->scalespeed = FixedMul(dust->scalespeed, source->scale);
|
||||
P_InstaThrust(dust, dust->angle, FixedMul(20*FRACUNIT, source->scale));
|
||||
|
||||
truc = P_SpawnMobj(source->x + P_RandomRange(-radius, radius)*FRACUNIT,
|
||||
|
@ -2213,6 +2205,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
|
|||
source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOOMEXPLODE);
|
||||
P_SetScale(truc, source->scale);
|
||||
truc->destscale = source->scale*6;
|
||||
truc->scalespeed = FixedMul(truc->scalespeed, source->scale);
|
||||
speed = FixedMul(10*FRACUNIT, source->scale)>>FRACBITS;
|
||||
truc->momx = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||
|
@ -2228,6 +2221,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
|
|||
source->z + P_RandomRange(0, height)*FRACUNIT, MT_SMOKE);
|
||||
P_SetScale(dust, source->scale);
|
||||
dust->destscale = source->scale*10;
|
||||
dust->scalespeed = FixedMul(dust->scalespeed, source->scale);
|
||||
dust->tics = 30;
|
||||
dust->momz = P_RandomRange(FixedMul(3*FRACUNIT, source->scale)>>FRACBITS, FixedMul(7*FRACUNIT, source->scale)>>FRACBITS)*FRACUNIT;
|
||||
|
||||
|
@ -2236,6 +2230,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
|
|||
source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOOMPARTICLE);
|
||||
P_SetScale(truc, source->scale);
|
||||
truc->destscale = source->scale*5;
|
||||
truc->scalespeed = FixedMul(truc->scalespeed, source->scale);
|
||||
speed = FixedMul(20*FRACUNIT, source->scale)>>FRACBITS;
|
||||
truc->momx = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||
|
@ -2560,7 +2555,7 @@ void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent)
|
|||
I_Assert(mo != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mo));
|
||||
|
||||
dust = P_SpawnMobj(mo->x + (P_RandomRange(-25,25)<<FRACBITS), mo->y + (P_RandomRange(-25,25)<<FRACBITS), mo->z, MT_WIPEOUTTRAIL);
|
||||
dust = P_SpawnMobj(mo->x + (P_RandomRange(-25,25) * mo->scale), mo->y + (P_RandomRange(-25,25) * mo->scale), mo->z, MT_WIPEOUTTRAIL);
|
||||
|
||||
P_SetTarget(&dust->target, mo);
|
||||
dust->angle = R_PointToAngle2(0,0,mo->momx,mo->momy);
|
||||
|
@ -2629,45 +2624,17 @@ void K_DriftDustHandling(mobj_t *spawner)
|
|||
{
|
||||
dust->z += spawner->height - dust->height;
|
||||
}
|
||||
dust->momx = FixedMul(spawner->momx + (P_RandomRange(-speedrange, speedrange)<<FRACBITS), 3*FRACUNIT/4);
|
||||
dust->momy = FixedMul(spawner->momy + (P_RandomRange(-speedrange, speedrange)<<FRACBITS), 3*FRACUNIT/4);
|
||||
dust->momz = P_MobjFlip(spawner) * P_RandomRange(1, 4)<<FRACBITS;
|
||||
dust->momx = FixedMul(spawner->momx + (P_RandomRange(-speedrange, speedrange)<<FRACBITS), 3*(spawner->scale)/4);
|
||||
dust->momy = FixedMul(spawner->momy + (P_RandomRange(-speedrange, speedrange)<<FRACBITS), 3*(spawner->scale)/4);
|
||||
dust->momz = P_MobjFlip(spawner) * (P_RandomRange(1, 4) * (spawner->scale));
|
||||
P_SetScale(dust, spawner->scale/2);
|
||||
dust->destscale = spawner->scale * 3;
|
||||
dust->scalespeed = FixedMul(dust->scalespeed, spawner->scale);
|
||||
|
||||
if (leveltime % 6 == 0)
|
||||
S_StartSound(spawner, sfx_screec);
|
||||
|
||||
// Now time for a bunch of flag shit, groooooaann...
|
||||
if (spawner->flags2 & MF2_DONTDRAW)
|
||||
dust->flags2 |= MF2_DONTDRAW;
|
||||
else
|
||||
dust->flags2 &= ~MF2_DONTDRAW;
|
||||
|
||||
if (spawner->eflags & MFE_VERTICALFLIP)
|
||||
dust->eflags |= MFE_VERTICALFLIP;
|
||||
else
|
||||
dust->eflags &= ~MFE_VERTICALFLIP;
|
||||
|
||||
if (spawner->eflags & MFE_DRAWONLYFORP1)
|
||||
dust->eflags |= MFE_DRAWONLYFORP1;
|
||||
else
|
||||
dust->eflags &= ~MFE_DRAWONLYFORP1;
|
||||
|
||||
if (spawner->eflags & MFE_DRAWONLYFORP2)
|
||||
dust->eflags |= MFE_DRAWONLYFORP2;
|
||||
else
|
||||
dust->eflags &= ~MFE_DRAWONLYFORP2;
|
||||
|
||||
if (spawner->eflags & MFE_DRAWONLYFORP3)
|
||||
dust->eflags |= MFE_DRAWONLYFORP3;
|
||||
else
|
||||
dust->eflags &= ~MFE_DRAWONLYFORP3;
|
||||
|
||||
if (spawner->eflags & MFE_DRAWONLYFORP4)
|
||||
dust->eflags |= MFE_DRAWONLYFORP4;
|
||||
else
|
||||
dust->eflags &= ~MFE_DRAWONLYFORP4;
|
||||
K_MatchGenericExtraFlags(dust, spawner);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3004,7 +2971,10 @@ void K_DoSneaker(player_t *player, boolean doPFlag)
|
|||
const fixed_t prevboost = player->kartstuff[k_speedboost];
|
||||
|
||||
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3)
|
||||
{
|
||||
S_StartSound(player->mo, sfx_cdfm01);
|
||||
K_SpawnDashDustRelease(player);
|
||||
}
|
||||
|
||||
if (!player->kartstuff[k_sneakertimer])
|
||||
{
|
||||
|
@ -3015,7 +2985,6 @@ void K_DoSneaker(player_t *player, boolean doPFlag)
|
|||
}
|
||||
|
||||
player->kartstuff[k_sneakertimer] = sneakertime;
|
||||
K_SpawnDashDustRelease(player);
|
||||
|
||||
if (doPFlag)
|
||||
{
|
||||
|
@ -3691,9 +3660,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
// Speed lines
|
||||
if ((player->kartstuff[k_sneakertimer] || player->kartstuff[k_driftboost] || player->kartstuff[k_startboost]) && player->speed > 0)
|
||||
{
|
||||
mobj_t *fast = P_SpawnMobj(player->mo->x + (P_RandomRange(-36,36)<<FRACBITS),
|
||||
player->mo->y + (P_RandomRange(-36,36)<<FRACBITS),
|
||||
player->mo->z + (player->mo->height/2) + (P_RandomRange(-20,20)<<FRACBITS),
|
||||
mobj_t *fast = P_SpawnMobj(player->mo->x + (P_RandomRange(-36,36) * player->mo->scale),
|
||||
player->mo->y + (P_RandomRange(-36,36) * player->mo->scale),
|
||||
player->mo->z + (player->mo->height/2) + (P_RandomRange(-20,20) * player->mo->scale),
|
||||
MT_FASTLINE);
|
||||
fast->angle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy);
|
||||
fast->momx = 3*player->mo->momx/4;
|
||||
|
|
404
src/m_menu.c
404
src/m_menu.c
|
@ -289,8 +289,7 @@ static void M_SetupMultiPlayer4(INT32 choice);
|
|||
// Options
|
||||
// Split into multiple parts due to size
|
||||
// Controls
|
||||
menu_t OP_ControlsDef, /*OP_ControlListDef,*/ OP_MoveControlsDef;
|
||||
menu_t /*OP_MPControlsDef, OP_CameraControlsDef, OP_MiscControlsDef,*/ OP_CustomControlsDef, OP_SpectateControlsDef;
|
||||
menu_t OP_ControlsDef, OP_AllControlsDef;
|
||||
menu_t OP_MouseOptionsDef, OP_Mouse2OptionsDef;
|
||||
menu_t OP_Joystick1Def, OP_Joystick2Def;
|
||||
#ifndef NOFOURPLAYER
|
||||
|
@ -1116,88 +1115,47 @@ static menuitem_t OP_ControlsMenu[] =
|
|||
#endif
|
||||
};
|
||||
|
||||
static menuitem_t OP_MoveControlsMenu[] =
|
||||
static menuitem_t OP_AllControlsMenu[] =
|
||||
{
|
||||
{IT_CONTROL, NULL, "Accelerate", M_ChangeControl, gc_accelerate },
|
||||
{IT_CONTROL, NULL, "Turn Left", M_ChangeControl, gc_turnleft },
|
||||
{IT_CONTROL, NULL, "Turn Right", M_ChangeControl, gc_turnright },
|
||||
{IT_CONTROL, NULL, "Drift", M_ChangeControl, gc_drift },
|
||||
{IT_CONTROL, NULL, "Brake", M_ChangeControl, gc_brake },
|
||||
{IT_CONTROL, NULL, "Use/Throw Item", M_ChangeControl, gc_fire },
|
||||
{IT_CONTROL, NULL, "Aim Forward", M_ChangeControl, gc_aimforward },
|
||||
{IT_CONTROL, NULL, "Aim Backward", M_ChangeControl, gc_aimbackward},
|
||||
{IT_CONTROL, NULL, "Look Backward", M_ChangeControl, gc_lookback },
|
||||
|
||||
{IT_SPACE, NULL, "", NULL, 76},
|
||||
{IT_CONTROL, NULL, "Talk key", M_ChangeControl, gc_talkkey },
|
||||
//{IT_CONTROL, NULL, "Team-Talk key", M_ChangeControl, gc_teamkey },
|
||||
{IT_CONTROL, NULL, "Rankings/Scores", M_ChangeControl, gc_scores },
|
||||
{IT_CONTROL, NULL, "Open/Close Menu (ESC)", M_ChangeControl, gc_systemmenu},
|
||||
{IT_CONTROL, NULL, "Pause", M_ChangeControl, gc_pause },
|
||||
{IT_CONTROL, NULL, "Console", M_ChangeControl, gc_console },
|
||||
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def, 120},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Spectator Controls...", &OP_SpectateControlsDef, 128},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Custom Lua Actions...", &OP_CustomControlsDef, 136},
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Gamepad Options...", &OP_Joystick1Def, 0},
|
||||
//{IT_SPACE, NULL, NULL, NULL, 0},
|
||||
{IT_HEADER, NULL, "Gameplay Controls", NULL, 0},
|
||||
{IT_SPACE, NULL, NULL, NULL, 0},
|
||||
{IT_CONTROL, NULL, "Accelerate", M_ChangeControl, gc_accelerate },
|
||||
{IT_CONTROL, NULL, "Turn Left", M_ChangeControl, gc_turnleft },
|
||||
{IT_CONTROL, NULL, "Turn Right", M_ChangeControl, gc_turnright },
|
||||
{IT_CONTROL, NULL, "Drift", M_ChangeControl, gc_drift },
|
||||
{IT_CONTROL, NULL, "Brake", M_ChangeControl, gc_brake },
|
||||
{IT_CONTROL, NULL, "Use/Throw Item", M_ChangeControl, gc_fire },
|
||||
{IT_CONTROL, NULL, "Aim Forward", M_ChangeControl, gc_aimforward },
|
||||
{IT_CONTROL, NULL, "Aim Backward", M_ChangeControl, gc_aimbackward},
|
||||
{IT_CONTROL, NULL, "Look Backward", M_ChangeControl, gc_lookback },
|
||||
{IT_HEADER, NULL, "Miscelleanous Controls", NULL, 0},
|
||||
{IT_SPACE, NULL, NULL, NULL, 0},
|
||||
{IT_CONTROL, NULL, "Chat", M_ChangeControl, gc_talkkey },
|
||||
//{IT_CONTROL, NULL, "Team Chat", M_ChangeControl, gc_teamkey },
|
||||
{IT_CONTROL, NULL, "Show Rankings", M_ChangeControl, gc_scores },
|
||||
{IT_CONTROL, NULL, "Change Viewpoint", M_ChangeControl, gc_viewpoint },
|
||||
{IT_CONTROL, NULL, "Reset Camera", M_ChangeControl, gc_camreset },
|
||||
{IT_CONTROL, NULL, "Toggle First-Person", M_ChangeControl, gc_camtoggle },
|
||||
{IT_CONTROL, NULL, "Pause", M_ChangeControl, gc_pause },
|
||||
{IT_CONTROL, NULL, "Screenshot", M_ChangeControl, gc_screenshot },
|
||||
{IT_CONTROL, NULL, "Toggle GIF Recording", M_ChangeControl, gc_recordgif },
|
||||
{IT_CONTROL, NULL, "Open/Close Menu (ESC)", M_ChangeControl, gc_systemmenu },
|
||||
{IT_CONTROL, NULL, "Developer Console", M_ChangeControl, gc_console },
|
||||
{IT_HEADER, NULL, "Spectator Controls", NULL, 0},
|
||||
{IT_SPACE, NULL, NULL, NULL, 0},
|
||||
{IT_CONTROL, NULL, "Become Spectator", M_ChangeControl, gc_spectate },
|
||||
{IT_CONTROL, NULL, "Look Up", M_ChangeControl, gc_lookup },
|
||||
{IT_CONTROL, NULL, "Look Down", M_ChangeControl, gc_lookdown },
|
||||
{IT_CONTROL, NULL, "Center View", M_ChangeControl, gc_centerview },
|
||||
{IT_HEADER, NULL, "Custom Lua Actions", NULL, 0},
|
||||
{IT_SPACE, NULL, NULL, NULL, 0},
|
||||
{IT_CONTROL, NULL, "Custom Action 1", M_ChangeControl, gc_custom1 },
|
||||
{IT_CONTROL, NULL, "Custom Action 2", M_ChangeControl, gc_custom2 },
|
||||
{IT_CONTROL, NULL, "Custom Action 3", M_ChangeControl, gc_custom3 },
|
||||
};
|
||||
|
||||
static menuitem_t OP_SpectateControlsMenu[] =
|
||||
{
|
||||
{IT_CONTROL, NULL, "Become Spectator", M_ChangeControl, gc_spectate },
|
||||
{IT_CONTROL, NULL, "Look Up", M_ChangeControl, gc_lookup },
|
||||
{IT_CONTROL, NULL, "Look Down", M_ChangeControl, gc_lookdown },
|
||||
{IT_CONTROL, NULL, "Center View", M_ChangeControl, gc_centerview},
|
||||
{IT_CONTROL, NULL, "Reset Camera", M_ChangeControl, gc_camreset },
|
||||
{IT_CONTROL, NULL, "Toggle Chasecam", M_ChangeControl, gc_camtoggle },
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Chasecam" , &cv_chasecam , 52},
|
||||
{IT_STRING | IT_CVAR, NULL, "Crosshair", &cv_crosshair, 60},
|
||||
};
|
||||
|
||||
static menuitem_t OP_CustomControlsMenu[] =
|
||||
{
|
||||
{IT_CONTROL, NULL, "Custom Action 1", M_ChangeControl, gc_custom1},
|
||||
{IT_CONTROL, NULL, "Custom Action 2", M_ChangeControl, gc_custom2},
|
||||
{IT_CONTROL, NULL, "Custom Action 3", M_ChangeControl, gc_custom3},
|
||||
};
|
||||
|
||||
// Obsolete thanks to Kart
|
||||
/*static menuitem_t OP_MPControlsMenu[] =
|
||||
{
|
||||
// {IT_CALL | IT_STRING2, NULL, "Next Weapon", M_ChangeControl, gc_driftleft },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Prev Weapon", M_ChangeControl, gc_driftright },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 1", M_ChangeControl, gc_wepslot1 },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 2", M_ChangeControl, gc_wepslot2 },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 3", M_ChangeControl, gc_wepslot3 },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 4", M_ChangeControl, gc_wepslot4 },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 5", M_ChangeControl, gc_wepslot5 },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 6", M_ChangeControl, gc_wepslot6 },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Weapon Slot 7", M_ChangeControl, gc_wepslot7 },
|
||||
};
|
||||
|
||||
static menuitem_t OP_CameraControlsMenu[] =
|
||||
{
|
||||
// {IT_CALL | IT_STRING2, NULL, "Look Up", M_ChangeControl, gc_lookup },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Look Down", M_ChangeControl, gc_lookdown },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Center View", M_ChangeControl, gc_centerview },
|
||||
// {IT_CALL | IT_STRING2, NULL, "Mouselook", M_ChangeControl, gc_mouseaiming },
|
||||
};
|
||||
|
||||
static menuitem_t OP_MiscControlsMenu[] =
|
||||
{
|
||||
{IT_CALL | IT_STRING2, NULL, "Custom Action 1", M_ChangeControl, gc_custom1 },
|
||||
{IT_CALL | IT_STRING2, NULL, "Custom Action 2", M_ChangeControl, gc_custom2 },
|
||||
{IT_CALL | IT_STRING2, NULL, "Custom Action 3", M_ChangeControl, gc_custom3 },
|
||||
|
||||
{IT_CALL | IT_STRING2, NULL, "Pause", M_ChangeControl, gc_pause },
|
||||
{IT_CALL | IT_STRING2, NULL, "Console", M_ChangeControl, gc_console },
|
||||
|
||||
{IT_CALL | IT_STRING2, NULL, "Talk key", M_ChangeControl, gc_talkkey },
|
||||
{IT_CALL | IT_STRING2, NULL, "Team-Talk key", M_ChangeControl, gc_teamkey },
|
||||
{IT_CALL | IT_STRING2, NULL, "Rankings/Scores", M_ChangeControl, gc_scores },
|
||||
{IT_CALL | IT_STRING2, NULL, "Spectate", M_ChangeControl, gc_spectate },
|
||||
};*/
|
||||
|
||||
static menuitem_t OP_Joystick1Menu[] =
|
||||
{
|
||||
{IT_STRING | IT_CALL, NULL, "Select Gamepad..." , M_Setup1PJoystickMenu, 10},
|
||||
|
@ -1957,28 +1915,12 @@ menu_t OP_MainDef =
|
|||
};
|
||||
|
||||
menu_t OP_ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_ControlsMenu, &OP_MainDef, 60, 30);
|
||||
//menu_t OP_ControlListDef = DEFAULTMENUSTYLE("M_CONTRO", OP_ControlListMenu, &OP_ControlsDef, 60, 30);
|
||||
menu_t OP_MoveControlsDef = CONTROLMENUSTYLE(OP_MoveControlsMenu, &OP_ControlsDef);
|
||||
//menu_t OP_MPControlsDef = CONTROLMENUSTYLE(OP_MPControlsMenu, &OP_ControlListDef);
|
||||
//menu_t OP_CameraControlsDef = CONTROLMENUSTYLE(OP_CameraControlsMenu, &OP_ControlListDef);
|
||||
//menu_t OP_MiscControlsDef = CONTROLMENUSTYLE(OP_MiscControlsMenu, &OP_ControlListDef);
|
||||
menu_t OP_CustomControlsDef = CONTROLMENUSTYLE(OP_CustomControlsMenu, &OP_MoveControlsDef);
|
||||
menu_t OP_SpectateControlsDef = CONTROLMENUSTYLE(OP_SpectateControlsMenu, &OP_MoveControlsDef);
|
||||
/*
|
||||
menu_t OP_P1ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_P1ControlsMenu, &OP_ControlsDef, 60, 30);
|
||||
menu_t OP_P2ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_P2ControlsMenu, &OP_ControlsDef, 60, 30);
|
||||
menu_t OP_AllControlsDef = CONTROLMENUSTYLE(OP_AllControlsMenu, &OP_ControlsDef);
|
||||
menu_t OP_Joystick1Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick1Menu, &OP_AllControlsDef, 60, 30);
|
||||
menu_t OP_Joystick2Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick2Menu, &OP_AllControlsDef, 60, 30);
|
||||
#ifndef NOFOURPLAYER
|
||||
menu_t OP_P3ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_P3ControlsMenu, &OP_ControlsDef, 60, 30);
|
||||
menu_t OP_P4ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_P4ControlsMenu, &OP_ControlsDef, 60, 30);
|
||||
#endif
|
||||
menu_t OP_MouseOptionsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_MouseOptionsMenu, &OP_P1ControlsDef, 60, 30);
|
||||
menu_t OP_Mouse2OptionsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_Mouse2OptionsMenu, &OP_P2ControlsDef, 60, 30);
|
||||
*/
|
||||
menu_t OP_Joystick1Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick1Menu, &OP_MoveControlsDef, 60, 30);
|
||||
menu_t OP_Joystick2Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick2Menu, &OP_MoveControlsDef, 60, 30);
|
||||
#ifndef NOFOURPLAYER
|
||||
menu_t OP_Joystick3Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick3Menu, &OP_MoveControlsDef, 60, 30);
|
||||
menu_t OP_Joystick4Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick4Menu, &OP_MoveControlsDef, 60, 30);
|
||||
menu_t OP_Joystick3Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick3Menu, &OP_AllControlsDef, 60, 30);
|
||||
menu_t OP_Joystick4Def = DEFAULTMENUSTYLE("M_CONTRO", OP_Joystick4Menu, &OP_AllControlsDef, 60, 30);
|
||||
#endif
|
||||
menu_t OP_JoystickSetDef =
|
||||
{
|
||||
|
@ -2554,7 +2496,7 @@ boolean M_Responder(event_t *ev)
|
|||
|
||||
if (ch == -1)
|
||||
return false;
|
||||
else if (ch == gamecontrol[gc_systemmenu][0]) // allow remappable ESC key
|
||||
else if (ch == gamecontrol[gc_systemmenu][0] || ch == gamecontrol[gc_systemmenu][1]) // allow remappable ESC key
|
||||
ch = KEY_ESCAPE;
|
||||
|
||||
// F-Keys
|
||||
|
@ -8479,19 +8421,28 @@ static void M_Setup1PControlsMenu(INT32 choice)
|
|||
setupcontrols = gamecontrol; // was called from main Options (for console player, then)
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Set proper gamepad options
|
||||
OP_AllControlsMenu[0].itemaction = &OP_Joystick1Def;
|
||||
|
||||
// Unhide P1-only controls
|
||||
OP_MoveControlsMenu[10].status = IT_CONTROL; // Talk
|
||||
//OP_MoveControlsMenu[11].status = IT_CONTROL; // Team-talk
|
||||
OP_MoveControlsMenu[11].status = IT_CONTROL; // Rankings
|
||||
OP_MoveControlsMenu[12].status = IT_CONTROL; // Pause
|
||||
OP_MoveControlsMenu[13].status = IT_CONTROL; // Console
|
||||
OP_MoveControlsMenu[14].itemaction = &OP_Joystick1Def; // Gamepad
|
||||
OP_AllControlsMenu[14].status = IT_CONTROL; // Chat
|
||||
//OP_AllControlsMenu[15].status = IT_CONTROL; // Team-chat
|
||||
OP_AllControlsMenu[15].status = IT_CONTROL; // Rankings
|
||||
OP_AllControlsMenu[16].status = IT_CONTROL; // Viewpoint
|
||||
// 17 is Reset Camera, 18 is Toggle Chasecam
|
||||
OP_AllControlsMenu[19].status = IT_CONTROL; // Pause
|
||||
OP_AllControlsMenu[20].status = IT_CONTROL; // Screenshot
|
||||
OP_AllControlsMenu[21].status = IT_CONTROL; // GIF
|
||||
OP_AllControlsMenu[22].status = IT_CONTROL; // System Menu
|
||||
OP_AllControlsMenu[23].status = IT_CONTROL; // Console
|
||||
OP_AllControlsMenu[24].status = IT_HEADER; // Spectator Controls header
|
||||
OP_AllControlsMenu[25].status = IT_SPACE; // Spectator Controls space
|
||||
OP_AllControlsMenu[26].status = IT_CONTROL; // Spectate
|
||||
OP_AllControlsMenu[27].status = IT_CONTROL; // Look Up
|
||||
OP_AllControlsMenu[28].status = IT_CONTROL; // Look Down
|
||||
OP_AllControlsMenu[29].status = IT_CONTROL; // Center View
|
||||
|
||||
// Set cvars
|
||||
OP_SpectateControlsMenu[6].itemaction = &cv_chasecam; // Chasecam
|
||||
OP_SpectateControlsMenu[7].itemaction = &cv_crosshair; // Crosshair
|
||||
|
||||
M_SetupNextMenu(&OP_MoveControlsDef);
|
||||
M_SetupNextMenu(&OP_AllControlsDef);
|
||||
}
|
||||
|
||||
static void M_Setup2PControlsMenu(INT32 choice)
|
||||
|
@ -8502,19 +8453,28 @@ static void M_Setup2PControlsMenu(INT32 choice)
|
|||
setupcontrols = gamecontrolbis;
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Set proper gamepad options
|
||||
OP_AllControlsMenu[0].itemaction = &OP_Joystick2Def;
|
||||
|
||||
// Hide P1-only controls
|
||||
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2; // Talk
|
||||
//OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Team-talk
|
||||
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Rankings
|
||||
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2; // Pause
|
||||
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2; // Console
|
||||
OP_MoveControlsMenu[14].itemaction = &OP_Joystick2Def; // Gamepad
|
||||
OP_AllControlsMenu[14].status = IT_GRAYEDOUT2; // Chat
|
||||
//OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Team-chat
|
||||
OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Rankings
|
||||
OP_AllControlsMenu[16].status = IT_GRAYEDOUT2; // Viewpoint
|
||||
// 17 is Reset Camera, 18 is Toggle Chasecam
|
||||
OP_AllControlsMenu[19].status = IT_GRAYEDOUT2; // Pause
|
||||
OP_AllControlsMenu[20].status = IT_GRAYEDOUT2; // Screenshot
|
||||
OP_AllControlsMenu[21].status = IT_GRAYEDOUT2; // GIF
|
||||
OP_AllControlsMenu[22].status = IT_GRAYEDOUT2; // System Menu
|
||||
OP_AllControlsMenu[23].status = IT_GRAYEDOUT2; // Console
|
||||
OP_AllControlsMenu[24].status = IT_GRAYEDOUT2; // Spectator Controls header
|
||||
OP_AllControlsMenu[25].status = IT_GRAYEDOUT2; // Spectator Controls space
|
||||
OP_AllControlsMenu[26].status = IT_GRAYEDOUT2; // Spectate
|
||||
OP_AllControlsMenu[27].status = IT_GRAYEDOUT2; // Look Up
|
||||
OP_AllControlsMenu[28].status = IT_GRAYEDOUT2; // Look Down
|
||||
OP_AllControlsMenu[29].status = IT_GRAYEDOUT2; // Center View
|
||||
|
||||
// Set cvars
|
||||
OP_SpectateControlsMenu[6].itemaction = &cv_chasecam2; // Chasecam
|
||||
OP_SpectateControlsMenu[7].itemaction = &cv_crosshair2; // Crosshair
|
||||
|
||||
M_SetupNextMenu(&OP_MoveControlsDef);
|
||||
M_SetupNextMenu(&OP_AllControlsDef);
|
||||
}
|
||||
|
||||
#ifndef NOFOURPLAYER
|
||||
|
@ -8526,19 +8486,28 @@ static void M_Setup3PControlsMenu(INT32 choice)
|
|||
setupcontrols = gamecontrol3;
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Set proper gamepad options
|
||||
OP_AllControlsMenu[0].itemaction = &OP_Joystick3Def;
|
||||
|
||||
// Hide P1-only controls
|
||||
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2; // Talk
|
||||
//OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Team-talk
|
||||
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Rankings
|
||||
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2; // Pause
|
||||
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2; // Console
|
||||
OP_MoveControlsMenu[14].itemaction = &OP_Joystick3Def; // Gamepad
|
||||
OP_AllControlsMenu[14].status = IT_GRAYEDOUT2; // Chat
|
||||
//OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Team-chat
|
||||
OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Rankings
|
||||
OP_AllControlsMenu[16].status = IT_GRAYEDOUT2; // Viewpoint
|
||||
// 17 is Reset Camera, 18 is Toggle Chasecam
|
||||
OP_AllControlsMenu[19].status = IT_GRAYEDOUT2; // Pause
|
||||
OP_AllControlsMenu[20].status = IT_GRAYEDOUT2; // Screenshot
|
||||
OP_AllControlsMenu[21].status = IT_GRAYEDOUT2; // GIF
|
||||
OP_AllControlsMenu[22].status = IT_GRAYEDOUT2; // System Menu
|
||||
OP_AllControlsMenu[23].status = IT_GRAYEDOUT2; // Console
|
||||
OP_AllControlsMenu[24].status = IT_GRAYEDOUT2; // Spectator Controls header
|
||||
OP_AllControlsMenu[25].status = IT_GRAYEDOUT2; // Spectator Controls space
|
||||
OP_AllControlsMenu[26].status = IT_GRAYEDOUT2; // Spectate
|
||||
OP_AllControlsMenu[27].status = IT_GRAYEDOUT2; // Look Up
|
||||
OP_AllControlsMenu[28].status = IT_GRAYEDOUT2; // Look Down
|
||||
OP_AllControlsMenu[29].status = IT_GRAYEDOUT2; // Center View
|
||||
|
||||
// Set cvars
|
||||
OP_SpectateControlsMenu[6].itemaction = &cv_chasecam3; // Chasecam
|
||||
OP_SpectateControlsMenu[7].itemaction = &cv_crosshair3; // Crosshair
|
||||
|
||||
M_SetupNextMenu(&OP_MoveControlsDef);
|
||||
M_SetupNextMenu(&OP_AllControlsDef);
|
||||
}
|
||||
|
||||
static void M_Setup4PControlsMenu(INT32 choice)
|
||||
|
@ -8549,82 +8518,147 @@ static void M_Setup4PControlsMenu(INT32 choice)
|
|||
setupcontrols = gamecontrol4;
|
||||
currentMenu->lastOn = itemOn;
|
||||
|
||||
// Set proper gamepad options
|
||||
OP_AllControlsMenu[0].itemaction = &OP_Joystick4Def;
|
||||
|
||||
// Hide P1-only controls
|
||||
OP_MoveControlsMenu[10].status = IT_GRAYEDOUT2; // Talk
|
||||
//OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Team-talk
|
||||
OP_MoveControlsMenu[11].status = IT_GRAYEDOUT2; // Rankings
|
||||
OP_MoveControlsMenu[12].status = IT_GRAYEDOUT2; // Pause
|
||||
OP_MoveControlsMenu[13].status = IT_GRAYEDOUT2; // Console
|
||||
OP_MoveControlsMenu[14].itemaction = &OP_Joystick4Def; // Gamepad
|
||||
OP_AllControlsMenu[14].status = IT_GRAYEDOUT2; // Chat
|
||||
//OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Team-chat
|
||||
OP_AllControlsMenu[15].status = IT_GRAYEDOUT2; // Rankings
|
||||
OP_AllControlsMenu[16].status = IT_GRAYEDOUT2; // Viewpoint
|
||||
// 17 is Reset Camera, 18 is Toggle Chasecam
|
||||
OP_AllControlsMenu[19].status = IT_GRAYEDOUT2; // Pause
|
||||
OP_AllControlsMenu[20].status = IT_GRAYEDOUT2; // Screenshot
|
||||
OP_AllControlsMenu[21].status = IT_GRAYEDOUT2; // GIF
|
||||
OP_AllControlsMenu[22].status = IT_GRAYEDOUT2; // System Menu
|
||||
OP_AllControlsMenu[23].status = IT_GRAYEDOUT2; // Console
|
||||
OP_AllControlsMenu[24].status = IT_GRAYEDOUT2; // Spectator Controls header
|
||||
OP_AllControlsMenu[25].status = IT_GRAYEDOUT2; // Spectator Controls space
|
||||
OP_AllControlsMenu[26].status = IT_GRAYEDOUT2; // Spectate
|
||||
OP_AllControlsMenu[27].status = IT_GRAYEDOUT2; // Look Up
|
||||
OP_AllControlsMenu[28].status = IT_GRAYEDOUT2; // Look Down
|
||||
OP_AllControlsMenu[29].status = IT_GRAYEDOUT2; // Center View
|
||||
|
||||
// Set cvars
|
||||
OP_SpectateControlsMenu[6].itemaction = &cv_chasecam4; // Chasecam
|
||||
OP_SpectateControlsMenu[7].itemaction = &cv_crosshair4; // Crosshair
|
||||
|
||||
M_SetupNextMenu(&OP_MoveControlsDef);
|
||||
M_SetupNextMenu(&OP_AllControlsDef);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define controlheight 18
|
||||
|
||||
// Draws the Customise Controls menu
|
||||
static void M_DrawControl(void)
|
||||
{
|
||||
char tmp[50];
|
||||
INT32 i, y;
|
||||
INT32 keys[2];
|
||||
const char *ctrl;
|
||||
|
||||
// draw title, strings and submenu
|
||||
M_DrawGenericMenu();
|
||||
|
||||
if (setupcontrols_secondaryplayer)
|
||||
ctrl = "\x86""SET ""\x82""CONTROLS""\x86"" FOR ""\x82""SECONDARY PLAYER";
|
||||
else if (setupcontrols_thirdplayer)
|
||||
ctrl = "\x86""SET ""\x82""CONTROLS""\x86"" FOR ""\x82""THIRD PLAYER";
|
||||
else if (setupcontrols_fourthplayer)
|
||||
ctrl = "\x86""SET ""\x82""CONTROLS""\x86"" FOR ""\x82""FOURTH PLAYER";
|
||||
else
|
||||
ctrl = "\x86""PRESS ""\x82""ENTER""\x86"" TO CHANGE, ""\x82""BACKSPACE""\x86"" TO CLEAR";
|
||||
|
||||
M_CentreText(28, ctrl);
|
||||
char tmp[50];
|
||||
INT32 x, y, i, max, cursory = 0, iter;
|
||||
INT32 keys[2];
|
||||
|
||||
x = currentMenu->x;
|
||||
y = currentMenu->y;
|
||||
|
||||
for (i = 0; i < currentMenu->numitems;i++)
|
||||
/*i = itemOn - (controlheight/2);
|
||||
if (i < 0)
|
||||
i = 0;
|
||||
*/
|
||||
|
||||
iter = (controlheight/2);
|
||||
for (i = itemOn; ((iter || currentMenu->menuitems[i].status == IT_GRAYEDOUT2) && i > 0); i--)
|
||||
{
|
||||
if (currentMenu->menuitems[i].status != IT_CONTROL)
|
||||
{
|
||||
y = currentMenu->y+currentMenu->menuitems[i].alphaKey;
|
||||
continue;
|
||||
}
|
||||
if (currentMenu->menuitems[i].status != IT_CONTROL)
|
||||
continue;
|
||||
if (currentMenu->menuitems[i].status != IT_GRAYEDOUT2)
|
||||
iter--;
|
||||
}
|
||||
if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
|
||||
i--;
|
||||
|
||||
keys[0] = setupcontrols[currentMenu->menuitems[i].alphaKey][0];
|
||||
keys[1] = setupcontrols[currentMenu->menuitems[i].alphaKey][1];
|
||||
iter += (controlheight/2);
|
||||
for (max = itemOn; (iter && max < currentMenu->numitems); max++)
|
||||
{
|
||||
if (currentMenu->menuitems[max].status != IT_GRAYEDOUT2)
|
||||
iter--;
|
||||
}
|
||||
|
||||
tmp[0] ='\0';
|
||||
if (keys[0] == KEY_NULL && keys[1] == KEY_NULL)
|
||||
if (iter)
|
||||
{
|
||||
iter += (controlheight/2);
|
||||
for (i = itemOn; ((iter || currentMenu->menuitems[i].status == IT_GRAYEDOUT2) && i > 0); i--)
|
||||
{
|
||||
strcpy(tmp, "---");
|
||||
if (currentMenu->menuitems[i].status != IT_GRAYEDOUT2)
|
||||
iter--;
|
||||
}
|
||||
}
|
||||
|
||||
/*max = i + controlheight;
|
||||
if (max > currentMenu->numitems)
|
||||
{
|
||||
max = currentMenu->numitems;
|
||||
if (max < controlheight)
|
||||
i = 0;
|
||||
else
|
||||
i = max - controlheight;
|
||||
}*/
|
||||
|
||||
// draw title (or big pic)
|
||||
M_DrawMenuTitle();
|
||||
|
||||
M_CentreText(28,
|
||||
(setupcontrols_fourthplayer ? "\x86""Set controls for ""\x82""Player 4" :
|
||||
(setupcontrols_thirdplayer ? "\x86""Set controls for ""\x82""Player 3" :
|
||||
(setupcontrols_secondaryplayer ? "\x86""Set controls for ""\x82""Player 2" :
|
||||
"\x86""Press ""\x82""ENTER""\x86"" to change, ""\x82""BACKSPACE""\x86"" to clear"))));
|
||||
|
||||
if (i)
|
||||
V_DrawString(currentMenu->x - 16, y-(skullAnimCounter/5), highlightflags, "\x1A"); // up arrow
|
||||
if (max != currentMenu->numitems)
|
||||
V_DrawString(currentMenu->x - 16, y+(SMALLLINEHEIGHT*(controlheight-1))+(skullAnimCounter/5), highlightflags, "\x1B"); // down arrow
|
||||
|
||||
for (; i < max; i++)
|
||||
{
|
||||
if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
|
||||
continue;
|
||||
|
||||
if (i == itemOn)
|
||||
cursory = y;
|
||||
|
||||
if (currentMenu->menuitems[i].status == IT_CONTROL)
|
||||
{
|
||||
if (keys[0] != KEY_NULL)
|
||||
strcat (tmp, G_KeynumToString (keys[0]));
|
||||
V_DrawString(x, y, ((i == itemOn) ? highlightflags : 0), currentMenu->menuitems[i].text);
|
||||
keys[0] = setupcontrols[currentMenu->menuitems[i].alphaKey][0];
|
||||
keys[1] = setupcontrols[currentMenu->menuitems[i].alphaKey][1];
|
||||
|
||||
if (keys[0] != KEY_NULL && keys[1] != KEY_NULL)
|
||||
strcat(tmp," or ");
|
||||
tmp[0] ='\0';
|
||||
if (keys[0] == KEY_NULL && keys[1] == KEY_NULL)
|
||||
{
|
||||
strcpy(tmp, "---");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (keys[0] != KEY_NULL)
|
||||
strcat (tmp, G_KeynumToString (keys[0]));
|
||||
|
||||
if (keys[1] != KEY_NULL)
|
||||
strcat (tmp, G_KeynumToString (keys[1]));
|
||||
if (keys[0] != KEY_NULL && keys[1] != KEY_NULL)
|
||||
strcat(tmp,", ");
|
||||
|
||||
if (keys[1] != KEY_NULL)
|
||||
strcat (tmp, G_KeynumToString (keys[1]));
|
||||
|
||||
}
|
||||
V_DrawRightAlignedString(BASEVIDWIDTH-currentMenu->x, y, highlightflags, tmp);
|
||||
}
|
||||
V_DrawRightAlignedString(BASEVIDWIDTH-currentMenu->x, y, highlightflags, tmp);
|
||||
/*else if (currentMenu->menuitems[i].status == IT_GRAYEDOUT2)
|
||||
V_DrawString(x, y, V_TRANSLUCENT, currentMenu->menuitems[i].text);*/
|
||||
else if ((currentMenu->menuitems[i].status == IT_HEADER) && (i != max-1))
|
||||
V_DrawString(19, y+6, highlightflags, currentMenu->menuitems[i].text);
|
||||
else if (currentMenu->menuitems[i].status & IT_STRING)
|
||||
V_DrawString(x, y, ((i == itemOn) ? highlightflags : 0), currentMenu->menuitems[i].text);
|
||||
|
||||
y += SMALLLINEHEIGHT;
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(currentMenu->x - 20, cursory, 0,
|
||||
W_CachePatchName("M_CURSOR", PU_CACHE));
|
||||
}
|
||||
|
||||
#undef controlheight
|
||||
|
||||
static INT32 controltochange;
|
||||
|
||||
static void M_ChangecontrolResponse(event_t *ev)
|
||||
|
|
|
@ -1480,9 +1480,13 @@ boolean M_ScreenshotResponder(event_t *ev)
|
|||
return false;
|
||||
|
||||
ch = ev->data1;
|
||||
if (ch == KEY_F8)
|
||||
|
||||
if (ch >= KEY_MOUSE1 && menuactive) // If it's not a keyboard key, then don't allow it in the menus!
|
||||
return false;
|
||||
|
||||
if (ch == gamecontrol[gc_screenshot][0] || ch == gamecontrol[gc_screenshot][1]) // remappable F8
|
||||
M_ScreenShot();
|
||||
else if (ch == KEY_F9)
|
||||
else if (ch == gamecontrol[gc_recordgif][0] || ch == gamecontrol[gc_recordgif][1]) // remappable F9
|
||||
((moviemode) ? M_StopMovie : M_StartMovie)();
|
||||
else
|
||||
return false;
|
||||
|
|
|
@ -8266,12 +8266,13 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
|
||||
P_SetScale(smoke, mobj->target->scale/2);
|
||||
smoke->destscale = 3*mobj->target->scale/2;
|
||||
smoke->scalespeed = FixedMul(smoke->scalespeed, mobj->target->scale);
|
||||
|
||||
smoke->momx = mobj->target->momx/2;
|
||||
smoke->momy = mobj->target->momy/2;
|
||||
smoke->momz = mobj->target->momz/2;
|
||||
|
||||
P_Thrust(smoke, mobj->target->angle+FixedAngle(P_RandomRange(135, 225)<<FRACBITS), P_RandomRange(0, 8) * mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
P_Thrust(smoke, mobj->target->angle+FixedAngle(P_RandomRange(135, 225)<<FRACBITS), P_RandomRange(0, 8) * mobj->target->scale);
|
||||
}
|
||||
break;
|
||||
case MT_SPARKLETRAIL:
|
||||
|
|
|
@ -1965,14 +1965,13 @@ static void ST_overlayDrawer(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
V_DrawString(2, BASEVIDHEIGHT-50, V_HUDTRANSHALF|V_YELLOWMAP, M_GetText("- SPECTATING -"));
|
||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF|V_YELLOWMAP, M_GetText("- SPECTATING -"));
|
||||
if (stplyr->pflags & PF_WANTSTOJOIN)
|
||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Cancel Join"));
|
||||
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("Item - Cancel Join"));
|
||||
/*else if (G_GametypeHasTeams())
|
||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Join Team"));*/
|
||||
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("Item - Join Team"));*/
|
||||
else
|
||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Join Game"));
|
||||
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("F12 - Change View"));
|
||||
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("Item - Join Game"));
|
||||
V_DrawString(2, BASEVIDHEIGHT-20, V_HUDTRANSHALF, M_GetText("Accelerate - Float"));
|
||||
V_DrawString(2, BASEVIDHEIGHT-10, V_HUDTRANSHALF, M_GetText("Brake - Sink"));
|
||||
}
|
||||
|
|
|
@ -820,6 +820,10 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
|||
else if (!(c & V_SNAPTOTOP))
|
||||
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
|
||||
}
|
||||
if (c & V_SPLITSCREEN)
|
||||
y += (BASEVIDHEIGHT * dupy)/2;
|
||||
if (c & V_HORZSCREEN)
|
||||
x += (BASEVIDWIDTH * dupx)/2;
|
||||
}
|
||||
|
||||
if (x >= vid.width || y >= vid.height)
|
||||
|
@ -901,6 +905,10 @@ void V_DrawDiag(INT32 x, INT32 y, INT32 wh, INT32 c)
|
|||
else if (!(c & V_SNAPTOTOP))
|
||||
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
|
||||
}
|
||||
if (c & V_SPLITSCREEN)
|
||||
y += (BASEVIDHEIGHT * dupy)/2;
|
||||
if (c & V_HORZSCREEN)
|
||||
x += (BASEVIDWIDTH * dupx)/2;
|
||||
}
|
||||
|
||||
if (x >= vid.width || y >= vid.height)
|
||||
|
|
Loading…
Reference in a new issue