From 333ef105f7e4a4e726fc51b863929a5b9ff6416d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 27 Sep 2007 11:30:23 +0000 Subject: [PATCH] - Fixed: The DECORATE expression evaluator was reading the operator token from the wrong variable in a few places resulting in incorrect calculations. - Fixed: MP3/OGG music always looped because the looping flag was always set when FMOD was called to play it. - Removed upper limit of 1 for an actor's gravity factor. - Fixed: A_VileTarget spawned the fire at coordinate (target->x, target->x) instead of (target->x, target->y). (Old vanilla bug.) SVN r550 (trunk) --- docs/rh-log.txt | 9 +++++++++ src/g_doom/a_archvile.cpp | 2 +- src/sound/music_stream.cpp | 2 +- src/thingdef/thingdef_exp.cpp | 4 ++-- src/thingdef/thingdef_properties.cpp | 4 ++-- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index dc4c74606..e76ba18fb 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,12 @@ +September 27, 2007 (Changes by Graf Zahl) +- Fixed: The DECORATE expression evaluator was reading the operator token + from the wrong variable in a few places resulting in incorrect calculations. +- Fixed: MP3/OGG music always looped because the looping flag was always + set when FMOD was called to play it. +- Removed upper limit of 1 for an actor's gravity factor. +- Fixed: A_VileTarget spawned the fire at coordinate (target->x, target->x) + instead of (target->x, target->y). (Old vanilla bug.) + September 26, 2007 (Changes by Graf Zahl) - Fixed: F_StartFinale shouldn't get the information if the game is about to end from level.nextmap. For example, this check is wrong for a secret diff --git a/src/g_doom/a_archvile.cpp b/src/g_doom/a_archvile.cpp index 6c0849d6f..4b2803ae1 100644 --- a/src/g_doom/a_archvile.cpp +++ b/src/g_doom/a_archvile.cpp @@ -75,7 +75,7 @@ void A_VileTarget (AActor *actor) A_FaceTarget (actor); - fog = Spawn ("ArchvileFire", actor->target->x, actor->target->x, + fog = Spawn ("ArchvileFire", actor->target->x, actor->target->y, actor->target->z, ALLOW_REPLACE); actor->tracer = fog; diff --git a/src/sound/music_stream.cpp b/src/sound/music_stream.cpp index edbf8d58b..6c64343a4 100644 --- a/src/sound/music_stream.cpp +++ b/src/sound/music_stream.cpp @@ -56,7 +56,7 @@ StreamSong::~StreamSong () StreamSong::StreamSong (const char *filename_or_data, int offset, int len) { - m_Stream = GSnd->OpenStream (filename_or_data, SoundStream::Loop, offset, len); + m_Stream = GSnd->OpenStream (filename_or_data, m_Looping? SoundStream::Loop : 0, offset, len); } bool StreamSong::IsPlaying () diff --git a/src/thingdef/thingdef_exp.cpp b/src/thingdef/thingdef_exp.cpp index 13df506d1..5b849acfa 100644 --- a/src/thingdef/thingdef_exp.cpp +++ b/src/thingdef/thingdef_exp.cpp @@ -563,7 +563,7 @@ static ExpData *ParseExpressionF (const PClass *cls) int token = sc_TokenType; ExpData *right = ParseExpressionE (cls); ExpData *data = new ExpData; - data->Type = token == '<' ? EX_LT : sc_TokenType == '>' ? EX_GT : sc_TokenType == TK_Leq? EX_LE : EX_GE; + data->Type = token == '<' ? EX_LT : token == '>' ? EX_GT : token == TK_Leq? EX_LE : EX_GE; data->Children[0] = tmp; data->Children[1] = right; data->EvalConst (cls); @@ -620,7 +620,7 @@ static ExpData *ParseExpressionC (const PClass *cls) int token = sc_TokenType; ExpData *right = ParseExpressionB (cls); ExpData *data = new ExpData; - data->Type = token == '*'? EX_Mul : sc_TokenType == '/'? EX_Div : EX_Mod; + data->Type = token == '*'? EX_Mul : token == '/'? EX_Div : EX_Mod; data->Children[0] = tmp; data->Children[1] = right; data->EvalConst (cls); diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index c85e6144a..4ef1dbf8f 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -1647,8 +1647,8 @@ static void ActorGravity (AActor *defaults, Baggage &bag) { SC_MustGetFloat (); - if (sc_Float < 0.f || sc_Float > 1.f) - SC_ScriptError ("Gravity must be in the range [0,1]"); + if (sc_Float < 0.f) + SC_ScriptError ("Gravity must not be negative."); defaults->gravity = FLOAT2FIXED (sc_Float);