From 57150c8718612e8215df61ebeaff39d6d37c6481 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 1 Aug 2015 11:56:44 +0200 Subject: [PATCH 1/9] - fixed incorrect Strife player death sound. --- wadsrc/static/filter/game-strife/sndinfo.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/filter/game-strife/sndinfo.txt b/wadsrc/static/filter/game-strife/sndinfo.txt index 22f9b8356..f602a969b 100644 --- a/wadsrc/static/filter/game-strife/sndinfo.txt +++ b/wadsrc/static/filter/game-strife/sndinfo.txt @@ -8,7 +8,7 @@ $rolloff * 200 1200 $playersound player male *death dspldeth -$playersound player male *xdeath dspdiehi +$playersound player male *xdeath dsplxdth $playersound player male *gibbed dsslop $playersound player male *pain100 dsplpain $playersounddup player male *pain75 *pain100 From 58870d48718a23952ec4aa7be020c86589549f66 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 1 Aug 2015 23:17:06 +0200 Subject: [PATCH 2/9] - fixed: SingleActorFromTid wasn't declared in thingdef_codeptr.cpp --- src/p_acs.cpp | 2 +- src/thingdef/thingdef_codeptr.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 750b8f09d..83a087d8f 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -3595,7 +3595,7 @@ int DoGetMasterTID (AActor *self) else return 0; } -static AActor *SingleActorFromTID (int tid, AActor *defactor) +AActor *SingleActorFromTID (int tid, AActor *defactor) { if (tid == 0) { diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index e47f4148f..2ba5fa01a 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -73,6 +73,7 @@ #include "p_setup.h" #include "gstrings.h" +AActor *SingleActorFromTID (int tid, AActor *defactor); static FRandom pr_camissile ("CustomActorfire"); static FRandom pr_camelee ("CustomMelee"); From 3efbf6c74e551551dd28b7430a5e60a2048c661c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 9 Aug 2015 09:03:12 +0200 Subject: [PATCH 3/9] - fixed: am_restorecolors did not work This CCMD tried to access the current menu to decide which colors to reset but that is not available at all when this function gets called. It now uses the automap's own CVAR arrays. --- src/am_map.cpp | 14 ++++++++++++++ src/menu/optionmenuitems.h | 15 --------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/am_map.cpp b/src/am_map.cpp index fdbacd34f..045d48589 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -360,6 +360,20 @@ static FColorCVar *cv_overlay[] = { &am_ovsecretsectorcolor }; +CCMD(am_restorecolors) +{ + for (unsigned i = 0; i < countof(cv_standard); i++) + { + cv_standard[i]->ResetToDefault(); + } + for (unsigned i = 0; i < countof(cv_overlay); i++) + { + cv_overlay[i]->ResetToDefault(); + } +} + + + #define NOT_USED 1,0,0 // use almost black as indicator for an unused color static unsigned char DoomColors[]= { diff --git a/src/menu/optionmenuitems.h b/src/menu/optionmenuitems.h index 5bc015369..e87e78483 100644 --- a/src/menu/optionmenuitems.h +++ b/src/menu/optionmenuitems.h @@ -1145,18 +1145,3 @@ private: float mMaximum; float mStep; }; -#ifndef NO_IMP -CCMD(am_restorecolors) -{ - if (DMenu::CurrentMenu != NULL && DMenu::CurrentMenu->IsKindOf(RUNTIME_CLASS(DOptionMenu))) - { - DOptionMenu *m = (DOptionMenu*)DMenu::CurrentMenu; - const FOptionMenuDescriptor *desc = m->GetDescriptor(); - // Find the color cvars by scanning the MapColors menu. - for (unsigned i = 0; i < desc->mItems.Size(); ++i) - { - desc->mItems[i]->SetValue(FOptionMenuItemColorPicker::CPF_RESET, 0); - } - } -} -#endif From fcf1d56b1a239700920cd90f3bd431beed03583b Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Sun, 9 Aug 2015 14:06:22 -0500 Subject: [PATCH 4/9] - Added SXF_IS. - The spawned actor becomes the calling actor's specified pointers respectively. --- src/thingdef/thingdef_codeptr.cpp | 15 +++++++++++++++ wadsrc/static/actors/constants.txt | 3 +++ 2 files changed, 18 insertions(+) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 2ba5fa01a..69dd89cd0 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1857,6 +1857,9 @@ enum SIX_Flags SIXF_ORIGINATOR = 0x00800000, SIXF_TRANSFERSPRITEFRAME = 0x01000000, SIXF_TRANSFERROLL = 0x02000000, + SIXF_ISTARGET = 0x04000000, + SIXF_ISMASTER = 0x08000000, + SIXF_ISTRACER = 0x10000000, }; static bool InitSpawnedItem(AActor *self, AActor *mo, int flags) @@ -2014,6 +2017,18 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags) mo->roll = self->roll; } + if (flags & SIXF_ISTARGET) + { + self->target = mo; + } + if (flags & SIXF_ISMASTER) + { + self->master = mo; + } + if (flags & SIXF_ISTRACER) + { + self->tracer = mo; + } return true; } diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index 1ee6c96c9..96877a266 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -74,6 +74,9 @@ const int SXF_NOPOINTERS = 1 << 22; const int SXF_ORIGINATOR = 1 << 23; const int SXF_TRANSFERSPRITEFRAME = 1 << 24; const int SXF_TRANSFERROLL = 1 << 25; +const int SXF_ISTARGET = 1 << 26, +const int SXF_ISMASTER = 1 << 27, +const int SXF_ISTRACER = 1 << 28, // Flags for A_Chase const int CHF_FASTCHASE = 1; From e7aa5c690a4c5c653c363e8a2a6891f953b599f3 Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Mon, 10 Aug 2015 06:48:24 -0500 Subject: [PATCH 5/9] Minor oversight... --- wadsrc/static/actors/constants.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index 96877a266..04ed6f1fc 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -74,9 +74,9 @@ const int SXF_NOPOINTERS = 1 << 22; const int SXF_ORIGINATOR = 1 << 23; const int SXF_TRANSFERSPRITEFRAME = 1 << 24; const int SXF_TRANSFERROLL = 1 << 25; -const int SXF_ISTARGET = 1 << 26, -const int SXF_ISMASTER = 1 << 27, -const int SXF_ISTRACER = 1 << 28, +const int SXF_ISTARGET = 1 << 26; +const int SXF_ISMASTER = 1 << 27; +const int SXF_ISTRACER = 1 << 28; // Flags for A_Chase const int CHF_FASTCHASE = 1; From cac600733f8383c521e78555e79d25c2042de20e Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Mon, 10 Aug 2015 20:45:18 -0500 Subject: [PATCH 6/9] - Added Remove console command. --- src/d_net.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++ src/d_protocol.h | 1 + src/p_interaction.cpp | 19 +++++++++++++++++ 3 files changed, 68 insertions(+) diff --git a/src/d_net.cpp b/src/d_net.cpp index bc5ccdba9..66b8c5dc3 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -2082,6 +2082,33 @@ static int KillAll(const PClass *cls) } return killcount; +} + +static int RemoveClass(const PClass *cls) +{ + AActor *actor; + int removecount = 0; + bool player = false; + TThinkerIterator iterator(cls); + while ((actor = iterator.Next())) + { + if (actor->IsA(cls)) + { + // [MC]Do not remove LIVE players. + if (actor->IsKindOf(RUNTIME_CLASS(APlayerPawn)) && actor->player != NULL) + { + player = true; + continue; + } + removecount++; + actor->ClearCounters(); + actor->Destroy(); + } + } + if (player) + Printf("Cannot remove live players!\n"); + return removecount; + } // [RH] Execute a special "ticcmd". The type byte should // have already been read, and the stream is positioned @@ -2555,6 +2582,27 @@ void Net_DoCommand (int type, BYTE **stream, int player) } break; + case DEM_REMOVE: + { + char *classname = ReadString(stream); + int removecount = 0; + const PClass *cls = PClass::FindClass(classname); + if (cls != NULL && cls->ActorInfo != NULL) + { + removecount = RemoveClass(cls); + const PClass *cls_rep = cls->GetReplacement(); + if (cls != cls_rep) + { + removecount += RemoveClass(cls_rep); + } + Printf("Removed %d actors of type %s.\n", removecount, classname); + } + else + { + Printf("%s is not an actor class.\n", classname); + } + } + break; case DEM_CONVREPLY: case DEM_CONVCLOSE: diff --git a/src/d_protocol.h b/src/d_protocol.h index 8b6e777d5..73b042470 100644 --- a/src/d_protocol.h +++ b/src/d_protocol.h @@ -164,6 +164,7 @@ enum EDemoCommand DEM_RUNNAMEDSCRIPT, // 65 String: Script name, Byte: Arg count + Always flag; each arg is a 4-byte int DEM_REVERTCAMERA, // 66 DEM_SETSLOTPNUM, // 67 Byte: player number, the rest is the same as DEM_SETSLOT + DEM_REMOVE, // 68 }; // The following are implemented by cht_DoCheat in m_cheat.cpp diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index cbbd87978..276a88c75 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1841,3 +1841,22 @@ CCMD (kill) } C_HideConsole (); } + +CCMD(remove) +{ + if (argv.argc() == 2) + { + if (CheckCheatmode()) + return; + + Net_WriteByte(DEM_REMOVE); + Net_WriteString(argv[1]); + C_HideConsole(); + } + else + { + Printf("Usage: remove \n"); + return; + } + +} \ No newline at end of file From 9c24e9ac71abeb892d5ca47fff9d2093757b5349 Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Tue, 11 Aug 2015 06:53:28 -0500 Subject: [PATCH 7/9] - Removed the check for APlayerPawn and just went with player checking alone. - Updated the savever, demogameversion, and mindemoversion. --- src/d_net.cpp | 3 ++- src/version.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/d_net.cpp b/src/d_net.cpp index 66b8c5dc3..e6b5713f2 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -2095,7 +2095,7 @@ static int RemoveClass(const PClass *cls) if (actor->IsA(cls)) { // [MC]Do not remove LIVE players. - if (actor->IsKindOf(RUNTIME_CLASS(APlayerPawn)) && actor->player != NULL) + if (actor->player != NULL) { player = true; continue; @@ -2728,6 +2728,7 @@ void Net_SkipCommand (int type, BYTE **stream) case DEM_SUMMONFRIEND: case DEM_SUMMONFOE: case DEM_SUMMONMBF: + case DEM_REMOVE: case DEM_SPRAY: case DEM_MORPHEX: case DEM_KILLCLASSCHEAT: diff --git a/src/version.h b/src/version.h index 3d28dd2ac..913c9bd18 100644 --- a/src/version.h +++ b/src/version.h @@ -61,11 +61,11 @@ const char *GetVersionString(); // Protocol version used in demos. // Bump it if you change existing DEM_ commands or add new ones. // Otherwise, it should be safe to leave it alone. -#define DEMOGAMEVERSION 0x21B +#define DEMOGAMEVERSION 0x21C // Minimum demo version we can play. // Bump it whenever you change or remove existing DEM_ commands. -#define MINDEMOVERSION 0x21B +#define MINDEMOVERSION 0x21C // SAVEVER is the version of the information stored in level snapshots. // Note that SAVEVER is not directly comparable to VERSION. @@ -76,7 +76,7 @@ const char *GetVersionString(); // Use 4500 as the base git save version, since it's higher than the // SVN revision ever got. -#define SAVEVER 4523 +#define SAVEVER 4524 #define SAVEVERSTRINGIFY2(x) #x #define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x) From b06770cb92d16c3b7a9cacbeba11c20968e48f1c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 11 Aug 2015 17:12:16 +0200 Subject: [PATCH 8/9] - fixed: A_Respawn did not reset the actor's radius. --- src/thingdef/thingdef_codeptr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 69dd89cd0..d09ad6d6e 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -3017,6 +3017,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Respawn) fixed_t oldz = self->z; self->flags |= MF_SOLID; self->height = self->GetDefault()->height; + self->radius = self->GetDefault()->radius; CALL_ACTION(A_RestoreSpecialPosition, self); if (flags & RSF_TELEFRAG) From 2ed3cec4db39dfb6762830a09d4224aaf9969edc Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 11 Aug 2015 22:30:29 +0200 Subject: [PATCH 9/9] - externalized strings from Raven intermission screen. --- src/wi_stuff.cpp | 8 ++++---- wadsrc/static/language.enu | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/wi_stuff.cpp b/src/wi_stuff.cpp index 02492f272..8119d3802 100644 --- a/src/wi_stuff.cpp +++ b/src/wi_stuff.cpp @@ -1959,9 +1959,9 @@ void WI_drawStats (void) } else { - screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 65, "KILLS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); - screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 90, "ITEMS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); - screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 115, "SECRETS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE); + screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 65, GStrings("TXT_IMKILLS"), DTA_Clean, true, DTA_Shadow, true, TAG_DONE); + screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 90, GStrings("TXT_IMITEMS"), DTA_Clean, true, DTA_Shadow, true, TAG_DONE); + screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 115, GStrings("TXT_IMSECRETS"), DTA_Clean, true, DTA_Shadow, true, TAG_DONE); int countpos = gameinfo.gametype==GAME_Strife? 285:270; if (sp_state >= 2) @@ -1978,7 +1978,7 @@ void WI_drawStats (void) } if (sp_state >= 8) { - screen->DrawText (BigFont, CR_UNTRANSLATED, 85, 160, "TIME", + screen->DrawText (BigFont, CR_UNTRANSLATED, 85, 160, GStrings("TXT_IMTIME"), DTA_Clean, true, DTA_Shadow, true, TAG_DONE); WI_drawTime (249, 160, cnt_time); if (wi_showtotaltime) diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index a01a03559..bdefa1b86 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -1281,6 +1281,14 @@ TXT_LEADBOOTSOFF = "LEAD BOOTS OFF"; TXT_LIGHTER = "You feel lighter"; TXT_GRAVITY = "Gravity weighs you down"; +// Raven intermission + +TXT_IMKILLS = "KILLS"; +TXT_IMITEMS = "ITEMS"; +TXT_IMSECRETS = "SECRETS"; +TXT_IMTIME = "TIME"; + + RAVENQUITMSG = "ARE YOU SURE YOU WANT TO QUIT?"; // Hexen strings