From 06de8180590a081eceaef4808665e93afe88794d Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 11 Apr 2012 04:41:37 +0000 Subject: [PATCH] - Add Xaser's railgun fixes: * P_RailAttack's 'sparsity' was being ignored for particle core trails, and 'maxdiff' was ignored when spawning actors. * Fixed the persistent core issue. * Fixed. The default value for the new 'range' parameter was incorrectly set to zero, causing A_FireRailgun to emit a zero-length "rail." SVN r3551 (trunk) --- src/p_effect.cpp | 2 +- src/p_local.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/p_effect.cpp b/src/p_effect.cpp index 7edaf8120..07272370d 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -721,7 +721,7 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end } // Create the inner trail. - if (color2 != -1 && r_rail_trailsparsity > 0) + if (color2 != -1 && r_rail_trailsparsity > 0 && spawnclass == NULL) { FVector3 trail_step = step * r_rail_trailsparsity; int trail_steps = steps * r_rail_trailsparsity; diff --git a/src/p_local.h b/src/p_local.h index c64f66acd..26364a63b 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -461,7 +461,7 @@ void P_TraceBleed (int damage, fixed_t x, fixed_t y, fixed_t z, AActor *target, void P_TraceBleed (int damage, AActor *target, angle_t angle, int pitch); void P_TraceBleed (int damage, AActor *target, AActor *missile); // missile version void P_TraceBleed (int damage, AActor *target); // random direction version -void P_RailAttack (AActor *source, int damage, int offset, int color1 = 0, int color2 = 0, float maxdiff = 0, bool silent = false, const PClass *puff = NULL, bool pierce = true, angle_t angleoffset = 0, angle_t pitchoffset = 0, fixed_t distance = 0, bool fullbright = false, int duration = 35, float sparsity = 1.0, float drift = 1.0, const PClass *spawnclass = NULL); // [RH] Shoot a railgun +void P_RailAttack (AActor *source, int damage, int offset, int color1 = 0, int color2 = 0, float maxdiff = 0, bool silent = false, const PClass *puff = NULL, bool pierce = true, angle_t angleoffset = 0, angle_t pitchoffset = 0, fixed_t distance = 8192*FRACUNIT, bool fullbright = false, int duration = 35, float sparsity = 1.0, float drift = 1.0, const PClass *spawnclass = NULL); // [RH] Shoot a railgun bool P_HitFloor (AActor *thing); bool P_HitWater (AActor *thing, sector_t *sec, fixed_t splashx = FIXED_MIN, fixed_t splashy = FIXED_MIN, fixed_t splashz=FIXED_MIN, bool checkabove = false, bool alert = true); void P_CheckSplash(AActor *self, fixed_t distance); @@ -504,6 +504,7 @@ inline sector_t *P_PointInSector(fixed_t x, fixed_t y) // extern BYTE* rejectmatrix; // for fast sight rejection extern int* blockmaplump; // offsets in blockmap are from here + extern int* blockmap; extern int bmapwidth; extern int bmapheight; // in mapblocks