diff --git a/src/d_main.c b/src/d_main.c index 15e11b0d..89210a17 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -296,15 +296,15 @@ static void D_Display(void) { // set for all later wipedefindex = gamestate; // wipe_xxx_toblack - if (gamestate == GS_INTERMISSION) + if (gamestate == GS_TITLESCREEN && wipegamestate != GS_INTRO) + wipedefindex = wipe_multinter_toblack; + else if (gamestate == GS_INTERMISSION) { if (intertype == int_spec) // Special Stage wipedefindex = wipe_specinter_toblack; else //if (intertype != int_coop) // Multiplayer wipedefindex = wipe_multinter_toblack; } - else if (gamestate == GS_VOTING) - wipedefindex = wipe_multinter_toblack; if (rendermode != render_none) { @@ -385,6 +385,8 @@ static void D_Display(void) case GS_TITLESCREEN: F_TitleScreenDrawer(); + if (wipe) + wipedefindex = wipe_titlescreen_toblack; break; case GS_WAITINGPLAYERS: diff --git a/src/d_netcmd.c b/src/d_netcmd.c index f616c625..2db1ad04 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -2241,6 +2241,9 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum) emeralds = 0; } + if (modeattacking) // i remember moving this here in internal fixed a heisenbug so + SetPlayerSkinByNum(0, cv_chooseskin.value-1); + #ifdef HAVE_BLUA LUAh_MapChange(); #endif @@ -2252,15 +2255,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum) if (timingdemo) G_DoneLevelLoad(); - if (modeattacking) - { - SetPlayerSkinByNum(0, cv_chooseskin.value-1); - players[0].skincolor = cv_playercolor.value; // srb2kart - - // a copy of color - if (players[0].mo) - players[0].mo->color = players[0].skincolor; - } if (metalrecording) G_BeginMetal(); if (demorecording) // Okay, level loaded, character spawned and skinned, diff --git a/src/dehacked.c b/src/dehacked.c index b9ee42ab..1214f299 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -3182,6 +3182,14 @@ static void readwipes(MYFILE *f) else if (fastcmp(pword, "FINAL")) wipeoffset = wipe_specinter_final; } + else if (fastncmp(word, "VOTING_", 10)) + { + pword = word + 10; + if (fastcmp(pword, "TOBLACK")) + wipeoffset = wipe_specinter_toblack; + else if (fastcmp(pword, "FINAL")) + wipeoffset = wipe_specinter_final; + } else if (fastncmp(word, "MULTINTER_", 10)) { pword = word + 10; diff --git a/src/f_finale.c b/src/f_finale.c index 3ea2e0bf..6e84bd70 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -528,6 +528,7 @@ static const char *credits[] = { "\"Nev3r\"", "\"Ritz\"", "\"Spherallic\"", + "\"DirkTheHusky\"", "", "\1Produced By", "Kart Krew", diff --git a/src/f_finale.h b/src/f_finale.h index 4e16e0ed..46375b6e 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -82,6 +82,7 @@ enum wipe_level_toblack, wipe_intermission_toblack, + wipe_voting_toblack, wipe_continuing_toblack, wipe_titlescreen_toblack, wipe_timeattack_toblack, @@ -98,6 +99,7 @@ enum wipe_level_final, wipe_intermission_final, + wipe_voting_final, wipe_continuing_final, wipe_titlescreen_final, wipe_timeattack_final, @@ -111,9 +113,10 @@ enum wipe_specinter_final, wipe_multinter_final, - NUMWIPEDEFS + NUMWIPEDEFS, + WIPEFINALSHIFT = wipe_level_final - wipe_level_toblack }; -#define WIPEFINALSHIFT 13 + extern UINT8 wipedefs[NUMWIPEDEFS]; #endif diff --git a/src/f_wipe.c b/src/f_wipe.c index ed5736cb..8f3c2605 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -47,6 +47,7 @@ UINT8 wipedefs[NUMWIPEDEFS] = { 0, // wipe_level_toblack UINT8_MAX, // wipe_intermission_toblack + 0, // wipe_voting_toblack, UINT8_MAX, // wipe_continuing_toblack 3, // wipe_titlescreen_toblack 0, // wipe_timeattack_toblack @@ -62,6 +63,7 @@ UINT8 wipedefs[NUMWIPEDEFS] = { 0, // wipe_level_final 0, // wipe_intermission_final + 0, // wipe_voting_final 0, // wipe_continuing_final 3, // wipe_titlescreen_final 0, // wipe_timeattack_final diff --git a/src/k_kart.c b/src/k_kart.c index 90e5c45f..8d4d075d 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -138,7 +138,7 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_INDIGO,8, // 26 // SKINCOLOR_YELLOW SKINCOLOR_INDIGO,8, // 27 // SKINCOLOR_CANARY SKINCOLOR_BROWN,8, // 28 // SKINCOLOR_PEACH - SKINCOLOR_BLUEBERRY,8, // 29 // SKINCOLOR_CREAMSICLE + SKINCOLOR_BLUEBERRY,8, // 29 // SKINCOLOR_CREAMSICLE SKINCOLOR_LAVENDER,8, // 30 // SKINCOLOR_GOLD SKINCOLOR_BEIGE,8, // 31 // SKINCOLOR_CARAMEL SKINCOLOR_PURPLE,8, // 32 // SKINCOLOR_VOMIT @@ -246,7 +246,7 @@ UINT8 colortranslations[MAXSKINCOLORS][16] = { {224, 225, 226, 228, 229, 231, 232, 234, 235, 237, 238, 240, 241, 243, 244, 246}, // SKINCOLOR_SAPPHIRE, removed for other colors {160, 160, 160, 184, 184, 184, 185, 185, 185, 186, 187, 187, 188, 188, 189, 190}, // SKINCOLOR_JADE, removed for other colors {224, 225, 226, 212, 213, 213, 214, 215, 220, 221, 172, 222, 173, 223, 174, 175}, // SKINCOLOR_FROST, merged into Aqua - { 72, 73, 74, 75, 76, 77, 78, 79, 48, 49, 50, 51, 52, 53, 54, 55}, // SKINCOLOR_CARAMEL, new Caramel was previously Shiny Caramel + { 72, 73, 74, 75, 76, 77, 78, 79, 48, 49, 50, 51, 52, 53, 54, 55}, // SKINCOLOR_CARAMEL, new Caramel was previously Shiny Caramel { 1, 145, 125, 73, 83, 114, 106, 180, 187, 168, 219, 205, 236, 206, 199, 255}, // SKINCOLOR_RAINBOW, is Vomit 2.0 */ }; @@ -851,7 +851,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (pingame == 1 && oddsvalid[0]) // Record Attack, or just alone useodds = 0; else if (pdis <= 0) // (64*14) * 0 = 0 - useodds = disttable[0]; + useodds = disttable[0]; else if (pdis > distvar * ((12 * distlen) / 14)) // (64*14) * 12 = 10752 useodds = disttable[distlen-1]; else @@ -1241,6 +1241,26 @@ void K_KartMoveAnimation(player_t *player) } } +static void K_TauntVoiceTimers(player_t *player) +{ + if (!player) + return; + + player->kartstuff[k_tauntvoices] = 6*TICRATE; + player->kartstuff[k_voices] = 4*TICRATE; +} + +static void K_RegularVoiceTimers(player_t *player) +{ + if (!player) + return; + + player->kartstuff[k_voices] = 4*TICRATE; + + if (player->kartstuff[k_tauntvoices] < 4*TICRATE) + player->kartstuff[k_tauntvoices] = 4*TICRATE; +} + static void K_PlayTauntSound(mobj_t *source) { if (source->player && source->player->kartstuff[k_tauntvoices]) // Prevents taunt sounds from playing every time the button is pressed @@ -1248,11 +1268,7 @@ static void K_PlayTauntSound(mobj_t *source) S_StartSound(source, sfx_taunt1+P_RandomKey(4)); - if (source->player) - { - source->player->kartstuff[k_tauntvoices] = 6*TICRATE; - source->player->kartstuff[k_voices] = 3*TICRATE; - } + K_TauntVoiceTimers(source->player); } static void K_PlayOvertakeSound(mobj_t *source) @@ -1269,26 +1285,14 @@ static void K_PlayOvertakeSound(mobj_t *source) S_StartSound(source, sfx_slow); - if (source->player) - { - source->player->kartstuff[k_voices] = 3*TICRATE; - - if (source->player->kartstuff[k_tauntvoices] < 3*TICRATE) - source->player->kartstuff[k_tauntvoices] = 3*TICRATE; - } + K_RegularVoiceTimers(source->player); } static void K_PlayHitEmSound(mobj_t *source) { S_StartSound(source, sfx_hitem); - if (source->player) - { - source->player->kartstuff[k_voices] = 3*TICRATE; - - if (source->player->kartstuff[k_tauntvoices] < 3*TICRATE) - source->player->kartstuff[k_tauntvoices] = 3*TICRATE; - } + K_RegularVoiceTimers(source->player); } void K_MomentumToFacing(player_t *player) @@ -2142,7 +2146,7 @@ static mobj_t *K_FindLastTrailMobj(player_t *player) if (!player || !(trail = player->mo) || !player->mo->hnext || !player->mo->hnext->health) return NULL; - + while (trail->hnext && !P_MobjWasRemoved(trail->hnext) && trail->hnext->health) { trail = trail->hnext; @@ -3273,8 +3277,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (!player->exiting) { - if (player->kartstuff[k_oldposition] <= player->kartstuff[k_position]) // But first, if you lost a place, + if (player->kartstuff[k_oldposition] < player->kartstuff[k_position]) // But first, if you lost a place, + { player->kartstuff[k_oldposition] = player->kartstuff[k_position]; // then the other player taunts. + K_RegularVoiceTimers(player); // and you can't for a bit + } else if (player->kartstuff[k_oldposition] > player->kartstuff[k_position]) // Otherwise, { K_PlayOvertakeSound(player->mo); // Say "YOU'RE TOO SLOW!" @@ -3792,7 +3799,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) // Start charging once you're given the opportunity. if (leveltime >= starttime-(2*TICRATE) && leveltime <= starttime) - { + { if (cmd->buttons & BT_ACCELERATE) player->kartstuff[k_boostcharge]++; else @@ -3815,7 +3822,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (player->kartstuff[k_sneakertimer] >= 70) S_StartSound(player->mo, sfx_s25f); // Special sound for the perfect start boost! else if (player->kartstuff[k_sneakertimer] >= sneakertime) - S_StartSound(player->mo, sfx_cdfm01); // Sneaker boost sound for big boost + S_StartSound(player->mo, sfx_cdfm01); // Sneaker boost sound for big boost else S_StartSound(player->mo, sfx_s23c); // Drift boost sound for small boost } @@ -4499,7 +4506,7 @@ static void K_drawKartItem(void) { V_DrawScaledPatch(ITEM_X+28, ITEM_Y+41, V_HUDTRANS|splitflags, kp_itemx); V_DrawKartString(ITEM_X+38, ITEM_Y+36, V_HUDTRANS|splitflags, va("%d", stplyr->kartstuff[k_itemamount])); - } + } } else V_DrawScaledPatch(ITEM_X, ITEM_Y, V_HUDTRANS|splitflags, localpatch); diff --git a/src/m_menu.c b/src/m_menu.c index 0000fa55..57f535e7 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -241,6 +241,7 @@ menu_t MISC_ScrambleTeamDef, MISC_ChangeTeamDef; // Single Player //static void M_LoadGame(INT32 choice); static void M_TimeAttack(INT32 choice); +static boolean M_QuitTimeAttackMenu(void); //static void M_NightsAttack(INT32 choice); static void M_Statistics(INT32 choice); static void M_HandleStaffReplay(INT32 choice); @@ -1684,7 +1685,7 @@ static menu_t SP_TimeAttackDef = M_DrawTimeAttackMenu, 34, 40, 0, - NULL + M_QuitTimeAttackMenu }; static menu_t SP_ReplayDef = { @@ -3784,20 +3785,21 @@ static void M_PatchSkinNameTable(void) if (skins[j].name[0] != '\0') { skins_cons_t[j].strvalue = skins[j].name; - skins_cons_t[j].value = j+1; + skins_cons_t[j].value = j; } else { skins_cons_t[j].strvalue = NULL; skins_cons_t[j].value = 0; + break; } } - CV_SetValue(&cv_chooseskin, cv_chooseskin.value); // This causes crash sometimes?! + j = R_SkinAvailable(cv_skin.string); + if (j == -1) + j = 0; - CV_SetValue(&cv_chooseskin, 1); - CV_AddValue(&cv_chooseskin, -1); - CV_AddValue(&cv_chooseskin, 1); + CV_SetValue(&cv_chooseskin, j+1); // This causes crash sometimes?! return; } @@ -3831,7 +3833,7 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt) { case LLM_CREATESERVER: // Should the map be hidden? - if (mapheaderinfo[mapnum]->menuflags & LF2_HIDEINMENU) + if (mapheaderinfo[mapnum]->menuflags & LF2_HIDEINMENU && mapnum+1 != gamemap) return false; if (M_MapLocked(mapnum+1)) @@ -5848,6 +5850,13 @@ static void M_TimeAttack(INT32 choice) S_ChangeMusicInternal("racent", true); } +static boolean M_QuitTimeAttackMenu(void) +{ + // you know what? always putting these in the buffer won't hurt anything. + COM_BufAddText(va("skin \"%s\"\n", cv_chooseskin.string)); + return true; +} + // Drawing function for Nights Attack /*void M_DrawNightsAttackMenu(void) { diff --git a/src/null b/src/null deleted file mode 100644 index 6fe99727..00000000 --- a/src/null +++ /dev/null @@ -1 +0,0 @@ -Press any key to continue . . . diff --git a/src/y_inter.c b/src/y_inter.c index 4593e657..d46f1351 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -2253,7 +2253,7 @@ void Y_VoteDrawer(void) if (!timer && i == voteclient.ranim) { V_DrawScaledPatch(x-18, y+9, V_SNAPTOLEFT, cursor); - if (!(votetic % 4)) + if (voteendtic != -1 && !(votetic % 4)) V_DrawFill(x-1, y-1, 42, 27, 120|V_SNAPTOLEFT); else V_DrawFill(x-1, y-1, 42, 27, levelinfo[votes[i]].gtc|V_SNAPTOLEFT);