15 Jan 12, 04:03AM
(This post was last modified: 15 Jan 12, 04:08AM by Roflcopter.)
(15 Jan 12, 03:49AM)Ronald_Reagan Wrote: ...
Well, I don't think it's enough myself but it'd be far better. It would remove spray and pray shooting completely because a perfect aim would be rewarded better (even if not much) for shooting the center of a player. We could also fix the other issues along the way (non-circular distribution, no weird effects of integer arithmetic).
Here's some basic code that would achieve that
[SELECT ALL] Code:
#define randf 1.0*rand()/RAND_MAX
#define RNDD spread*randf*(randf-0.5)*f
vec r(RNDD, RNDD, RNDD);
to.add(r);
#undef RNDD
#undef randf
It has the same maximum spread but centers it better. It would be a nice compromise if spread is really seen as desirable.