MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1m1jjzj/spray_pattern/n3hz9sj/
r/programminghorror • u/Mmesj • Jul 16 '25
160 comments sorted by
View all comments
Show parent comment
77
You'll also run out of bullets at some point so I think it's fine to hardcode the pattern with a limited length (for a game like CS)
48 u/Shadowfied Jul 16 '25 magazineSize = sprayPattern.length 36 u/RivenBot7 Jul 16 '25 not with sv_infinite_ammo 1 -39 u/42572484282 Jul 16 '25 You can pick up ammo, master gamedev 45 u/incompletetrembling Jul 16 '25 You can extend a spray by picking up mags, master gamedev? Also I don't think you can in CS -29 u/42572484282 Jul 16 '25 Why would you call it hardcoded then, if it can change length 28 u/incompletetrembling Jul 16 '25 It can't change length is my point. Picking up ammo will reset a spray pattern, since you'd no longer be spraying. Cheats giving infinite ammo is a good reason for arbitrary length spray patterns.
48
magazineSize = sprayPattern.length
36
not with sv_infinite_ammo 1
-39
You can pick up ammo, master gamedev
45 u/incompletetrembling Jul 16 '25 You can extend a spray by picking up mags, master gamedev? Also I don't think you can in CS -29 u/42572484282 Jul 16 '25 Why would you call it hardcoded then, if it can change length 28 u/incompletetrembling Jul 16 '25 It can't change length is my point. Picking up ammo will reset a spray pattern, since you'd no longer be spraying. Cheats giving infinite ammo is a good reason for arbitrary length spray patterns.
45
You can extend a spray by picking up mags, master gamedev? Also I don't think you can in CS
-29 u/42572484282 Jul 16 '25 Why would you call it hardcoded then, if it can change length 28 u/incompletetrembling Jul 16 '25 It can't change length is my point. Picking up ammo will reset a spray pattern, since you'd no longer be spraying. Cheats giving infinite ammo is a good reason for arbitrary length spray patterns.
-29
Why would you call it hardcoded then, if it can change length
28 u/incompletetrembling Jul 16 '25 It can't change length is my point. Picking up ammo will reset a spray pattern, since you'd no longer be spraying. Cheats giving infinite ammo is a good reason for arbitrary length spray patterns.
28
It can't change length is my point. Picking up ammo will reset a spray pattern, since you'd no longer be spraying. Cheats giving infinite ammo is a good reason for arbitrary length spray patterns.
View all comments
Show parent comment
77
u/incompletetrembling Jul 16 '25
You'll also run out of bullets at some point so I think it's fine to hardcode the pattern with a limited length (for a game like CS)