From c2bac9d2df3484c293b8631b81d7f615a48d9218 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 9 Oct 2013 21:29:28 -0500 Subject: [PATCH 1/3] Add WorldPanning flag for camera texture definitions. - To make camera textures pan in world units instead of texture units, you can now add "WorldPanning" at the end of the cameratexture definition in ANIMDEFS, after the "fit" specification. e.g. cameratexture CAMTEX 128 128 fit 64 64 worldpanning --- src/textures/animations.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/textures/animations.cpp b/src/textures/animations.cpp index aaf6d03d6..5a6f0729a 100644 --- a/src/textures/animations.cpp +++ b/src/textures/animations.cpp @@ -659,6 +659,17 @@ void FTextureManager::ParseCameraTexture(FScanner &sc) sc.UnGet (); } } + if (sc.GetString()) + { + if (sc.Compare("WorldPanning")) + { + viewer->bWorldPanning = true; + } + else + { + sc.UnGet(); + } + } viewer->SetScaledSize(fitwidth, fitheight); } From 637798c1b569ac572b3b7dd36f030b89b4463f70 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 9 Oct 2013 22:11:33 -0500 Subject: [PATCH 2/3] Add handling for +warp at the command line. - Command-line console commands are executed before a level is entered, so trying to use +warp to position yourself at a specific location will not work. We now specially handle this command so that it does work. --- src/c_dispatch.cpp | 9 ++++++++- src/d_main.cpp | 8 +++++++- src/doomstat.h | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/c_dispatch.cpp b/src/c_dispatch.cpp index 76b6e395d..2bd255405 100644 --- a/src/c_dispatch.cpp +++ b/src/c_dispatch.cpp @@ -627,7 +627,14 @@ void C_DoCommand (const char *cmd, int keynum) } else { - new DStoredCommand (com, beg); + if (len == 4 && strnicmp(beg, "warp", 4) == 0) + { + StoredWarp = beg; + } + else + { + new DStoredCommand (com, beg); + } } } else diff --git a/src/d_main.cpp b/src/d_main.cpp index 507938519..f0e7e7676 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -218,6 +218,7 @@ int NoWipe; // [RH] Allow wipe? (Needs to be set each time) bool singletics = false; // debug flag to cancel adaptiveness FString startmap; bool autostart; +FString StoredWarp; bool advancedemo; FILE *debugfile; event_t events[MAXEVENTS]; @@ -2081,7 +2082,7 @@ static void CheckCmdLine() { startmap = "&wt@01"; } - autostart = false; + autostart = StoredWarp.IsNotEmpty(); const char *val = Args->CheckValue ("-skill"); if (val) @@ -2529,6 +2530,11 @@ void D_DoomMain (void) if (demorecording) G_BeginRecording (startmap); G_InitNew (startmap, false); + if (StoredWarp.IsNotEmpty()) + { + AddCommandString(StoredWarp.LockBuffer()); + StoredWarp = NULL; + } } else { diff --git a/src/doomstat.h b/src/doomstat.h index 2819f1bf0..92ab5b8f8 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -59,6 +59,8 @@ extern FString startmap; // [RH] Actual map name now extern bool autostart; +extern FString StoredWarp; // [RH] +warp at the command line + // Selected by user. EXTERN_CVAR (Int, gameskill); extern int NextSkill; // [RH] Skill to use at next level load From 02514dc9b202e16b9551284a8625f72addd4d91d Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 9 Oct 2013 22:32:52 -0500 Subject: [PATCH 3/3] - Fixed: AFSwordMissile::DoSpecialDamage had a unique prototype so it would never actually be called. --- src/g_hexen/a_fighterquietus.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_hexen/a_fighterquietus.cpp b/src/g_hexen/a_fighterquietus.cpp index 0ba8abd6f..846b30281 100644 --- a/src/g_hexen/a_fighterquietus.cpp +++ b/src/g_hexen/a_fighterquietus.cpp @@ -58,12 +58,12 @@ class AFSwordMissile : public AActor { DECLARE_CLASS (AFSwordMissile, AActor) public: - int DoSpecialDamage(AActor *victim, AActor *source, int damage, FName damagetype); + int DoSpecialDamage(AActor *victim, int damage, FName damagetype); }; IMPLEMENT_CLASS (AFSwordMissile) -int AFSwordMissile::DoSpecialDamage(AActor *victim, AActor *source, int damage, FName damagetype) +int AFSwordMissile::DoSpecialDamage(AActor *victim, int damage, FName damagetype) { if (victim->player) {