So, I decided to flex my coding muscle and finish up this feature. It's got a few changes from the original version and some new additions since, so I'll go ahead and list all the stuff the patch adds:New Flags:
New A_RailAttack/A_CustomRailgun Parameters:
- RGF_FULLBRIGHT: Makes all spawned particles fullbright.
- range: Maximum distance (in map units, as fixed-point) the rail shot will travel before vanishing.
- duration: Lifetime of spawned particles, in tics. Default is 35, and a value of '0' means "use default."
- sparsity: Distance between individial particles. Implemented as a float multiplier, with 1.0 as the default.
- driftspeed: Speed at which particles "drift" away from their initial spawn point. Implemented as a float multiplier, with 1.0 as the default.
- spawnclass: Actor to spawn in place of trail particles. If non-null, the specified actor will be spaced sparsity units apart instead of the usual trail. Particle-specific properties such as duration, driftspeed, and rail color are naturally ignored in such a case.
There's still one thing missing: actor spawning doesn't yet respect maxdiff yet, but I haven't added that yet because I first want to play around with improving maxdiff's behavior a bit (which I see as a separate code submission altogether). Otherwise, this should be submit-worthy, parameter names subject to change of course. I've also cleaned up the code a bit since kg's patch, so there's no more passing the entire Flags variable to P_RailAttack or hiding the fullbright information in the color attribute of particle_t (it has its own variable in the struct now).
Anyhow, the patch:
The zip contains a TortoiseSVN .patch along with a test wad for the curious (based on kgsws's work). Let me know if there are any issues with it -- first time making a patch here but Tortoise makes it easy enough to hopefully be Xaserproof.
Thanks for kickstarting this, kgsws. Something I've been wanting to see for a while, myself.