From f50ecc0dcd3562674a7a794d905c363df4e827f5 Mon Sep 17 00:00:00 2001 From: ZTsukei Date: Sun, 26 Feb 2017 17:37:52 -0500 Subject: [PATCH] Most items work (netgame needs testing), will do fireballs later. --- src/android/i_main.c | 4 +- src/android/i_system.c | 2 +- src/console.c | 2 +- src/d_clisrv.c | 2 +- src/dehacked.c | 2 +- src/doomdef.h | 14 +++--- src/g_game.c | 8 +-- src/hardware/r_minigl/r_minigl.c | 2 +- src/hardware/r_opengl/r_opengl.h | 2 +- src/hardware/s_fmod/s_fmod.c | 2 +- src/info.c | 85 +++++++++++++++++++++----------- src/info.h | 1 + src/k_kart.c | 32 +++++++----- src/m_menu.c | 2 +- src/m_misc.c | 6 +-- src/mserv.c | 2 +- src/p_enemy.c | 9 ++-- src/p_inter.c | 2 +- src/p_mobj.c | 75 +++++++++++++++++++++++++--- src/p_user.c | 4 +- src/sdl/i_system.c | 8 +-- src/sdl/i_video.c | 2 +- src/sdl/sdl_sound.c | 2 +- src/sdl12/i_system.c | 4 +- src/win32/win_net.c | 2 +- src/win32/win_sys.c | 6 +-- src/win32ce/win_main.c | 2 +- 27 files changed, 191 insertions(+), 93 deletions(-) diff --git a/src/android/i_main.c b/src/android/i_main.c index 7595668c..8696f3fc 100644 --- a/src/android/i_main.c +++ b/src/android/i_main.c @@ -12,12 +12,12 @@ int srb2_main() { // startup SRB2 - CONS_Printf ("Setting up SRB2 (fo' real)..."); + CONS_Printf ("Setting up SRB2Kart (fo' real)..."); D_SRB2Main(); CONS_Printf ("Entering main game loop..."); // never return D_SRB2Loop(); - LOGD("Control left SRB2. Good bye."); + LOGD("Control left SRB2Kart. Good bye."); // return to OS return 0; diff --git a/src/android/i_system.c b/src/android/i_system.c index 58fca7c1..222f89f4 100644 --- a/src/android/i_system.c +++ b/src/android/i_system.c @@ -106,7 +106,7 @@ ticcmd_t *I_BaseTiccmd2(void) void I_Quit(void) { - LOGD("SRB2 quitting!"); + LOGD("SRB2Kart quitting!"); exit(0); } diff --git a/src/console.c b/src/console.c index 70f8ab6f..42970d92 100644 --- a/src/console.c +++ b/src/console.c @@ -1314,7 +1314,7 @@ void CONS_Error(const char *msg) #ifdef RPC_NO_WINDOWS_H if (!graphics_started) { - MessageBoxA(vid.WndParent, msg, "SRB2 Warning", MB_OK); + MessageBoxA(vid.WndParent, msg, "SRB2Kart Warning", MB_OK); return; } #endif diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 99839ab0..64a8c228 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1783,7 +1783,7 @@ static boolean CL_ServerConnectionSearchTicker(boolean viams, tic_t *asksent) "modified the game in some way, and\n" "your file list does not match\n" "the server's file list.\n" - "Please restart SRB2 before connecting.\n\n" + "Please restart SRB2Kart before connecting.\n\n" "Press ESC\n" ), NULL, MM_NOTHING); return false; diff --git a/src/dehacked.c b/src/dehacked.c index da2ba330..f3095205 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -3617,7 +3617,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, UINT16 wad) { INT32 ver = searchvalue(strtok(NULL, "\n")); if (ver != PATCHVERSION) - deh_warning("Patch is for SRB2 version %d,\nonly version %d is supported", ver, PATCHVERSION); + deh_warning("Patch is for SRB2Kart version %d,\nonly version %d is supported", ver, PATCHVERSION); //DEH_WriteUndoline(word, va("%d", ver), UNDO_NONE); } // Clear all data in certain locations (mostly for unlocks) diff --git a/src/doomdef.h b/src/doomdef.h index 4fa110d3..3206856b 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -142,17 +142,17 @@ extern FILE *logstream; #define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3 #ifdef DEVELOP -#define VERSION 101 // Game version -#define SUBVERSION 4 // more precise version number +#define VERSION 102 // Game version +#define SUBVERSION 0 // more precise version number #define VERSIONSTRING "Development EXE" -#define VERSIONSTRINGW "v1.1.04" +#define VERSIONSTRINGW "v1.2.00" // most interface strings are ignored in development mode. // we use comprevision and compbranch instead. #else -#define VERSION 101 // Game version -#define SUBVERSION 4 // more precise version number -#define VERSIONSTRING "DevEXE v1.1.04" -#define VERSIONSTRINGW L"v1.1.04" +#define VERSION 102 // Game version +#define SUBVERSION 0 // more precise version number +#define VERSIONSTRING "DevEXE v1.2.00" +#define VERSIONSTRINGW L"v1.2.00" // Hey! If you change this, add 1 to the MODVERSION below! // Otherwise we can't force updates! #endif diff --git a/src/g_game.c b/src/g_game.c index 037c94d5..95462446 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3188,7 +3188,7 @@ void G_LoadGameData(void) // Version check if (READUINT32(save_p) != 0xFCAFE211) { - const char *gdfolder = "the SRB2 folder"; + const char *gdfolder = "the SRB2Kart folder"; if (strcmp(srb2home,".")) gdfolder = srb2home; @@ -3298,7 +3298,7 @@ void G_LoadGameData(void) // Landing point for corrupt gamedata datacorrupt: { - const char *gdfolder = "the SRB2 folder"; + const char *gdfolder = "the SRB2Kart folder"; if (strcmp(srb2home,".")) gdfolder = srb2home; @@ -5106,7 +5106,7 @@ void G_DoPlayDemo(char *defdemoname) demoplayback = true; if (memcmp(demo_p, DEMOHEADER, 12)) { - snprintf(msg, 1024, M_GetText("%s is not a SRB2 replay file.\n"), pdemoname); + snprintf(msg, 1024, M_GetText("%s is not a SRB2Kart replay file.\n"), pdemoname); CONS_Alert(CONS_ERROR, "%s", msg); M_StartMessage(msg, NULL, MM_NOTHING); Z_Free(pdemoname); @@ -5342,7 +5342,7 @@ void G_AddGhost(char *defdemoname) // read demo header if (memcmp(p, DEMOHEADER, 12)) { - CONS_Alert(CONS_NOTICE, M_GetText("Ghost %s: Not a SRB2 replay.\n"), pdemoname); + CONS_Alert(CONS_NOTICE, M_GetText("Ghost %s: Not a SRB2Kart replay.\n"), pdemoname); Z_Free(pdemoname); Z_Free(buffer); return; diff --git a/src/hardware/r_minigl/r_minigl.c b/src/hardware/r_minigl/r_minigl.c index b2482a55..db6608e4 100644 --- a/src/hardware/r_minigl/r_minigl.c +++ b/src/hardware/r_minigl/r_minigl.c @@ -23,7 +23,7 @@ // tell r_opengl.cpp to compile for ATI Rage Pro OpenGL driver //#define ATI_RAGE_PRO_COMPATIBILITY -#define DRIVER_STRING "HWRAPI Init(): SRB2 MiniGL renderer" +#define DRIVER_STRING "HWRAPI Init(): SRB2Kart MiniGL renderer" // Include this at end #include "../r_opengl/r_opengl.c" diff --git a/src/hardware/r_opengl/r_opengl.h b/src/hardware/r_opengl/r_opengl.h index 6a2eba1d..483ec171 100644 --- a/src/hardware/r_opengl/r_opengl.h +++ b/src/hardware/r_opengl/r_opengl.h @@ -74,7 +74,7 @@ extern FILE *gllogstream; #ifndef DRIVER_STRING // #define USE_PALETTED_TEXTURE -#define DRIVER_STRING "HWRAPI Init(): SRB2 OpenGL renderer" // Tails +#define DRIVER_STRING "HWRAPI Init(): SRB2Kart OpenGL renderer" // Tails #endif // ========================================================================== diff --git a/src/hardware/s_fmod/s_fmod.c b/src/hardware/s_fmod/s_fmod.c index 120d6354..9dd1cacb 100644 --- a/src/hardware/s_fmod/s_fmod.c +++ b/src/hardware/s_fmod/s_fmod.c @@ -443,7 +443,7 @@ EXPORT INT32 HWRAPI(Startup) (I_Error_t FatalErrorFunction, snddev_t *snd_dev) return inited; } else - DBG_Printf("S_FMOD Init(): FMOD_SOUND driver for SRB2 %s\n",VERSIONSTRING); + DBG_Printf("S_FMOD Init(): FMOD_SOUND driver for SRB2Kart %s\n",VERSIONSTRING); if (!FSOUND_SetMinHardwareChannels(STATIC_SOURCES_NUM*4)) DBG_Printf("FMOD(Startup,FSOUND_SetMinHardwareChannels,# of Channels Min: %i): %s\n",STATIC_SOURCES_NUM*4, FMOD_ErrorString(FSOUND_GetError())); diff --git a/src/info.c b/src/info.c index 61e0463f..9f99d060 100644 --- a/src/info.c +++ b/src/info.c @@ -2618,14 +2618,14 @@ state_t states[NUMSTATES] = {SPR_BANA, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BANANAITEM {SPR_DBAN, 0, 175, {NULL}, 0, 0, S_NULL}, // S_DEADBANANA - {SPR_GSHE, 0, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEGREENSHIELD2}, // S_TRIPLEGREENSHIELD1 - {SPR_GSHE, 1, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEGREENSHIELD3}, // S_TRIPLEGREENSHIELD2 - {SPR_GSHE, 2, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEGREENSHIELD4}, // S_TRIPLEGREENSHIELD3 - {SPR_GSHE, 3, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEGREENSHIELD5}, // S_TRIPLEGREENSHIELD4 - {SPR_GSHE, 4, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEGREENSHIELD6}, // S_TRIPLEGREENSHIELD5 - {SPR_GSHE, 5, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEGREENSHIELD7}, // S_TRIPLEGREENSHIELD6 - {SPR_GSHE, 6, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEGREENSHIELD8}, // S_TRIPLEGREENSHIELD7 - {SPR_GSHE, 7, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEGREENSHIELD1}, // S_TRIPLEGREENSHIELD8 + {SPR_GSHE, 0, 2, {NULL}, 0, 0, S_TRIPLEGREENSHIELD2}, // S_TRIPLEGREENSHIELD1 + {SPR_GSHE, 1, 2, {NULL}, 0, 0, S_TRIPLEGREENSHIELD3}, // S_TRIPLEGREENSHIELD2 + {SPR_GSHE, 2, 2, {NULL}, 0, 0, S_TRIPLEGREENSHIELD4}, // S_TRIPLEGREENSHIELD3 + {SPR_GSHE, 3, 2, {NULL}, 0, 0, S_TRIPLEGREENSHIELD5}, // S_TRIPLEGREENSHIELD4 + {SPR_GSHE, 4, 2, {NULL}, 0, 0, S_TRIPLEGREENSHIELD6}, // S_TRIPLEGREENSHIELD5 + {SPR_GSHE, 5, 2, {NULL}, 0, 0, S_TRIPLEGREENSHIELD7}, // S_TRIPLEGREENSHIELD6 + {SPR_GSHE, 6, 2, {NULL}, 0, 0, S_TRIPLEGREENSHIELD8}, // S_TRIPLEGREENSHIELD7 + {SPR_GSHE, 7, 2, {NULL}, 0, 0, S_TRIPLEGREENSHIELD1}, // S_TRIPLEGREENSHIELD8 {SPR_GSHE, 0, 2, {NULL}, 0, 0, S_GREENSHIELD2}, // S_GREENSHIELD1 {SPR_GSHE, 1, 2, {NULL}, 0, 0, S_GREENSHIELD3}, // S_GREENSHIELD2 {SPR_GSHE, 2, 2, {NULL}, 0, 0, S_GREENSHIELD4}, // S_GREENSHIELD3 @@ -2653,14 +2653,14 @@ state_t states[NUMSTATES] = {SPR_GSTR, 8, 1, {NULL}, 0, 0, S_NULL}, // S_GREENTRAIL9 {SPR_DGSH, 0, 175, {NULL}, 0, 0, S_NULL}, // S_DEADGREEN - {SPR_RSHE, 0, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEREDSHIELD2}, // S_TRIPLEREDSHIELD1 - {SPR_RSHE, 1, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEREDSHIELD3}, // S_TRIPLEREDSHIELD2 - {SPR_RSHE, 2, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEREDSHIELD4}, // S_TRIPLEREDSHIELD3 - {SPR_RSHE, 3, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEREDSHIELD5}, // S_TRIPLEREDSHIELD4 - {SPR_RSHE, 4, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEREDSHIELD6}, // S_TRIPLEREDSHIELD5 - {SPR_RSHE, 5, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEREDSHIELD7}, // S_TRIPLEREDSHIELD6 - {SPR_RSHE, 6, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEREDSHIELD8}, // S_TRIPLEREDSHIELD7 - {SPR_RSHE, 7, 2, {A_RotateSpikeBall}, 0, 0, S_TRIPLEREDSHIELD1}, // S_TRIPLEREDSHIELD8 + {SPR_RSHE, 0, 2, {NULL}, 0, 0, S_TRIPLEREDSHIELD2}, // S_TRIPLEREDSHIELD1 + {SPR_RSHE, 1, 2, {NULL}, 0, 0, S_TRIPLEREDSHIELD3}, // S_TRIPLEREDSHIELD2 + {SPR_RSHE, 2, 2, {NULL}, 0, 0, S_TRIPLEREDSHIELD4}, // S_TRIPLEREDSHIELD3 + {SPR_RSHE, 3, 2, {NULL}, 0, 0, S_TRIPLEREDSHIELD5}, // S_TRIPLEREDSHIELD4 + {SPR_RSHE, 4, 2, {NULL}, 0, 0, S_TRIPLEREDSHIELD6}, // S_TRIPLEREDSHIELD5 + {SPR_RSHE, 5, 2, {NULL}, 0, 0, S_TRIPLEREDSHIELD7}, // S_TRIPLEREDSHIELD6 + {SPR_RSHE, 6, 2, {NULL}, 0, 0, S_TRIPLEREDSHIELD8}, // S_TRIPLEREDSHIELD7 + {SPR_RSHE, 7, 2, {NULL}, 0, 0, S_TRIPLEREDSHIELD1}, // S_TRIPLEREDSHIELD8 {SPR_RSHE, 0, 2, {NULL}, 0, 0, S_REDSHIELD2}, // S_REDSHIELD1 {SPR_RSHE, 1, 2, {NULL}, 0, 0, S_REDSHIELD3}, // S_REDSHIELD2 {SPR_RSHE, 2, 2, {NULL}, 0, 0, S_REDSHIELD4}, // S_REDSHIELD3 @@ -2699,12 +2699,12 @@ state_t states[NUMSTATES] = {SPR_BLIG, 1, 2, {NULL}, 0, 0, S_BLUELIGHTNING3}, // S_BLUELIGHTNING2 {SPR_BLIG, 2, 2, {NULL}, 0, 0, S_BLUELIGHTNING4}, // S_BLUELIGHTNING3 {SPR_BLIG, 3, 2, {NULL}, 0, 0, S_NULL}, // S_BLUELIGHTNING4 - {SPR_NULL, 0, 1, {A_BobombExplode}, MT_BLUEEXPLOSION, 0, S_NULL}, // S_BLUEEXPLODE + {SPR_BOMB, 0, 1, {A_BobombExplode}, MT_BLUEEXPLOSION, 0, S_NULL}, // S_BLUEEXPLODE {SPR_LIGH, 0, 2, {NULL}, 0, 0, S_LIGHTNING2}, // S_LIGHTNING1 - {SPR_LIGH, 0, 2, {NULL}, 0, 0, S_LIGHTNING3}, // S_LIGHTNING2 - {SPR_LIGH, 0, 2, {NULL}, 0, 0, S_LIGHTNING4}, // S_LIGHTNING3 - {SPR_LIGH, 0, 2, {NULL}, 0, 0, S_NULL}, // S_LIGHTNING4 + {SPR_LIGH, 1, 2, {NULL}, 0, 0, S_LIGHTNING3}, // S_LIGHTNING2 + {SPR_LIGH, 2, 2, {NULL}, 0, 0, S_LIGHTNING4}, // S_LIGHTNING3 + {SPR_LIGH, 3, 2, {NULL}, 0, 0, S_NULL}, // S_LIGHTNING4 {SPR_SINK, 0, 4, {A_SmokeTrailer}, MT_SINKTRAIL, 0, S_SINK}, // S_SINK {SPR_SITR, 0, 1, {NULL}, 0, 0, S_SINKTRAIL2}, // S_SINKTRAIL1 @@ -14841,6 +14841,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, + { // MT_BOMBEXPLOSIONSOUND + -1, // doomednum + S_INVISIBLE, // spawnstate + 100, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 0, // speed + 16*FRACUNIT, // radius + 16*FRACUNIT, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY, // flags + S_NULL // raisestate + }, + { // MT_BLUELIGHTNING -1, // doomednum S_BLUELIGHTNING1, // spawnstate @@ -14870,8 +14897,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = { // MT_BLUEEXPLOSION -1, // doomednum - S_BLUEEXPLODE, // spawnstate - 1000, // spawnhealth + S_INVISIBLE, // spawnstate + 1, // spawnhealth S_NULL, // seestate sfx_None, // seesound 8, // reactiontime @@ -14881,17 +14908,17 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = sfx_None, // painsound S_NULL, // meleestate S_NULL, // missilestate - S_NULL, // deathstate + S_BOMBEXPLODE, // deathstate S_NULL, // xdeathstate sfx_None, // deathsound - 8, // speed - 64*FRACUNIT, // radius - 64*FRACUNIT, // height + 0, // speed + 16*FRACUNIT, // radius + 24*FRACUNIT, // height 0, // display offset - 16, // mass - 0, // damage + 100, // mass + 1, // damage sfx_None, // activesound - MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY|MF_RUNSPAWNFUNC, // flags + MF_BOUNCE|MF_FLOAT|MF_NOCLIPTHING|MF_MISSILE|MF_SHOOTABLE, // flags S_NULL // raisestate }, diff --git a/src/info.h b/src/info.h index 70c4cb14..985ea840 100644 --- a/src/info.h +++ b/src/info.h @@ -3781,6 +3781,7 @@ typedef enum mobj_type MT_BOMBSHIELD, // Bob-omb stuff MT_BOMBITEM, MT_BOMBEXPLOSION, + MT_BOMBEXPLOSIONSOUND, MT_BLUELIGHTNING, // Lightning stuff MT_BLUEEXPLOSION, diff --git a/src/k_kart.c b/src/k_kart.c index fc7049d1..d5693f2a 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -313,13 +313,13 @@ static fixed_t K_KartItemOdds_Retro[MAXPLAYERS][NUMKARTITEMS][MAXPLAYERS] = { //1st // { 0 }, // Magnet { 0 }, // Boo - { 0 }, // Mushroom + { 40 }, // Mushroom { 0 }, // Triple Mushroom { 0 }, // Mega Mushroom { 0 }, // Gold Mushroom { 0 }, // Star { 0 }, // Triple Banana - { 40 }, // Fake Item + { 0 }, // Fake Item { 0 }, // Banana { 0 }, // Green Shell { 0 }, // Red Shell @@ -844,7 +844,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (cv_triplegreenshell.value) K_KartSetItemResult(ppos, 13); // Triple Green Shell if (cv_bobomb.value) K_KartSetItemResult(ppos, 14); // Bob-omb if (cv_blueshell.value && pexiting == 0) K_KartSetItemResult(ppos, 15); // Blue Shell - if (cv_fireflower.value) K_KartSetItemResult(ppos, 16); // Fire Flower + //if (cv_fireflower.value) K_KartSetItemResult(ppos, 16); // Fire Flower if (cv_tripleredshell.value) K_KartSetItemResult(ppos, 17); // Triple Red Shell if (cv_lightning.value && pingame > pexiting) K_KartSetItemResult(ppos, 18); // Lightning @@ -1097,12 +1097,7 @@ fixed_t K_GetKartBoostPower(player_t *player, boolean speedonly) if (player->kartstuff[k_growshrinktimer] < -1 && speedonly) { // Shrink - boostvalue += 6; // 6/8 speed (*0.750) - numboosts++; - } - if (player->kartstuff[k_squishedtimer] > 0 && speedonly) - { // Squished - boostvalue += 7; // 7/8 speed (*0.875) + boostvalue += 16; // This is basically speed x2 due to friction and being smaller. Really translates to about 80%. numboosts++; } if (player->kartstuff[k_growshrinktimer] > 1 @@ -1759,24 +1754,35 @@ void K_DoMushroom(player_t *player, boolean doPFlag) void K_DoLightning(player_t *player, boolean bluelightning) { + mobj_t *mo; + thinker_t *think; INT32 i; S_StartSound(player->mo, sfx_bkpoof); // Sound the BANG! - K_PlayTauntSound(player->mo); player->pflags |= PF_ATTACKDOWN; for (i = 0; i < MAXPLAYERS; i++) { if (playeringame[i]) P_FlashPal(&players[i], PAL_NUKE, 10); + } - if (bluelightning) - P_DamageMobj(players[i].mo, player->mo, player->mo, bluelightning ? 65 : 64); + for (think = thinkercap.next; think != &thinkercap; think = think->next) + { + if (think->function.acp1 != (actionf_p1)P_MobjThinker) + continue; // not a mobj thinker + + mo = (mobj_t *)think; + + if (mo->type == MT_PLAYER) + P_DamageMobj(mo, player->mo, player->mo, bluelightning ? 65 : 64); + else + continue; } if (player->kartstuff[k_sounds]) // Prevents taunt sounds from playing every time the button is pressed return; - K_PlayTauntSound(player->mo); + //K_PlayTauntSound(player->mo); player->kartstuff[k_sounds] = 50; } diff --git a/src/m_menu.c b/src/m_menu.c index ebbdca78..3fde232a 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2734,7 +2734,7 @@ void M_Init(void) quitmsg[QUIT3MSG1] = M_GetText("Come on, just ONE more netgame!\n\n(Press 'Y' to quit)"); quitmsg[QUIT3MSG2] = M_GetText("Press 'N' to unlock\nthe Ultimate Cheat!\n\n(Press 'Y' to quit)"); quitmsg[QUIT3MSG3] = M_GetText("Why don't you go back and try\njumping on that house to\nsee what happens?\n\n(Press 'Y' to quit)"); - quitmsg[QUIT3MSG4] = M_GetText("Every time you press 'Y', an\nSRB2 Developer cries...\n\n(Press 'Y' to quit)"); + quitmsg[QUIT3MSG4] = M_GetText("Every time you press 'Y', an\nSRB2Kart Developer cries...\n\n(Press 'Y' to quit)"); quitmsg[QUIT3MSG5] = M_GetText("You'll be back to play soon, though...\n......right?\n\n(Press 'Y' to quit)"); quitmsg[QUIT3MSG6] = M_GetText("Aww, is Egg Rock Zone too\ndifficult for you?\n\n(Press 'Y' to quit)"); diff --git a/src/m_misc.c b/src/m_misc.c index cfe73d88..ab7e201e 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -532,7 +532,7 @@ void M_SaveConfig(const char *filename) } // header message - fprintf(f, "// SRB2 configuration file.\n"); + fprintf(f, "// SRB2Kart configuration file.\n"); // FIXME: save key aliases if ever implemented.. @@ -652,8 +652,8 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png char titletxt[] = "Sonic Robo Blast 2 " VERSIONSTRING; png_charp authortxt = I_GetUserName(); png_charp playertxt = cv_playername.zstring; - char desctxt[] = "SRB2 Screenshot"; - char Movietxt[] = "SRB2 Movie"; + char desctxt[] = "SRB2Kart Screenshot"; + char Movietxt[] = "SRB2Kart Movie"; size_t i; char interfacetxt[] = #ifdef HAVE_SDL diff --git a/src/mserv.c b/src/mserv.c index a8e43bbf..339df853 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -206,7 +206,7 @@ static void ServerName_OnChange(void); #define DEF_PORT "28900" consvar_t cv_masterserver = {"masterserver", "ms.srb2.org:"DEF_PORT, CV_SAVE, NULL, MasterServer_OnChange, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_servername = {"servername", "SRB2 server", CV_SAVE, NULL, ServerName_OnChange, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_servername = {"servername", "SRB2Kart server", CV_SAVE, NULL, ServerName_OnChange, 0, NULL, NULL, 0, 0, NULL}; INT16 ms_RoomId = -1; diff --git a/src/p_enemy.c b/src/p_enemy.c index e1836cab..b9fe0263 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8243,6 +8243,7 @@ void A_RedShellChase(mobj_t *actor) void A_BobombExplode(mobj_t *actor) { mobj_t *mo2; + mobj_t *mo3; thinker_t *th; INT32 d; INT32 locvar1 = var1; @@ -8253,7 +8254,9 @@ void A_BobombExplode(mobj_t *actor) for (d = 0; d < 16; d++) K_SpawnKartExplosion(actor->x, actor->y, actor->z, actor->info->painchance + 32*FRACUNIT, 32, type, d*(ANGLE_45/4), false, false); // 32 <-> 64 - S_StartSound(actor, sfx_prloop); + mo3 = P_SpawnMobj(actor->x, actor->y, actor->z, MT_BOMBEXPLOSIONSOUND); + + //S_StartSound(actor, sfx_prloop); for (th = thinkercap.next; th != &thinkercap; th = th->next) { @@ -8262,7 +8265,7 @@ void A_BobombExplode(mobj_t *actor) mo2 = (mobj_t *)th; - if (mo2 == actor) // Don't explode yourself! Endless loop! + if (mo2 == actor || mo2->type == MT_BOMBEXPLOSIONSOUND) // Don't explode yourself! Endless loop! continue; if (P_AproxDistance(P_AproxDistance(mo2->x - actor->x, mo2->y - actor->y), mo2->z - actor->z) > actor->info->painchance) @@ -8277,8 +8280,6 @@ void A_BobombExplode(mobj_t *actor) else P_DamageMobj(mo2, actor, actor->target, 1); - - continue; } } diff --git a/src/p_inter.c b/src/p_inter.c index 239197a3..b202dd11 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -3125,7 +3125,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da K_SpinPlayer(player, source); // Start shrinking! - player->mo->destscale = 70; + player->mo->destscale = 6*FRACUNIT/8; player->kartstuff[k_growshrinktimer] -= (100+20*(16-(player->kartstuff[k_position]))); } // Mega Mushroom? Let's take that away. diff --git a/src/p_mobj.c b/src/p_mobj.c index 050b1fbf..5a6dfb81 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1702,12 +1702,57 @@ void P_XYMovement(mobj_t *mo) if (player->bot) B_MoveBlocked(player); } + //{ SRB2kart - Red Shell + if (mo->type == MT_REDITEM || mo->type == MT_REDITEMDUD) + { + if (mo->health == 1) + { + // This Item Damage + S_StartSound(mo, mo->info->deathsound); + P_KillMobj(mo, NULL, NULL); - if (mo->flags & MF_BOUNCE) + P_SetObjectMomZ(mo, 8*FRACUNIT, false); + P_InstaThrust(mo, R_PointToAngle2(mo->x, mo->y, mo->x + xmove, mo->y + ymove)+ANGLE_90, 16*FRACUNIT); + } + } + //} + else if (mo->flags & MF_BOUNCE) { P_BounceMove(mo); xmove = ymove = 0; - S_StartSound(mo, mo->info->activesound); + //S_StartSound(mo, mo->info->activesound); + //{ SRB2kart - Shell and fireball + if (mo->type == MT_GREENITEM) + { + if (mo->health > 1) + { + S_StartSound(mo, mo->info->attacksound); + mo->health--; + mo->threshold = 0; + } + else if (mo->health == 1) + { + // This Item Damage + S_StartSound(mo, mo->info->deathsound); + P_KillMobj(mo, NULL, NULL); + + P_SetObjectMomZ(mo, 8*FRACUNIT, false); + P_InstaThrust(mo, R_PointToAngle2(mo->x, mo->y, mo->x + xmove, mo->y + ymove)+ANGLE_90, 16*FRACUNIT); + } + } + if (mo->type == MT_FIREBALL) + { + S_StartSound(mo, mo->info->attacksound); + mo->health--; + if (mo->health <= 0) + { + S_StartSound(mo, mo->info->deathsound); + P_SetMobjState(mo, mo->info->deathstate); + } + } + else + S_StartSound(mo, mo->info->activesound); + //} // Bounce ring algorithm if (mo->type == MT_THROWNBOUNCE) @@ -1913,8 +1958,8 @@ void P_XYMovement(mobj_t *mo) #endif //{ SRB2kart stuff - //if (mo->type == MT_SHELLITEM || mo->type == MT_REDSHELLITEM2 || (mo->type == MT_REDSHELLITEM && !mo->tracer)) - // return; + if (mo->type == MT_GREENITEM || mo->type == MT_REDITEMDUD || (mo->type == MT_REDITEM && !mo->tracer)) + return; if (mo->player && mo->player->kartstuff[k_spinouttimer] && mo->player->speed <= mo->player->normalspeed/4) return; @@ -6450,7 +6495,7 @@ void P_MobjThinker(mobj_t *mobj) else zfixds = 56; - INT32 DIST = FixedDiv(zfixds, mobj->target->scale); + INT32 DIST = FixedMul(zfixds, mobj->target->scale); INT32 HEIGHT; const fixed_t radius = DIST*FRACUNIT; // mobj's distance from its Target, or Radius. @@ -6870,7 +6915,17 @@ void P_MobjThinker(mobj_t *mobj) P_RemoveMobj(mobj); break; case MT_BOMBITEM: - P_SetMobjState(mobj, mobj->info->deathstate); + case MT_BLUEEXPLOSION: + if (mobj->health > -100) + { + P_SetMobjState(mobj, mobj->info->deathstate); + mobj->health = -100; + } + else + P_RemoveMobj(mobj); + break; + case MT_BOMBEXPLOSIONSOUND: + P_RemoveMobj(mobj); break; //} default: @@ -7432,6 +7487,9 @@ void P_MobjThinker(mobj_t *mobj) if (mobj->threshold > 0) mobj->threshold--; break; + case MT_BLUEEXPLOSION: + mobj->health--; + break; case MT_BOMBEXPLOSION: if ((mobj->z < mobj->floorz - mobj->height) || (mobj->z > mobj->ceilingz + mobj->height)) { @@ -7455,6 +7513,11 @@ void P_MobjThinker(mobj_t *mobj) mobj->z += mobj->momz; P_SetThingPosition(mobj); return; + case MT_BOMBEXPLOSIONSOUND: + if (mobj->health == 100) + S_StartSound(mobj, sfx_prloop); + mobj->health--; + break; //} case MT_TURRET: P_MobjCheckWater(mobj); diff --git a/src/p_user.c b/src/p_user.c index 76d11ecd..a72a1df9 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4588,12 +4588,12 @@ static void P_3dMovement(player_t *player) if (player->kartstuff[k_drift] >= 1) { movepushangle = player->mo->angle+ANGLE_45; - player->kartstuff[k_driftfix] = 4; + player->kartstuff[k_driftfix] = 5; } else if (player->kartstuff[k_drift] <= -1) { movepushangle = player->mo->angle-ANGLE_45; - player->kartstuff[k_driftfix] = -4; + player->kartstuff[k_driftfix] = -5; } else movepushangle = player->mo->angle; diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 71ee3f79..a8c00065 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -683,7 +683,7 @@ static void I_StartupConsole(void) if (gotConsole) { - SetConsoleTitleA("SRB2 Console"); + SetConsoleTitleA("SRB2Kart Console"); consolevent = SDL_TRUE; } @@ -1659,7 +1659,7 @@ void I_UpdateMumble(const mobj_t *mobj, const listener_t listener) return; if(mumble->uiVersion != 2) { - wcsncpy(mumble->name, L"SRB2 "VERSIONSTRINGW, 256); + wcsncpy(mumble->name, L"SRB2Kart "VERSIONSTRINGW, 256); wcsncpy(mumble->description, L"Sonic Robo Blast 2 with integrated Mumble Link support.", 2048); mumble->uiVersion = 2; } @@ -2374,7 +2374,7 @@ void I_Error(const char *error, ...) // which should fail gracefully if it can't put a message box up // on the target system SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "SRB2 "VERSIONSTRING" Recursive Error", + "SRB2Kart "VERSIONSTRING" Recursive Error", buffer, NULL); W_Shutdown(); @@ -2427,7 +2427,7 @@ void I_Error(const char *error, ...) // which should fail gracefully if it can't put a message box up // on the target system SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, - "SRB2 "VERSIONSTRING" Error", + "SRB2Kart "VERSIONSTRING" Error", buffer, NULL); // Note that SDL_ShowSimpleMessageBox does *not* require SDL to be // initialized at the time, so calling it after SDL_Quit() is diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index a88b7ad1..f3691c90 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1236,7 +1236,7 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen) #endif // Create a window - window = SDL_CreateWindow("SRB2 "VERSIONSTRING, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, + window = SDL_CreateWindow("SRB2Kart "VERSIONSTRING, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, realwidth, realheight, flags); if (window == NULL) diff --git a/src/sdl/sdl_sound.c b/src/sdl/sdl_sound.c index 0face92e..99d30b74 100644 --- a/src/sdl/sdl_sound.c +++ b/src/sdl/sdl_sound.c @@ -1942,7 +1942,7 @@ boolean I_StartDigSong(const char *musicname, boolean looping) loopstartDig = 0.0l; #else if (looping && strcmp(data, "OggS") == 0) - I_OutputMsg("I_StartDigSong: SRB2 was not compiled with looping music support(no Mix_FadeInMusicPos)\n"); + I_OutputMsg("I_StartDigSong: SRB2Kart was not compiled with looping music support(no Mix_FadeInMusicPos)\n"); #endif if (!LoadSong(data, lumplength, 1)) diff --git a/src/sdl12/i_system.c b/src/sdl12/i_system.c index ed0db653..8a6e63da 100644 --- a/src/sdl12/i_system.c +++ b/src/sdl12/i_system.c @@ -682,7 +682,7 @@ static void I_StartupConsole(void) if (gotConsole) { - SetConsoleTitleA("SRB2 Console"); + SetConsoleTitleA("SRB2Kart Console"); consolevent = SDL_TRUE; } @@ -1662,7 +1662,7 @@ void I_UpdateMumble(const mobj_t *mobj, const listener_t listener) return; if(mumble->uiVersion != 2) { - wcsncpy(mumble->name, L"SRB2 "VERSIONSTRING, 256); + wcsncpy(mumble->name, L"SRB2Kart "VERSIONSTRING, 256); wcsncpy(mumble->description, L"Sonic Robo Blast 2 with integrated Mumble Link support.", 2048); mumble->uiVersion = 2; } diff --git a/src/win32/win_net.c b/src/win32/win_net.c index 62c081bb..c0691955 100644 --- a/src/win32/win_net.c +++ b/src/win32/win_net.c @@ -33,7 +33,7 @@ boolean I_InitNetwork(void) { if (M_CheckParm ("-net")) { - I_Error("The Win32 version of SRB2 doesn't work with external drivers like ipxsetup, sersetup, or doomatic\n" + I_Error("The Win32 version of SRB2Kart doesn't work with external drivers like ipxsetup, sersetup, or doomatic\n" "Read the documentation about \"-server\" and \"-connect\" parameters or just use the launcher\n"); } diff --git a/src/win32/win_sys.c b/src/win32/win_sys.c index 86ec7a08..97b0a79f 100644 --- a/src/win32/win_sys.c +++ b/src/win32/win_sys.c @@ -504,7 +504,7 @@ static void signal_handler(int num) } #endif - MessageBoxA(hWndMain, va("signal_handler(): %s", sigmsg), "SRB2 error", MB_OK|MB_ICONERROR); + MessageBoxA(hWndMain, va("signal_handler(): %s", sigmsg), "SRB2Kart error", MB_OK|MB_ICONERROR); signal(num, SIG_DFL); // default signal action raise(num); @@ -621,7 +621,7 @@ void I_Error(const char *error, ...) va_end(argptr); OutputDebugStringA(txt); - MessageBoxA(hWndMain, txt, "SRB2 Recursive Error", MB_OK|MB_ICONERROR); + MessageBoxA(hWndMain, txt, "SRB2Kart Recursive Error", MB_OK|MB_ICONERROR); W_Shutdown(); exit(-1); // recursive errors detected } @@ -665,7 +665,7 @@ void I_Error(const char *error, ...) } #endif - MessageBoxA(hWndMain, txt, "SRB2 Error", MB_OK|MB_ICONERROR); + MessageBoxA(hWndMain, txt, "SRB2Kart Error", MB_OK|MB_ICONERROR); W_Shutdown(); exit(-1); diff --git a/src/win32ce/win_main.c b/src/win32ce/win_main.c index a8a5c7cf..fe414729 100644 --- a/src/win32ce/win_main.c +++ b/src/win32ce/win_main.c @@ -479,7 +479,7 @@ static int WINAPI HandledWinMain(HINSTANCE hInstance, // open a dummy window, both OpenGL and DirectX need one. if ((hWndMain = OpenMainWindow(hInstance,nCmdShow, - va("SRB2 "VERSIONSTRING))) == (HANDLE)-1) + va("SRB2Kart "VERSIONSTRING))) == (HANDLE)-1) { tlErrorMessage(TEXT("Couldn't open window")); return FALSE;