RTCW Study - Spreadscale

Hi guys,

I've got hooked on browsing RTCW source code and decided to make a video about the nitty-gritty details that shape the game. I decided to start with the mechanisms that controls spreadscale (recoil) of RTCW guns.

In this video I experiment with shooting guns while trying to explain what makes them shoot more or less accurate. I think it's a great overview for experienced players the sake of completing the puzzles and should be pretty educational for others. Either way I invite the discussion!

https://www.youtube.com/watch?v=gSAL7SE9PWA&hd=1
Comments
6
nice, keep on doing it donka
avi


never really studied how the shooting mechanics are applied on rtcw but my guess its the same with et
first two bullets will be accurate even with mousemovement rest is more or less random pattern iirc
Why is it that way, i never really questioned it accept it as it is. u can notice similar behavior in quake

what caught my interest was the map design itself, if you run them down second by second u will notice that on a default positional setup its always 5sec till first contact

Kinda sad after all that hard work its time to throw evertyhing away, the slow death finaly came to an end after the gr8 devestation

Rip Enemy Territory where true legends wer born
About this line:

QuoteaimSpreadScaleAdd = 15 + rand() % 10;


You said "everything **** (couldn't understand) by 10 is going to be zero so this is kinda strange". This code is not so strange and does something very simple. In C the rand() function returns a (sort of) random integer between 0 and whatever is set for RAND_MAX. On that value it uses the modulus operator (%) which simply returns the remainder of whatever it is divided by. In this code it uses 10 so it will return the remainder of the rand() value divided by 10. So, for example if the rand() function returned 54378064, then "rand() % 10" would simply return the number 4. aimSpreadScaleAdd with this example rand() value would result in the value 19.

Basically what the code does is create an aimSpreadScaleAdd value that lies between 15 and 24, based on a random number (possible remainder values when something is divided by 10 are 0 to 9)
Cool good insight!
Parent
Back to top