diff --git a/src/b_bot.c b/src/b_bot.c index de311c0ef..ca48a98bf 100644 --- a/src/b_bot.c +++ b/src/b_bot.c @@ -121,7 +121,7 @@ void B_BuildTiccmd(player_t *player, ticcmd_t *cmd) } // Bot AI isn't programmed in analog. - CV_SetValue(&cv_analog2, false); + //CV_SetValue(&cv_analog2, false); #ifdef HAVE_BLUA // Let Lua scripts build ticcmds diff --git a/src/dehacked.c b/src/dehacked.c index 17a652388..dd1f301e7 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -5815,9 +5815,15 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_FIREBALL2", "S_FIREBALL3", "S_FIREBALL4", + "S_FIREBALL5", + "S_FIREBALL6", + "S_FIREBALL7", "S_FIREBALLEXP1", "S_FIREBALLEXP2", "S_FIREBALLEXP3", + "S_FIREBALLEXP4", + "S_FIREBALLEXP5", + "S_FIREBALLEXP6", "S_SHELL", "S_SHELL1", "S_SHELL2", @@ -6359,30 +6365,30 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_FIRETRAIL9", // Special Stage Mine - "S_BOMBSHIELD1", - "S_BOMBSHIELD2", - "S_BOMBAIR1", - "S_BOMBAIR2", - "S_BOMBDEPLOY1", - "S_BOMBDEPLOY2", - "S_BOMBDEPLOY3", - "S_BOMBDEPLOY4", - "S_BOMBDEPLOY5", - "S_BOMBDEPLOY6", - "S_BOMBDEPLOY7", - "S_BOMBDEPLOY8", - "S_BOMBDEPLOY9", - "S_BOMBDEPLOY10", - "S_BOMBDEPLOY11", - "S_BOMBDEPLOY12", - "S_BOMBDEPLOY13", - "S_BOMBITEM1", - "S_BOMBITEM2", - "S_BOMBITEM3", - "S_BOMBITEM4", - "S_BOMBEXPLODE", - "S_BOMBEXPLOSION1", - "S_BOMBEXPLOSION2", + "S_MINESHIELD1", + "S_MINESHIELD2", + "S_MINEAIR1", + "S_MINEAIR2", + "S_MINEDEPLOY1", + "S_MINEDEPLOY2", + "S_MINEDEPLOY3", + "S_MINEDEPLOY4", + "S_MINEDEPLOY5", + "S_MINEDEPLOY6", + "S_MINEDEPLOY7", + "S_MINEDEPLOY8", + "S_MINEDEPLOY9", + "S_MINEDEPLOY10", + "S_MINEDEPLOY11", + "S_MINEDEPLOY12", + "S_MINEDEPLOY13", + "S_MINEITEM1", + "S_MINEITEM2", + "S_MINEITEM3", + "S_MINEITEM4", + "S_MINEEXPLODE", + "S_MINEEXPLOSION1", + "S_MINEEXPLOSION2", // New explosion "S_QUICKBOOM1", @@ -6431,6 +6437,10 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_BATTLEBALLOON2", "S_BATTLEBALLOON3", + // Lakitu + "S_LAKITU1", + "S_LAKITU2", + // Pokey "S_POKEY1", "S_POKEY2", @@ -6442,6 +6452,130 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_POKEY8", "S_POKEYIDLE", + // Audience Members + "S_RANDOMAUDIENCE", + "S_AUDIENCE_TOAD1", + "S_AUDIENCE_TOAD2", + "S_AUDIENCE_BOO1", + "S_AUDIENCE_BOO2", + "S_AUDIENCE_GMBA1", + "S_AUDIENCE_GMBA2", + "S_AUDIENCE_SHYG1", + "S_AUDIENCE_SHYG2", + "S_AUDIENCE_SNIF1", + "S_AUDIENCE_SNIF2", + + "S_FANCHAR_KOTE", + "S_FANCHAR_RYAN", + "S_FANCHAR_WENDY", + "S_FANCHAR_FREEZOR", + "S_FANCHAR_METALKO", + "S_FANCHAR_BLACKOUT", + "S_FANCHAR_BLADE", + "S_FANCHAR_HINOTE", + + // 1.0 Kart Decoratives + "S_FLAYM1", + "S_FLAYM2", + "S_FLAYM3", + "S_FLAYM4", + "S_DEVIL", + "S_ANGEL", + "S_PALMTREE", + "S_FLAG", + "S_HEDGEHOG", // (Rimshot) + "S_BUSH1", + "S_TWEE", + "S_HYDRANT", + + // New Misc Decorations + "S_BIGPUMA1", + "S_BIGPUMA2", + "S_BIGPUMA3", + "S_BIGPUMA4", + "S_BIGPUMA5", + "S_BIGPUMA6", + "S_APPLE1", + "S_APPLE2", + "S_APPLE3", + "S_APPLE4", + "S_APPLE5", + "S_APPLE6", + "S_APPLE7", + "S_APPLE8", + + // D00Dkart - Fall Flowers + "S_DOOD_FLOWER1", + "S_DOOD_FLOWER2", + "S_DOOD_FLOWER3", + "S_DOOD_FLOWER4", + "S_DOOD_FLOWER5", + "S_DOOD_FLOWER6", + + // D00Dkart - Super Circuit Box + "S_DOOD_BOX1", + "S_DOOD_BOX2", + "S_DOOD_BOX3", + "S_DOOD_BOX4", + "S_DOOD_BOX5", + + // D00Dkart - Diddy Kong Racing Balloon + "S_DOOD_BALLOON", + + // D00Dkart - Big Ring + "S_DOOD_RING1", + "S_DOOD_RING2", + "S_DOOD_RING3", + "S_DOOD_RING4", + "S_DOOD_RING5", + + // SNES Objects + "S_SNES_DONUTBUSH1", + "S_SNES_DONUTBUSH2", + "S_SNES_DONUTBUSH3", + + // GBA Objects + "S_GBA_BOO1", + "S_GBA_BOO2", + "S_GBA_BOO3", + "S_GBA_BOO4", + + // Sapphire Coast Mobs + "S_BUZZBOMBER_LOOK1", + "S_BUZZBOMBER_LOOK2", + "S_BUZZBOMBER_FLY1", + "S_BUZZBOMBER_FLY2", + "S_BUZZBOMBER_FLY3", + "S_BUZZBOMBER_FLY4", + + "S_CHOMPER_SPAWN", + "S_CHOMPER_HOP1", + "S_CHOMPER_HOP2", + "S_CHOMPER_TURNAROUND", + + "S_PALMTREE2", + "S_PURPLEFLOWER1", + "S_PURPLEFLOWER2", + "S_YELLOWFLOWER1", + "S_YELLOWFLOWER2", + "S_PLANT2", + "S_PLANT3", + "S_PLANT4", + + // Crystal Abyss Mobs + "S_SKULL", + "S_PHANTREE", + "S_FLYINGGARG1", + "S_FLYINGGARG2", + "S_FLYINGGARG3", + "S_FLYINGGARG4", + "S_FLYINGGARG5", + "S_FLYINGGARG6", + "S_FLYINGGARG7", + "S_FLYINGGARG8", + "S_LAMPPOST", + "S_MOSSYTREE", + "S_SHADOW", "S_WHITESHADOW", @@ -6991,7 +7125,6 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_INVISSPRING", "MT_BLUEDIAG", "MT_RANDOMITEM", - "MT_FLINGRANDOMITEM", "MT_RANDOMITEMPOP", "MT_SNEAKERTRAIL", @@ -7035,14 +7168,72 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_LAKITU", "MT_POKEY", // Huh, thought this was a default asset for some reason, guess not. + "MT_ENEMYFLIP", "MT_WAYPOINT", + + "MT_RANDOMAUDIENCE", + "MT_FANCHAR_KOTE", + "MT_FANCHAR_RYAN", + "MT_FANCHAR_WENDY", + "MT_FANCHAR_FREEZOR", + "MT_FANCHAR_METALKO", + "MT_FANCHAR_BLACKOUT", + "MT_FANCHAR_BLADE", + "MT_FANCHAR_HINOTE", + + "MT_FLAYM", + "MT_DEVIL", + "MT_ANGEL", + "MT_PALMTREE", + "MT_FLAG", + "MT_HEDGEHOG", + "MT_BUSH1", + "MT_TWEE", + "MT_HYDRANT", + + "MT_BIGPUMA", + "MT_APPLE", + + "MT_DOOD_FLOWER1", + "MT_DOOD_FLOWER2", + "MT_DOOD_FLOWER3", + "MT_DOOD_FLOWER4", + "MT_DOOD_BOX", + "MT_DOOD_BALLOON", + "MT_DOOD_RING", + + "MT_SNES_DONUTBUSH1", + "MT_SNES_DONUTBUSH2", + "MT_SNES_DONUTBUSH3", + + "MT_GBA_BOO", + + "MT_BUZZBOMBER", + "MT_CHOMPER", + "MT_PALMTREE2", + "MT_PURPLEFLOWER1", + "MT_PURPLEFLOWER2", + "MT_YELLOWFLOWER1", + "MT_YELLOWFLOWER2", + "MT_PLANT2", + "MT_PLANT3", + "MT_PLANT4", + + "MT_SKULL", + "MT_PHANTREE", + "MT_FLYINGGARG", + "MT_LAMPPOST", + "MT_MOSSYTREE", + "MT_SHADOW", "MT_BUMP", + "MT_FLINGENERGY", + "MT_ITEMCLASH", - + "MT_FIREDITEM", "MT_PLAYERARROW", diff --git a/src/g_game.c b/src/g_game.c index bf972367e..c1e1cd41d 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1497,7 +1497,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) if (!player->powers[pw_tailsfly] && (cmd->forwardmove || cmd->sidemove || cmd->buttons)) { player->bot = 2; // A player-controlled bot. Returns to AI when it respawns. - CV_SetValue(&cv_analog2, true); + //CV_SetValue(&cv_analog2, true); } else { @@ -1593,40 +1593,40 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) // fudging with it. static void UserAnalog_OnChange(void) { - if (cv_useranalog.value) + /*if (cv_useranalog.value) CV_SetValue(&cv_analog, 1); else - CV_SetValue(&cv_analog, 0); + CV_SetValue(&cv_analog, 0);*/ } static void UserAnalog2_OnChange(void) { if (botingame) return; - if (cv_useranalog2.value) + /*if (cv_useranalog2.value) CV_SetValue(&cv_analog2, 1); else - CV_SetValue(&cv_analog2, 0); + CV_SetValue(&cv_analog2, 0);*/ } static void UserAnalog3_OnChange(void) { if (botingame) return; - if (cv_useranalog3.value) + /*if (cv_useranalog3.value) CV_SetValue(&cv_analog3, 1); else - CV_SetValue(&cv_analog3, 0); + CV_SetValue(&cv_analog3, 0);*/ } static void UserAnalog4_OnChange(void) { if (botingame) return; - if (cv_useranalog4.value) + /*if (cv_useranalog4.value) CV_SetValue(&cv_analog4, 1); else - CV_SetValue(&cv_analog4, 0); + CV_SetValue(&cv_analog4, 0);*/ } static void Analog_OnChange(void) @@ -1636,10 +1636,10 @@ static void Analog_OnChange(void) // cameras are not initialized at this point - if (!cv_chasecam.value && cv_analog.value) { + /*if (!cv_chasecam.value && cv_analog.value) { CV_SetValue(&cv_analog, 0); return; - } + }*/ if (cv_analog.value) players[consoleplayer].pflags |= PF_ANALOGMODE; @@ -1656,10 +1656,10 @@ static void Analog2_OnChange(void) // cameras are not initialized at this point - if (!cv_chasecam2.value && cv_analog2.value) { + /*if (!cv_chasecam2.value && cv_analog2.value) { CV_SetValue(&cv_analog2, 0); return; - } + }*/ if (cv_analog2.value) players[secondarydisplayplayer].pflags |= PF_ANALOGMODE; @@ -1676,10 +1676,10 @@ static void Analog3_OnChange(void) // cameras are not initialized at this point - if (!cv_chasecam3.value && cv_analog3.value) { + /*if (!cv_chasecam3.value && cv_analog3.value) { CV_SetValue(&cv_analog3, 0); return; - } + }*/ if (cv_analog3.value) players[thirddisplayplayer].pflags |= PF_ANALOGMODE; @@ -1696,10 +1696,10 @@ static void Analog4_OnChange(void) // cameras are not initialized at this point - if (!cv_chasecam4.value && cv_analog4.value) { + /*if (!cv_chasecam4.value && cv_analog4.value) { CV_SetValue(&cv_analog4, 0); return; - } + }*/ if (cv_analog4.value) players[fourthdisplayplayer].pflags |= PF_ANALOGMODE; diff --git a/src/info.c b/src/info.c index ffe55b5cb..95b7f716c 100644 --- a/src/info.c +++ b/src/info.c @@ -2564,7 +2564,7 @@ state_t states[NUMSTATES] = {SPR_RNDM, 21, 3, {NULL}, 0, 0, S_RANDOMITEM23}, // S_RANDOMITEM22 {SPR_RNDM, 22, 3, {NULL}, 0, 0, S_RANDOMITEM24}, // S_RANDOMITEM23 {SPR_RNDM, 23, 3, {NULL}, 0, 0, S_RANDOMITEM1}, // S_RANDOMITEM24 - {SPR_RNDM, 0, 1, {A_ItemPop}, 0, 0, S_NULL}, // S_DEADRANDOMITEM + {SPR_RNDM, 0, 1, {A_ItemPop}, 0, 0, S_NULL}, // S_DEADRANDOMITEM {SPR_RNDM, FF_FULLBRIGHT|24, 5, {NULL}, 0, 0, S_RANDOMITEMPOP2}, // S_RANDOMITEMPOP1 {SPR_RNDM, FF_FULLBRIGHT|25, 5, {NULL}, 0, 0, S_RANDOMITEMPOP3}, // S_RANDOMITEMPOP2 @@ -2685,30 +2685,30 @@ state_t states[NUMSTATES] = {SPR_FBLL, 20, 3, {NULL}, 0, 0, S_FIRETRAIL9}, // S_FIRETRAIL8 {SPR_FBLL, 21, 3, {NULL}, 0, 0, S_NULL}, // S_FIRETRAIL9 - {SPR_SSMN, 4, 1, {NULL}, 0, 0, S_BOMBSHIELD2}, // S_BOMBSHIELD1 - {SPR_SSMN, 5, 1, {NULL}, 0, 0, S_BOMBSHIELD1}, // S_BOMBSHIELD2 - {SPR_SSMN, 4, 1, {NULL}, 0, 0, S_BOMBAIR2}, // S_BOMBAIR1 - {SPR_SSMN, 5, 1, {NULL}, 0, 0, S_BOMBAIR1}, // S_BOMBAIR2 - {SPR_SSMN, 6, 3, {NULL}, 0, 0, S_BOMBDEPLOY2}, // S_BOMBDEPLOY1 - {SPR_SSMN, 7, 5, {NULL}, 0, 0, S_BOMBDEPLOY3}, // S_BOMBDEPLOY2 - {SPR_SSMN, 8, 7, {NULL}, 0, 0, S_BOMBDEPLOY4}, // S_BOMBDEPLOY3 - {SPR_SSMN, 9, 1, {NULL}, 0, 0, S_BOMBDEPLOY5}, // S_BOMBDEPLOY4 - {SPR_SSMN, 10, 1, {NULL}, 0, 0, S_BOMBDEPLOY6}, // S_BOMBDEPLOY5 - {SPR_SSMN, 9, 1, {NULL}, 0, 0, S_BOMBDEPLOY7}, // S_BOMBDEPLOY6 - {SPR_SSMN, 10, 3, {NULL}, 0, 0, S_BOMBDEPLOY8}, // S_BOMBDEPLOY7 - {SPR_SSMN, 11, 1, {NULL}, 0, 0, S_BOMBDEPLOY9}, // S_BOMBDEPLOY8 - {SPR_SSMN, 10, 1, {NULL}, 0, 0, S_BOMBDEPLOY10}, // S_BOMBDEPLOY9 - {SPR_SSMN, 11, 3, {NULL}, 0, 0, S_BOMBDEPLOY11}, // S_BOMBDEPLOY10 - {SPR_SSMN, 12, 3, {NULL}, 0, 0, S_BOMBDEPLOY12}, // S_BOMBDEPLOY11 - {SPR_SSMN, 13, 3, {NULL}, 0, 0, S_BOMBDEPLOY13}, // S_BOMBDEPLOY12 - {SPR_SSMN, 14, 3, {NULL}, 0, 0, S_BOMBITEM1}, // S_BOMBDEPLOY13 - {SPR_SSMN, 0, 30, {NULL}, 0, 0, S_BOMBITEM2}, // S_BOMBITEM1 - {SPR_SSMN, 3, 3, {NULL}, 0, 0, S_BOMBITEM3}, // S_BOMBITEM2 - {SPR_SSMN, 2, 3, {NULL}, 0, 0, S_BOMBITEM4}, // S_BOMBITEM3 - {SPR_SSMN, 1, 3, {NULL}, 0, 0, S_BOMBITEM1}, // S_BOMBITEM4 - {SPR_SSMN, 3, 1, {A_MineExplode}, MT_MINEEXPLOSION, 0, S_NULL}, // S_BOMBEXPLODE - {SPR_NULL, 0, 6, {NULL}, 0, 0, S_BOMBEXPLOSION2}, // S_BOMBEXPLOSION1 - {SPR_NULL, 1, 22, {A_ForceStop}, 0, 0, S_NULL}, // S_BOMBEXPLOSION2 + {SPR_SSMN, 4, 1, {NULL}, 0, 0, S_MINESHIELD2}, // S_MINESHIELD1 + {SPR_SSMN, 5, 1, {NULL}, 0, 0, S_MINESHIELD1}, // S_MINESHIELD2 + {SPR_SSMN, 4, 1, {NULL}, 0, 0, S_MINEAIR2}, // S_MINEAIR1 + {SPR_SSMN, 5, 1, {NULL}, 0, 0, S_MINEAIR1}, // S_MINEAIR2 + {SPR_SSMN, 6, 3, {NULL}, 0, 0, S_MINEDEPLOY2}, // S_MINEDEPLOY1 + {SPR_SSMN, 7, 5, {NULL}, 0, 0, S_MINEDEPLOY3}, // S_MINEDEPLOY2 + {SPR_SSMN, 8, 7, {NULL}, 0, 0, S_MINEDEPLOY4}, // S_MINEDEPLOY3 + {SPR_SSMN, 9, 1, {NULL}, 0, 0, S_MINEDEPLOY5}, // S_MINEDEPLOY4 + {SPR_SSMN, 10, 1, {NULL}, 0, 0, S_MINEDEPLOY6}, // S_MINEDEPLOY5 + {SPR_SSMN, 9, 1, {NULL}, 0, 0, S_MINEDEPLOY7}, // S_MINEDEPLOY6 + {SPR_SSMN, 10, 3, {NULL}, 0, 0, S_MINEDEPLOY8}, // S_MINEDEPLOY7 + {SPR_SSMN, 11, 1, {NULL}, 0, 0, S_MINEDEPLOY9}, // S_MINEDEPLOY8 + {SPR_SSMN, 10, 1, {NULL}, 0, 0, S_MINEDEPLOY10}, // S_MINEDEPLOY9 + {SPR_SSMN, 11, 3, {NULL}, 0, 0, S_MINEDEPLOY11}, // S_MINEDEPLOY10 + {SPR_SSMN, 12, 3, {NULL}, 0, 0, S_MINEDEPLOY12}, // S_MINEDEPLOY11 + {SPR_SSMN, 13, 3, {NULL}, 0, 0, S_MINEDEPLOY13}, // S_MINEDEPLOY12 + {SPR_SSMN, 14, 3, {NULL}, 0, 0, S_MINEITEM1}, // S_MINEDEPLOY13 + {SPR_SSMN, 0, 30, {NULL}, 0, 0, S_MINEITEM2}, // S_MINEITEM1 + {SPR_SSMN, 3, 3, {NULL}, 0, 0, S_MINEITEM3}, // S_MINEITEM2 + {SPR_SSMN, 2, 3, {NULL}, 0, 0, S_MINEITEM4}, // S_MINEITEM3 + {SPR_SSMN, 1, 3, {NULL}, 0, 0, S_MINEITEM1}, // S_MINEITEM4 + {SPR_SSMN, 3, 1, {A_MineExplode}, MT_MINEEXPLOSION, 0, S_NULL}, // S_MINEEXPLODE + {SPR_NULL, 0, 6, {NULL}, 0, 0, S_MINEEXPLOSION2}, // S_MINEEXPLOSION1 + {SPR_NULL, 1, 22, {A_ForceStop}, 0, 0, S_NULL}, // S_MINEEXPLOSION2 {SPR_KRBM, FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_QUICKBOOM2}, // S_QUICKBOOM1 {SPR_KRBM, FF_FULLBRIGHT|1, 1, {NULL}, 0, 0, S_QUICKBOOM3}, // S_QUICKBOOM2 @@ -14260,7 +14260,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 1000, // spawnhealth S_NULL, // seestate sfx_None, // seesound - MT_FLINGRANDOMITEM, // reactiontime + 0, // reactiontime sfx_None, // attacksound S_NULL, // painstate 0, // painchance @@ -14275,48 +14275,21 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 36*FRACUNIT, // height 0, // display offset 100, // mass - 0, // damage + MT_RANDOMITEMPOP, // damage sfx_None, // activesound MF_SLIDEME|MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags S_NULL // raisestate }, - { // MT_FLINGRANDOMITEM - -1, // doomednum - S_RANDOMITEM1, // spawnstate - 1000, // spawnhealth - S_NULL, // seestate - sfx_None, // seesound - MT_FLINGRANDOMITEM, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - MT_RANDOMITEM, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_DEADRANDOMITEM, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 60*FRACUNIT, // speed - 31*FRACUNIT, // radius - 16*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SLIDEME|MF_SPECIAL, // flags - S_NULL // raisestate - }, - { // MT_RANDOMITEMPOP -1, // doomednum - S_SPRK1, // spawnstate + S_INVISIBLE, // spawnstate 1, // spawnhealth S_NULL, // seestate sfx_None, // seesound 0, // reactiontime sfx_None, // attacksound - S_SPRK1, // painstate + S_NULL, // painstate 0, // painchance sfx_None, // painsound S_NULL, // meleestate @@ -14328,7 +14301,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 16*FRACUNIT, // radius 32*FRACUNIT, // height 0, // display offset - 100, // mass + MT_SPARK, // mass 0, // damage sfx_None, // activesound MF_NOCLIP, // flags @@ -14743,10 +14716,10 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = { // MT_MINEITEM -1, // doomednum S_BOMBAIR1, // spawnstate - 105, // spawnhealth + 1, // spawnhealth S_NULL, // seestate sfx_tossed, // seesound - 8, // reactiontime + 105, // reactiontime sfx_None, // attacksound S_NULL, // painstate 320*FRACUNIT, // painchance @@ -14763,7 +14736,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 100, // mass 1, // damage sfx_bomb, // activesound - MF_BOUNCE|MF_NOCLIPTHING|MF_MISSILE|MF_SHOOTABLE, // flags + MF_BOUNCE|MF_SHOOTABLE, // flags S_NULL // raisestate }, diff --git a/src/info.h b/src/info.h index d42642b25..e6389fb19 100644 --- a/src/info.h +++ b/src/info.h @@ -3197,30 +3197,30 @@ typedef enum state S_FIRETRAIL9, // Special Stage Mine - S_BOMBSHIELD1, - S_BOMBSHIELD2, - S_BOMBAIR1, - S_BOMBAIR2, - S_BOMBDEPLOY1, - S_BOMBDEPLOY2, - S_BOMBDEPLOY3, - S_BOMBDEPLOY4, - S_BOMBDEPLOY5, - S_BOMBDEPLOY6, - S_BOMBDEPLOY7, - S_BOMBDEPLOY8, - S_BOMBDEPLOY9, - S_BOMBDEPLOY10, - S_BOMBDEPLOY11, - S_BOMBDEPLOY12, - S_BOMBDEPLOY13, - S_BOMBITEM1, - S_BOMBITEM2, - S_BOMBITEM3, - S_BOMBITEM4, - S_BOMBEXPLODE, - S_BOMBEXPLOSION1, - S_BOMBEXPLOSION2, + S_MINESHIELD1, + S_MINESHIELD2, + S_MINEAIR1, + S_MINEAIR2, + S_MINEDEPLOY1, + S_MINEDEPLOY2, + S_MINEDEPLOY3, + S_MINEDEPLOY4, + S_MINEDEPLOY5, + S_MINEDEPLOY6, + S_MINEDEPLOY7, + S_MINEDEPLOY8, + S_MINEDEPLOY9, + S_MINEDEPLOY10, + S_MINEDEPLOY11, + S_MINEDEPLOY12, + S_MINEDEPLOY13, + S_MINEITEM1, + S_MINEITEM2, + S_MINEITEM3, + S_MINEITEM4, + S_MINEEXPLODE, + S_MINEEXPLOSION1, + S_MINEEXPLOSION2, // New explosion S_QUICKBOOM1, @@ -3407,6 +3407,7 @@ typedef enum state S_FLYINGGARG8, S_LAMPPOST, S_MOSSYTREE, + S_SHADOW, S_WHITESHADOW, @@ -3973,7 +3974,6 @@ typedef enum mobj_type MT_INVISSPRING, MT_BLUEDIAG, MT_RANDOMITEM, - MT_FLINGRANDOMITEM, MT_RANDOMITEMPOP, MT_SNEAKERTRAIL, @@ -4073,6 +4073,7 @@ typedef enum mobj_type MT_FLYINGGARG, MT_LAMPPOST, MT_MOSSYTREE, + MT_SHADOW, MT_BUMP, diff --git a/src/k_kart.c b/src/k_kart.c index 6b10a92fe..944331b5e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -652,7 +652,7 @@ static void K_KartItemRouletteByDistance(player_t *player, ticcmd_t *cmd) && players[i].kartstuff[k_position] < player->kartstuff[k_position]) pdis += P_AproxDistance(P_AproxDistance(players[i].mo->x - player->mo->x, players[i].mo->y - player->mo->y), - players[i].mo->z - player->mo->z) / mapheaderinfo[gamemap-1]->mobj_scale + players[i].mo->z - player->mo->z) / mapheaderinfo[gamemap-1]->mobj_scale * (pingame - players[i].kartstuff[k_position]) / ((pingame - 1) * (pingame + 1) / 3); } @@ -922,7 +922,7 @@ static void K_UpdateOffroad(player_t *player) offroadstrength = 3; // If you are offroad, a timer starts. Depending on your weight value, the timer increments differently. - //if ((nextsector->special & 256) && nextsector->special != 768 + //if ((nextsector->special & 256) && nextsector->special != 768 // && nextsector->special != 1024 && nextsector->special != 4864) if (offroadstrength) { @@ -2576,6 +2576,9 @@ static void K_KartUpdatePosition(player_t *player) mo = (mobj_t *)th; + if (mo->type != MT_BOSS3WAYPOINT) // TODO: Change to 'MT_WAYPOINT'? + continue; + pmo = P_AproxDistance(P_AproxDistance( mo->x - player->mo->x, mo->y - player->mo->y), mo->z - player->mo->z) / FRACUNIT; @@ -2583,9 +2586,6 @@ static void K_KartUpdatePosition(player_t *player) mo->y - players[i].mo->y), mo->z - players[i].mo->z) / FRACUNIT; - if (mo->type != MT_BOSS3WAYPOINT) // TODO: Change to 'MT_WAYPOINT'? - continue; - if (mo->health == player->starpostnum) { player->kartstuff[k_prevcheck] += pmo; @@ -3884,7 +3884,7 @@ static void K_DrawKartPositionNum(INT32 num) // Alternate frame every three frames switch (leveltime % 21) { - case 1: case 2: case 3: + case 1: case 2: case 3: localpatch = kp_winnernum[0]; break; case 4: case 5: case 6: @@ -4644,7 +4644,7 @@ void K_drawKartHUD(void) { if (leveltime < 178) K_drawStartLakitu(); - + if (stplyr->kartstuff[k_lapanimation]) K_drawLapLakitu(); diff --git a/src/p_enemy.c b/src/p_enemy.c index 3777e09ea..681c4246f 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -740,8 +740,7 @@ static boolean P_LookForShield(mobj_t *actor) (actor->type == MT_BLUETEAMRING && player->ctfteam != 2)) continue; - // SRB2kart - magnet item - if (player->kartstuff[k_attractiontimer] //(player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT + if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT && (P_AproxDistance(P_AproxDistance(actor->x-player->mo->x, actor->y-player->mo->y), actor->z-player->mo->z) < FixedMul(RING_DIST/4, player->mo->scale))) { P_SetTarget(&actor->tracer, player->mo); @@ -3615,7 +3614,7 @@ void A_AttractChase(mobj_t *actor) // Turn flingrings back into regular rings if attracted. if (actor->tracer && actor->tracer->player - && actor->tracer->player->kartstuff[k_attractiontimer] //&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) != SH_ATTRACT + && (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) != SH_ATTRACT && actor->info->reactiontime && actor->type != (mobjtype_t)actor->info->reactiontime) { mobj_t *newring; @@ -3629,9 +3628,7 @@ void A_AttractChase(mobj_t *actor) P_LookForShield(actor); // Go find 'em, boy! - if (actor->tracer && actor->tracer->player && actor->tracer->player->kartstuff[k_comebackmode] == 1) - ; - else if (!actor->tracer + if (!actor->tracer || !actor->tracer->player || !actor->tracer->health || !P_CheckSight(actor, actor->tracer)) // You have to be able to SEE it...sorta @@ -8096,6 +8093,7 @@ void A_ToggleFlameJet(mobj_t* actor) void A_ItemPop(mobj_t *actor) { mobj_t *remains; + mobjtype_t explode; #ifdef HAVE_BLUA if (LUA_CallAction("A_ItemPop", actor)) return; @@ -8109,12 +8107,24 @@ void A_ItemPop(mobj_t *actor) } // de-solidify - //P_UnsetThingPosition(actor); - //actor->flags &= ~MF_SOLID; - //actor->flags |= MF_NOCLIP; - //P_SetThingPosition(actor); + P_UnsetThingPosition(actor); + actor->flags &= ~MF_SOLID; + actor->flags |= MF_NOCLIP; + P_SetThingPosition(actor); - remains = P_SpawnMobj(actor->x, actor->y, actor->z, MT_RANDOMITEMPOP); + // item explosion + explode = mobjinfo[actor->info->damage].mass; + remains = P_SpawnMobj(actor->x, actor->y, + ((actor->eflags & MFE_VERTICALFLIP) ? (actor->z + 3*(actor->height/4) - FixedMul(mobjinfo[explode].height, actor->scale)) : (actor->z + actor->height/4)), explode); + if (actor->eflags & MFE_VERTICALFLIP) + { + remains->eflags |= MFE_VERTICALFLIP; + remains->flags2 |= MF2_OBJECTFLIP; + } + remains->destscale = actor->destscale; + P_SetScale(remains, actor->scale); + + remains = P_SpawnMobj(actor->x, actor->y, actor->z, actor->info->damage); remains->type = actor->type; // Transfer type information P_UnsetThingPosition(remains); if (sector_list) @@ -8122,25 +8132,21 @@ void A_ItemPop(mobj_t *actor) P_DelSeclist(sector_list); sector_list = NULL; } - remains->flags = actor->flags; // Transfer flags P_SetThingPosition(remains); + remains->destscale = actor->destscale; + P_SetScale(remains, actor->scale); + remains->flags = actor->flags; // Transfer flags remains->flags2 = actor->flags2; // Transfer flags2 remains->fuse = actor->fuse; // Transfer respawn timer remains->threshold = 68; remains->skin = NULL; + remains->spawnpoint = actor->spawnpoint; - actor->flags2 |= MF2_BOSSNOTRAP; // Dummy flag to mark this as an exploded TV until it respawns - tmthing = remains; + P_SetTarget(&tmthing, remains); if (actor->info->deathsound) S_StartSound(remains, actor->info->deathsound); - if (actor->type != MT_RANDOMITEM) - { - P_RemoveMobj(actor); - return; - } - actor->target->player->kartstuff[k_itemroulette] = 1; remains->flags2 &= ~MF2_AMBUSH; @@ -8269,20 +8275,11 @@ void A_MineExplode(mobj_t *actor) type = (mobjtype_t)locvar1; - 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), true, false, actor->target); // 32 <-> 64 - - if (actor->target->player) - K_SpawnMineExplosion(actor, actor->target->player->skincolor); - else - K_SpawnMineExplosion(actor, SKINCOLOR_RED); - - P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND); - - //S_StartSound(actor, sfx_prloop); - for (th = thinkercap.next; th != &thinkercap; th = th->next) { + if (P_MobjWasRemoved(actor)) + return; // There's the possibility these can chain react onto themselves after they've already died if there are enough all in one spot + if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -8309,6 +8306,17 @@ void A_MineExplode(mobj_t *actor) continue; } } + + 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), true, false, actor->target); // 32 <-> 64 + + if (actor->target && actor->target->player) + K_SpawnMineExplosion(actor, actor->target->player->skincolor); + else + K_SpawnMineExplosion(actor, SKINCOLOR_RED); + + P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND); + return; } //} diff --git a/src/p_floor.c b/src/p_floor.c index 9ce4df83a..f67d59aea 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -1787,7 +1787,7 @@ static mobj_t *SearchMarioNode(msecnode_t *node) break; } // Ignore popped monitors, too. - if (node->m_thing->flags & MF_MONITOR + if (node->m_thing->flags & MF_MONITOR || node->m_thing->type == MT_RANDOMITEM && node->m_thing->threshold == 68) continue; // Okay, we found something valid. diff --git a/src/p_inter.c b/src/p_inter.c index 7602e2994..7d480cd09 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -161,9 +161,6 @@ boolean P_CanPickupItem(player_t *player, boolean weapon) if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0) // No balloons in Match return false; - if (player->kartstuff[k_attractiontimer]) // You should probably collect stuff when you're attracting it :V - return true; - if (player->kartstuff[k_stealingtimer] || player->kartstuff[k_stolentimer] || player->kartstuff[k_growshrinktimer] > 1 || player->kartstuff[k_rocketsneakertimer]) // Item-specific timer going off return false; @@ -410,7 +407,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) switch (special->type) { case MT_RANDOMITEM: // SRB2kart - case MT_FLINGRANDOMITEM: if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0) { if (player->kartstuff[k_comebackmode] == 0 && !player->kartstuff[k_comebacktimer]) @@ -443,7 +439,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) special->momx = special->momy = special->momz = 0; P_SetTarget(&special->target, toucher); - P_SetMobjState(special, special->info->deathstate); + P_KillMobj(special, toucher, toucher); break; // ***************************************** // // Rings, coins, spheres, weapon panels, etc // @@ -1546,8 +1542,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) } } - S_StartSound(toucher, special->info->deathsound); // was NULL, but changed to player so you could hear others pick up rings - P_KillMobj(special, NULL, toucher); + if (!P_MobjWasRemoved(special)) + { + S_StartSound(toucher, special->info->deathsound); // was NULL, but changed to player so you could hear others pick up rings + P_KillMobj(special, NULL, toucher); + } } // @@ -2101,7 +2100,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source) // if killed by a player if (source && source->player) { - if (target->flags & MF_MONITOR) + if (target->flags & MF_MONITOR || target->type == MT_RANDOMITEM) { P_SetTarget(&target->target, source); source->player->numboxes++; diff --git a/src/p_map.c b/src/p_map.c index 6fd333aa8..2fba10020 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -388,7 +388,7 @@ static void P_DoTailsCarry(player_t *sonic, player_t *tails) else { if (sonic-players == consoleplayer && botingame) - CV_SetValue(&cv_analog2, false); + //CV_SetValue(&cv_analog2, false); P_ResetPlayer(sonic); P_SetTarget(&sonic->mo->tracer, tails->mo); sonic->pflags |= PF_CARRIED; @@ -401,7 +401,7 @@ static void P_DoTailsCarry(player_t *sonic, player_t *tails) } else { if (sonic-players == consoleplayer && botingame) - CV_SetValue(&cv_analog2, true); + //CV_SetValue(&cv_analog2, true); sonic->pflags &= ~PF_CARRIED; } } @@ -1574,7 +1574,7 @@ static boolean PIT_CheckThing(mobj_t *thing) } else if (thing->player) { if (thing->player-players == consoleplayer && botingame) - CV_SetValue(&cv_analog2, true); + //CV_SetValue(&cv_analog2, true); thing->player->pflags &= ~PF_CARRIED; }*/ diff --git a/src/p_mobj.c b/src/p_mobj.c index 3b9b471f9..b0fa24ad6 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -47,6 +47,7 @@ consvar_t cv_splats = {"splats", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0 actioncache_t actioncachehead; static mobj_t *overlaycap = NULL; +static mobj_t *shadowcap = NULL; void P_InitCachedActions(void) { @@ -1371,7 +1372,6 @@ fixed_t P_GetMobjGravity(mobj_t *mo) { case MT_FLINGRING: case MT_FLINGCOIN: - case MT_FLINGRANDOMITEM: // SRB2kart case MT_FLINGEMERALD: case MT_BOUNCERING: case MT_RAILRING: @@ -2357,7 +2357,6 @@ static boolean P_ZMovement(mobj_t *mo) case MT_BLUETEAMRING: case MT_FLINGRING: case MT_FLINGCOIN: - case MT_FLINGRANDOMITEM: case MT_FLINGEMERALD: // Remove flinged stuff from death pits. if (P_CheckDeathPitCollide(mo)) @@ -2550,7 +2549,6 @@ static boolean P_ZMovement(mobj_t *mo) // Flingrings bounce if (mo->type == MT_FLINGRING || mo->type == MT_FLINGCOIN - || mo->type == MT_FLINGRANDOMITEM || P_WeaponOrPanel(mo->type) || mo->type == MT_FLINGEMERALD || mo->type == MT_BIGTUMBLEWEED @@ -5968,9 +5966,6 @@ void P_Attract(mobj_t *source, mobj_t *dest, boolean nightsgrab) // Home in on y fixed_t ty = dest->y; fixed_t tz = dest->z + (dest->height/2); // Aim for center - if (source->type == MT_RANDOMITEM || source->type == MT_FLINGRANDOMITEM) // SRB2kart - item boxes are sorta tall - tz = dest->z; - if (!dest || dest->health <= 0 || !dest->player || !source->tracer) return; @@ -6253,62 +6248,96 @@ static void P_RemoveOverlay(mobj_t *thing) void P_RunShadows(void) { - thinker_t * th; - mobj_t * mobj; + mobj_t *mobj; + mobj_t *next; - for (th = thinkercap.next; th != &thinkercap; th = th->next) + for (mobj = shadowcap; mobj; mobj = next) { - if (th->function.acp1 != (actionf_p1)P_MobjThinker) - continue; + next = mobj->hnext; + P_SetTarget(&mobj->hnext, NULL); - mobj = (mobj_t *)th; + if (!mobj->target) + continue; // shouldn't you already be dead? - if (mobj->type != MT_SHADOW) - continue; + if ((mobj->target->flags2 & MF2_DONTDRAW) + || (((mobj->target->eflags & MFE_VERTICALFLIP) && mobj->target->z+mobj->target->height > mobj->target->ceilingz) + || (!(mobj->target->eflags & MFE_VERTICALFLIP) && mobj->target->z < mobj->target->floorz))) + mobj->flags2 |= MF2_DONTDRAW; + else + mobj->flags2 &= ~MF2_DONTDRAW; - if (mobj->target) + // First scale to the same radius + P_SetScale(mobj, FixedDiv(mobj->target->radius, mobj->info->radius)); + + P_TeleportMove(mobj, mobj->target->x, mobj->target->y, mobj->target->z); + + if (mobj->floorz < mobj->z) { - if ((mobj->target->flags2 & MF2_DONTDRAW) - || (((mobj->target->eflags & MFE_VERTICALFLIP) && mobj->target->z+mobj->target->height > mobj->target->ceilingz) - || (!(mobj->target->eflags & MFE_VERTICALFLIP) && mobj->target->z < mobj->target->floorz))) - mobj->flags2 |= MF2_DONTDRAW; - else - mobj->flags2 &= ~MF2_DONTDRAW; + INT32 i; + fixed_t prevz; - // First scale to the same radius - P_SetScale(mobj, FixedDiv(mobj->target->radius, mobj->info->radius)); + mobj->z = mobj->floorz; - P_TeleportMove(mobj, mobj->target->x, mobj->target->y, mobj->target->z); - - if (mobj->floorz < mobj->z) + for (i = 0; i < MAXFFLOORS; i++) { - INT32 i; - fixed_t prevz; + prevz = mobj->z; + + // Now scale again based on height difference + P_SetScale(mobj, FixedDiv(mobj->scale, max(FRACUNIT, ((mobj->target->z-mobj->z)/200)+FRACUNIT))); + + // Check new position to see if you should still be on that ledge + P_TeleportMove(mobj, mobj->target->x, mobj->target->y, mobj->z); mobj->z = mobj->floorz; - for (i = 0; i < MAXFFLOORS; i++) - { - prevz = mobj->z; - - // Now scale again based on height difference - P_SetScale(mobj, FixedDiv(mobj->scale, max(FRACUNIT, ((mobj->target->z-mobj->z)/200)+FRACUNIT))); - - // Check new position to see if you should still be on that ledge - P_TeleportMove(mobj, mobj->target->x, mobj->target->y, mobj->z); - - mobj->z = mobj->floorz; - - if (mobj->z == prevz) - break; - } + if (mobj->z == prevz) + break; } } - else - { - P_KillMobj(mobj, NULL, NULL); - } } + P_SetTarget(&shadowcap, NULL); +} + +// called whenever shadows think +// It must be done this way so that level changes don't break when the shadowcap can't be reset +static void P_AddShadow(mobj_t *thing) +{ + I_Assert(thing != NULL); + + if (shadowcap == NULL) + P_SetTarget(&shadowcap, thing); + else { + mobj_t *mo; + for (mo = shadowcap; mo && mo->hnext; mo = mo->hnext) + ; + + I_Assert(mo != NULL); + I_Assert(mo->hnext == NULL); + + P_SetTarget(&mo->hnext, thing); + } + P_SetTarget(&thing->hnext, NULL); +} + +// Called only when MT_SHADOW (or anything else in the shadowcap list) is removed. +// Keeps the hnext list from corrupting. +static void P_RemoveShadow(mobj_t *thing) +{ + mobj_t *mo; + if (shadowcap == thing) + { + P_SetTarget(&shadowcap, thing->hnext); + P_SetTarget(&thing->hnext, NULL); + return; + } + + for (mo = shadowcap; mo; mo = mo->hnext) + if (mo->hnext == thing) + { + P_SetTarget(&mo->hnext, thing->hnext); + P_SetTarget(&thing->hnext, NULL); + return; + } } void A_BossDeath(mobj_t *mo); @@ -6510,6 +6539,15 @@ void P_MobjThinker(mobj_t *mobj) else P_AddOverlay(mobj); break; + case MT_SHADOW: + if (!mobj->target) + { + P_RemoveMobj(mobj); + return; + } + else + P_AddShadow(mobj); + break; case MT_BLACKORB: case MT_WHITEORB: case MT_GREENORB: @@ -7728,7 +7766,6 @@ void P_MobjThinker(mobj_t *mobj) case MT_BLUEBALL: case MT_REDTEAMRING: case MT_BLUETEAMRING: - case MT_RANDOMITEM: // No need to check water. Who cares? P_RingThinker(mobj); if (mobj->flags2 & MF2_NIGHTSPULL) @@ -7739,7 +7776,6 @@ void P_MobjThinker(mobj_t *mobj) // Flung items case MT_FLINGRING: case MT_FLINGCOIN: - case MT_FLINGRANDOMITEM: if (mobj->flags2 & MF2_NIGHTSPULL) P_NightsItemChase(mobj); else @@ -7970,19 +8006,25 @@ void P_MobjThinker(mobj_t *mobj) mobj->color = SKINCOLOR_RED; if (mobj->momx || mobj->momy) P_SpawnGhostMobj(mobj); - if (mobj->z <= mobj->floorz) + if (P_IsObjectOnGround(mobj)) { - if (mobj->state == &states[S_BOMBAIR1] || mobj->state == &states[S_BOMBAIR2]) - P_SetMobjState(mobj, S_BOMBDEPLOY1); - if (mobj->health > mobj->info->spawnhealth-1) + if (mobj->state == &states[S_MINEAIR1] || mobj->state == &states[S_MINEAIR2]) + P_SetMobjState(mobj, S_MINEDEPLOY1); + if (mobj->reactiontime >= mobj->info->reactiontime) { mobj->momx = mobj->momy = 0; S_StartSound(mobj, mobj->info->activesound); + mobj->reactiontime--; } - mobj->health--; } - if (mobj->state == &states[S_BOMBITEM1] || mobj->state == &states[S_BOMBITEM2] - || mobj->state == &states[S_BOMBITEM3] || mobj->state == &states[S_BOMBITEM4]) + if (mobj->reactiontime && mobj->reactiontime < mobj->info->reactiontime) + { + mobj->reactiontime--; + if (!mobj->reactiontime) + P_KillMobj(mobj, NULL, NULL); + } + if (mobj->state == &states[S_MINEITEM1] || mobj->state == &states[S_MINEITEM2] + || mobj->state == &states[S_MINEITEM3] || mobj->state == &states[S_MINEITEM4]) A_GrenadeRing(mobj); if (mobj->threshold > 0) mobj->threshold--; @@ -8286,6 +8328,20 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s } P_RemoveMobj(mobj); // make sure they disappear return; + case MT_RANDOMITEM: + // Respawn from mapthing if you have one! + if (mobj->spawnpoint) + { + P_SpawnMapThing(mobj->spawnpoint); + newmobj = mobj->spawnpoint->mobj; // this is set to the new mobj in P_SpawnMapThing + } + else + newmobj = P_SpawnMobj(mobj->x, mobj->y, mobj->z, mobj->type); + + // Transfer flags2 (strongbox, objectflip) + newmobj->flags2 = mobj->flags2; + P_RemoveMobj(mobj); // make sure they disappear + return; case MT_METALSONIC_BATTLE: break; // don't remove case MT_SPIKE: @@ -8340,7 +8396,6 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s #ifdef ESLOPE // Sliding physics for slidey mobjs! if (mobj->type == MT_FLINGRING || mobj->type == MT_FLINGCOIN - || mobj->type == MT_FLINGRANDOMITEM || P_WeaponOrPanel(mobj->type) || mobj->type == MT_FLINGEMERALD || mobj->type == MT_BIGTUMBLEWEED @@ -8783,10 +8838,10 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) //case MT_RANDOMITEM: case MT_BANANAITEM: case MT_BANANASHIELD: case MT_GREENITEM: case MT_GREENSHIELD: - case MT_REDITEM: case MT_REDSHIELD: case MT_REDITEMDUD: + case MT_REDITEM: case MT_REDSHIELD: case MT_REDITEMDUD: case MT_BATTLEBALLOON: case MT_FIREBALL: - case MT_FAKEITEM: case MT_FAKESHIELD: - case MT_MINEITEM: case MT_MINESHIELD: + case MT_FAKEITEM: case MT_FAKESHIELD: + case MT_MINEITEM: case MT_MINESHIELD: P_SpawnShadowMobj(mobj); default: break; @@ -9029,7 +9084,6 @@ void P_RemoveMobj(mobj_t *mobj) if (mobj->spawnpoint && (mobj->type == MT_RING || mobj->type == MT_COIN - || mobj->type == MT_RANDOMITEM || mobj->type == MT_BLUEBALL || mobj->type == MT_REDTEAMRING || mobj->type == MT_BLUETEAMRING @@ -9047,6 +9101,9 @@ void P_RemoveMobj(mobj_t *mobj) if (mobj->type == MT_OVERLAY) P_RemoveOverlay(mobj); + if (mobj->type == MT_SHADOW) + P_RemoveShadow(mobj); + mobj->health = 0; // Just because // unlink from sector and block lists @@ -9543,7 +9600,7 @@ void P_RespawnBattleSpecials(void) // pull it from the que iquetail = (iquetail+1)&(ITEMQUESIZE-1); } - + numgotboxes = 0; } @@ -11007,7 +11064,7 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing) mthing->mobj = mobj; } // All manners of rings and coins - else if (mthing->type == mobjinfo[MT_RING].doomednum || mthing->type == mobjinfo[MT_COIN].doomednum || mthing->type == mobjinfo[MT_RANDOMITEM].doomednum || + else if (mthing->type == mobjinfo[MT_RING].doomednum || mthing->type == mobjinfo[MT_COIN].doomednum || mthing->type == mobjinfo[MT_REDTEAMRING].doomednum || mthing->type == mobjinfo[MT_BLUETEAMRING].doomednum) { mobjtype_t ringthing = MT_RING; @@ -11028,9 +11085,6 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing) case 309: // No team rings in non-CTF ringthing = (gametype == GT_CTF) ? MT_BLUETEAMRING : MT_RING; break; - case 2000: // SRB2kart - ringthing = MT_RANDOMITEM; - break; default: // Spawn rings as blue spheres in special stages, ala S3+K. if (G_IsSpecialStage(gamemap) && useNightsSS) diff --git a/src/p_setup.c b/src/p_setup.c index 7f722548f..4cecb9414 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -827,7 +827,7 @@ void P_ReloadRings(void) continue; } if (!(mo->type == MT_RING || mo->type == MT_NIGHTSWING || mo->type == MT_COIN - || mo->type == MT_BLUEBALL || mo->type == MT_RANDOMITEM)) + || mo->type == MT_BLUEBALL)) continue; // Don't auto-disintegrate things being pulled to us @@ -991,7 +991,7 @@ static void P_LoadThings(void) || mt->type == 1702) // MT_AXISTRANSFERLINE continue; // These were already spawned - if (mt->type == 2000) // MT_RANDOMITEM + if (mt->type == MT_RANDOMITEM) // MT_RANDOMITEM nummapboxes++; mt->mobj = NULL; @@ -2477,7 +2477,7 @@ static void P_LoadRecordGhosts(void) // Guest ghost if (cv_ghost_guest.value && FIL_FileExists(va("%s-guest.lmp", gpath))) G_AddGhost(va("%s-guest.lmp", gpath)); - + // Staff Attack ghosts if (cv_ghost_staff.value) { @@ -2918,7 +2918,7 @@ boolean P_SetupLevel(boolean skipprecip) if (!cv_cam2_height.changed) CV_Set(&cv_cam2_height, cv_cam2_height.defaultvalue); - + if (!cv_cam_dist.changed) CV_Set(&cv_cam_dist, cv_cam_dist.defaultvalue); @@ -2938,14 +2938,14 @@ boolean P_SetupLevel(boolean skipprecip) if (!cv_cam4_rotate.changed) CV_Set(&cv_cam4_rotate, cv_cam4_rotate.defaultvalue); - if (!cv_analog.changed) + /*if (!cv_analog.changed) CV_SetValue(&cv_analog, 0); if (!cv_analog2.changed) CV_SetValue(&cv_analog2, 0); if (!cv_analog3.changed) CV_SetValue(&cv_analog3, 0); if (!cv_analog4.changed) - CV_SetValue(&cv_analog4, 0); + CV_SetValue(&cv_analog4, 0);*/ #ifdef HWRENDER if (rendermode != render_soft && rendermode != render_none) @@ -2955,7 +2955,7 @@ boolean P_SetupLevel(boolean skipprecip) displayplayer = consoleplayer; // Start with your OWN view, please! } - if (cv_useranalog.value) + /*if (cv_useranalog.value) CV_SetValue(&cv_analog, true); if ((splitscreen && cv_useranalog2.value) || botingame) @@ -2973,7 +2973,7 @@ boolean P_SetupLevel(boolean skipprecip) CV_SetValue(&cv_analog3, false); CV_SetValue(&cv_analog2, false); CV_SetValue(&cv_analog, false); - } + }*/ // SRB2Kart: map load variables if (modeattacking) diff --git a/src/p_user.c b/src/p_user.c index b990f0723..dde78f0f4 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -889,8 +889,8 @@ void P_ResetPlayer(player_t *player) player->powers[pw_tailsfly] = 0; player->onconveyor = 0; player->skidtime = 0; - if (player-players == consoleplayer && botingame) - CV_SetValue(&cv_analog2, true); + /*if (player-players == consoleplayer && botingame) + CV_SetValue(&cv_analog2, true);*/ } // @@ -3738,8 +3738,8 @@ void P_DoJump(player_t *player, boolean soundandstate) { player->mo->momz = 9*FRACUNIT; player->pflags &= ~PF_CARRIED; - if (player-players == consoleplayer && botingame) - CV_SetValue(&cv_analog2, true); + /*if (player-players == consoleplayer && botingame) + CV_SetValue(&cv_analog2, true);*/ } else if (player->pflags & PF_ITEMHANG) { @@ -8109,7 +8109,7 @@ static void P_DeathThink(player_t *player) curlap = 0; } } - + if ((G_RaceGametype() || (gametype == GT_COOP && (multiplayer || netgame))) && (player->lives <= 0)) { // Return to level music @@ -9136,7 +9136,7 @@ static void P_CalcPostImg(player_t *player) *param = 5; } #endif - + if (mirrormode) // srb2kart *type = postimg_mirror; } @@ -9443,7 +9443,7 @@ void P_PlayerThink(player_t *player) mo2 = (mobj_t *)th; if (!(mo2->type == MT_NIGHTSWING || mo2->type == MT_RING || mo2->type == MT_COIN - || mo2->type == MT_BLUEBALL || mo2->type == MT_RANDOMITEM)) + || mo2->type == MT_BLUEBALL)) continue; if (P_AproxDistance(P_AproxDistance(mo2->x - x, mo2->y - y), mo2->z - z) > FixedMul(128*FRACUNIT, player->mo->scale)) @@ -9970,8 +9970,8 @@ void P_PlayerAfterThink(player_t *player) P_SetPlayerMobjState(player->mo, S_PLAY_CARRY); - if (player-players == consoleplayer && botingame) - CV_SetValue(&cv_analog2, !(player->pflags & PF_CARRIED)); + //if (player-players == consoleplayer && botingame) + //CV_SetValue(&cv_analog2, !(player->pflags & PF_CARRIED)); } else if (player->pflags & PF_ITEMHANG && player->mo->tracer) { diff --git a/src/r_main.c b/src/r_main.c index 915bf83c0..82b2b6d54 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -234,36 +234,36 @@ void SplitScreen_OnChange(void) static void ChaseCam_OnChange(void) { - if (!cv_chasecam.value || !cv_useranalog.value) + /*if (!cv_chasecam.value || !cv_useranalog.value) CV_SetValue(&cv_analog, 0); else - CV_SetValue(&cv_analog, 1); + CV_SetValue(&cv_analog, 1);*/ } static void ChaseCam2_OnChange(void) { if (botingame) return; - if (!cv_chasecam2.value || !cv_useranalog2.value) + /*if (!cv_chasecam2.value || !cv_useranalog2.value) CV_SetValue(&cv_analog2, 0); else - CV_SetValue(&cv_analog2, 1); + CV_SetValue(&cv_analog2, 1);*/ } static void ChaseCam3_OnChange(void) { - if (!cv_chasecam3.value || !cv_useranalog3.value) + /*if (!cv_chasecam3.value || !cv_useranalog3.value) CV_SetValue(&cv_analog3, 0); else - CV_SetValue(&cv_analog3, 1); + CV_SetValue(&cv_analog3, 1);*/ } static void ChaseCam4_OnChange(void) { - if (!cv_chasecam4.value || !cv_useranalog4.value) + /*if (!cv_chasecam4.value || !cv_useranalog4.value) CV_SetValue(&cv_analog4, 0); else - CV_SetValue(&cv_analog4, 1); + CV_SetValue(&cv_analog4, 1);*/ } static void FlipCam_OnChange(void)