From ac32bd72bb1324df2e4d1d18d9ec23f001296fbf Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 30 Jun 2008 23:30:06 +0000 Subject: [PATCH] - Added A_ClearReFire code pointer for weapons. Preferably A_WeaponReady should reset this counter but that can't be done due to unwanted side effects with existing weapons. - Changed the 'scale' variable in CVAR(turbo) to double because the calculations depended on the current floating point precision setting and only worked properly when set to 'precise' in VC++. SVN r1057 (trunk) --- docs/rh-log.txt | 8 ++++++++ src/codepointers.h | 1 + src/g_game.cpp | 2 +- src/p_pspr.cpp | 10 ++++++++++ src/textures/multipatchtexture.cpp | 7 ++++--- wadsrc/decorate/nativeclasses.txt | 1 + 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 40ae111d1..4080ed100 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,11 @@ +June 30, 2008 (Changes by Graf Zahl) +- Added A_ClearReFire code pointer for weapons. Preferably A_WeaponReady should + reset this counter but that can't be done due to unwanted side effects with + existing weapons. +- Changed the 'scale' variable in CVAR(turbo) to double because the calculations + depended on the current floating point precision setting and only worked properly + when set to 'precise' in VC++. + June 29, 2008 (Changes by Graf Zahl) - Changed: I_Error and I_FatalError now use ZDoom's internal string formatting code to process their messages. This was necessary to handle the %zu format diff --git a/src/codepointers.h b/src/codepointers.h index 63e18004d..edaf077c7 100644 --- a/src/codepointers.h +++ b/src/codepointers.h @@ -112,3 +112,4 @@ ACTOR(DamageMaster) ACTOR(DamageChildren) ACTOR(CheckForReload) ACTOR(ResetReloadCounter) +ACTOR(ClearReFire) diff --git a/src/g_game.cpp b/src/g_game.cpp index 9b28d939b..938a28991 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -217,7 +217,7 @@ CUSTOM_CVAR (Float, turbo, 100.f, 0) } else { - float scale = self * 0.01f; + double scale = self * 0.01; forwardmove[0] = (int)(normforwardmove[0]*scale); forwardmove[1] = (int)(normforwardmove[1]*scale); diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index 9a41a4502..284db1055 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -488,6 +488,16 @@ void A_ReFire (AActor *actor) } } +void A_ClearReFire(AActor *actor) +{ + player_t *player = actor->player; + + if (NULL != player) + { + player->refire = 0; + } +} + //--------------------------------------------------------------------------- // // PROC A_CheckReload diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index d5e33748d..dc018dd50 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -1011,9 +1011,10 @@ void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part) else if (sc.Compare("rotate")) { sc.MustGetNumber(); - if (sc.Number != 0 && sc.Number !=90 && sc.Number != 180 && sc.Number != -90) - { - sc.ScriptError("Rotation must be 0, 90, 180 or -90 degrees"); + sc.Number = (((sc.Number + 90)%360)-90); + if (sc.Number != 0 && sc.Number !=90 && sc.Number != 180 && sc.Number != -90) + { + sc.ScriptError("Rotation must be a multiple of 90 degrees."); } part.Rotate = (sc.Number / 90) & 3; } diff --git a/wadsrc/decorate/nativeclasses.txt b/wadsrc/decorate/nativeclasses.txt index ad3a421f6..d44760b56 100644 --- a/wadsrc/decorate/nativeclasses.txt +++ b/wadsrc/decorate/nativeclasses.txt @@ -212,6 +212,7 @@ class Inventory extends Actor action native A_BFGsound(); action native A_FireBFG(); action native A_ReFire(); + action native A_ClearReFire(); action native A_CheckReload(); action native A_GunFlash(); action native A_Saw(optional coerce sound fullsound, optional coerce sound hitsound, optional eval int damage, optional class pufftype);