From 3b4ed8d7cd48e35cd68d3bf06026cf25818449a6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 22 Jan 2016 00:54:09 +0100 Subject: [PATCH] - made A_SpawnParticle's fadestep parameter a fixed point value as well. --- src/thingdef/thingdef_codeptr.cpp | 4 ++-- wadsrc/static/actors/actor.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 22a0b8d10..171913e78 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2647,14 +2647,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnParticle) ACTION_PARAM_BOOL(fullbright, 8); ACTION_PARAM_FIXED(startalphaf, 9); ACTION_PARAM_INT(size, 10); - ACTION_PARAM_INT(fadestep, 11); + ACTION_PARAM_FIXED(fadestepf, 11); ACTION_PARAM_FIXED(accelx, 12); ACTION_PARAM_FIXED(accely, 13); ACTION_PARAM_FIXED(accelz, 14); BYTE startalpha = (BYTE)Scale(clamp(startalphaf, 0, FRACUNIT), 255, FRACUNIT); + int fadestep = fadestepf < 0? -1 : Scale(clamp(fadestepf, 0, FRACUNIT), 255, FRACUNIT); lifetime = clamp(lifetime, 0, 0xFF); // Clamp to byte - fadestep = clamp(fadestep, -1, 0xFF); // Clamp to byte inc. -1 (indicating automatic) size = clamp(size, 0, 0xFF); // Clamp to byte if (lifetime != 0) diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 093ace107..14925eb5a 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -234,7 +234,7 @@ ACTOR Actor native //: Thinker action native A_SetScale(float scalex, float scaley = 0, int ptr = AAPTR_DEFAULT); action native A_SetMass(int mass); action native A_SpawnDebris(class spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1); - action native A_SpawnParticle(float xoff, float yoff, float zoff, float velx, float vely, float velz, color color1, int lifetime, bool fullbright = false, float startalpha = 1, int size = 1, int fadestep = -1, float accelx = 0.0, float accely = 0.0, float accelz = 0.0); + action native A_SpawnParticle(float xoff, float yoff, float zoff, float velx, float vely, float velz, color color1, int lifetime, bool fullbright = false, float startalpha = 1, int size = 1, float fadestep = -1, float accelx = 0.0, float accely = 0.0, float accelz = 0.0); action native A_CheckSight(state label); action native A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false); action native A_DropInventory(class itemtype);