Question: Recoil Numbers: What do they mean?

General discussion of the Project Reality: BF2 modification.
Post Reply
Wolfe
Posts: 1057
Joined: 2007-03-06 03:15

Question: Recoil Numbers: What do they mean?

Post by Wolfe »

What exactly does the last set of numbers mean (in bold)?

ObjectTemplate.recoil.recoilForceUp CRD_UNIFORM/1/2/3
ObjectTemplate.recoil.recoilForceLeftRight CRD_UNIFORM/4/5/6

It seems like...

1,2 = Vertical recoil, 50% of the time. A (+) number causes "up" recoil and a (-) number causes "down" recoil.

3 = ? Not sure what this does..

4,5 = Horizontal recoil, 50% of the time. A (+) number causes "left" recoil and a (-) number causes "right" recoil.

6 = ? Not sure what this does...


--------

Could someone clarify this and/or direct me to a thread that gives the answer?
Wolfe
Posts: 1057
Joined: 2007-03-06 03:15

Re: Question: Recoil Numbers: What do they mean?

Post by Wolfe »

Definitely something more than nothing. Thanks for that link.
nedlands1
Posts: 1467
Joined: 2006-05-28 09:50

Re: Question: Recoil Numbers: What do they mean?

Post by nedlands1 »

The final, fourth argument is a boolean, and can affect the sign of this computed number. Specifically, if this argument is 1 (true), then there is a 50/50 chance that the computed number will be negated. If 0 (false), no negation "coin-flip" takes place.
In effect it looks like the final number is useful if you want a gap in your values (eg. ObjectTemplate.recoil.recoilForceUp CRD_UNIFORM/30/15/1 will result in muzzle climb of 30 ≤ X ≤ 15 or -15 ≥ X ≥ -30, where X is the amount of muzzle climb in degrees (or "BF2 degrees" as I cannot quite remember if it applies here, but I think it doesn't)).
Image
Wolfe
Posts: 1057
Joined: 2007-03-06 03:15

Re: Question: Recoil Numbers: What do they mean?

Post by Wolfe »

From MDT: CRD_NORMAL distribution is a classic bell curve shape. The second argument is the mean, the average value, and the third argument is the variance, how fast the distribution curve drops off into its bell shape.

But when using CRD_NONE, it only returns the first value.. then both the second and third arguments do nothing.
Post Reply

Return to “PR:BF2 General Discussion”