Makke's suggestion: make the shotgun longer range

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4880 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-05-16 15:49:29 +00:00
parent 4f33845a16
commit e8c97abd51
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -59,6 +59,7 @@ static inline float round(float x) { return floor(x + 0.5f); }
#define clamp(a,b,c) (max(b, min(a, c)))
#define rnd(max) (rand()%(max))
#define rnd_2x(max) (rand()%(max)+rand()%(max))
#define detrnd(s, x) ((int)(((((uint)(s))*1103515245+12345)>>16)%(x)))
#define loop(v,m) for(int v = 0; v<int(m); v++)
+1 -1
View File
@@ -143,7 +143,7 @@ void createrays(vec &from, vec &to) // create random spread of rays
float f = to.dist(from)*SGSPREAD/1000;
loopi(SGRAYS)
{
#define RNDD (rnd(101)-50)*f
#define RNDD (rnd_2x(51)-50)*f // With change (rnd_2x in place of rnd) the spread does not change, but there will be more shots in the middle
vec r(RNDD, RNDD, RNDD);
sg[i] = to;
sg[i].add(r);