weapon changes (sg damage, higher sniper damage, lower (and static) smg damage , lower AR magsize) + win32 binaries

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6744 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2011-12-31 13:38:32 +00:00
parent cbe6fce47b
commit 792fa3b58a
4 changed files with 7 additions and 17 deletions
+2 -2
View File
@@ -53,8 +53,8 @@ enum { GUN_KNIFE = 0, GUN_PISTOL, GUN_CARBINE, GUN_SHOTGUN, GUN_SUBGUN, GUN_SNIP
#define SGMAXDMGLOC 84
#define SGBONUSDIST 80
#define SGSEGDMG_O 3
#define SGSEGDMG_M 4
#define SGSEGDMG_C 5
#define SGSEGDMG_M 6
#define SGSEGDMG_C 4
#define SGSPREAD 2.25
#define EXPDAMRAD 10
+2 -2
View File
@@ -459,7 +459,7 @@ itemstat ammostats[NUMGUNS] =
{ 14, 28, 21, S_ITEMAMMO }, // shotgun
{ 60, 90, 90, S_ITEMAMMO }, // subgun
{ 10, 20, 15, S_ITEMAMMO }, // sniper
{ 40, 60, 60, S_ITEMAMMO }, // assault
{ 30, 45, 45, S_ITEMAMMO }, // assault
{ 30, 45, 75, S_ITEMAMMO }, // cpistol
{ 1, 0, 3, S_ITEMAMMO }, // grenade
{100, 0, 100, S_ITEMAKIMBO} // akimbo : CHANGED due to pistol changes
@@ -486,7 +486,7 @@ guninfo guns[NUMGUNS] =
{ "shotgun", S_SHOTGUN, S_RSHOTGUN, 2400, 1000, 1, 0, 0, 1, 35, 7, 9, 9, 10, 140, 140, 125, 1, false }, // CAUTION dmg only sane for server!
{ "subgun", S_SUBGUN, S_RSUBGUN, 1650, 80, 15, 0, 0, 45, 15, 30, 1, 2, 4, 30, 50, 188, 1, true },
{ "sniper", S_SNIPER, S_RSNIPER, 1950, 1500, 80, 0, 0, 50, 50, 5, 4, 4, 10, 85, 85, 100, 1, false }, // 2011may22:ft: dmg 82->80, spread 50
{ "assault", S_ASSAULT, S_RASSAULT, 2000, 120, 22, 0, 0, 20, 40, 20, 0, 2, 2, 22, 55, 115, 1, true }, // 2011jan17:ft: 24=>22
{ "assault", S_ASSAULT, S_RASSAULT, 2000, 120, 22, 0, 0, 20, 40, 15, 0, 2, 2, 22, 55, 115, 1, true }, // 2011jan17:ft: 24=>22
{ "cpistol", S_PISTOL, S_RPISTOL, 1400, 120, 19, 0, 0, 35, 10, 15, 6, 5, 6, 35, 58, 125, 1, false }, // temporary
{ "grenade", S_NULL, S_NULL, 1000, 650, 200, 20, 6, 1, 1, 1, 3, 1, 0, 0, 0, 0, 3, false },
{ "pistol", S_PISTOL, S_RAKIMBO, 1400, 80, 19, 0, 0, 50, 10, 20, 6, 5, 10, 10, 18, 115, 1, true },
+1 -1
View File
@@ -70,7 +70,7 @@ void processevent(client *c, shotevent &e)
totalrays += rays;
if(totalrays>maxrays) continue;
int damage = rays*guns[e.gun].damage+(e.gun==GUN_SUBGUN&&h.info);
int damage = rays*guns[e.gun].damage;
bool gib = false;
if(e.gun==GUN_KNIFE || (e.gun==GUN_SHOTGUN && rays==maxrays)) gib = true;
else if(e.gun==GUN_SNIPER) gib = h.info!=0;
+2 -12
View File
@@ -567,10 +567,6 @@ void shorten(vec &from, vec &target, float dist)
target.sub(from).mul(min(1.0f, dist)).add(from);
}
int timer4subgunDMGalt = 0;
bool flag4subgunDMGalt = true;
void raydamage(vec &from, vec &to, playerent *d)
{
int dam = d->weaponsel->info.damage;
@@ -628,6 +624,7 @@ void raydamage(vec &from, vec &to, playerent *d)
dmgreal = min(dmgreal, SGMAXDMGABS);
}
if(numhits) hitpush( dmgreal, o, d, from, to, d->weaponsel->type, dmgreal == SGMAXDMGABS, dmgreal);
if(d==player1) hitted = true;
hitscount+=numhits;
}
@@ -640,10 +637,9 @@ void raydamage(vec &from, vec &to, playerent *d)
{
case GUN_KNIFE: gib = true; break;
case GUN_SNIPER: if(hitzone==2) { dam *= 3; gib = true; }; break;
case GUN_SUBGUN: if(flag4subgunDMGalt) dam +=1; break;
default: break;
}
bool info = gib || (d->weaponsel->type==GUN_SUBGUN && flag4subgunDMGalt);
bool info = gib;
hitpush(dam, o, d, from, to, d->weaponsel->type, gib, info ? 1 : 0);
if(d==player1) hitted=true;
shorten(from, to, dist);
@@ -1167,11 +1163,6 @@ bool gun::attack(vec &targ)
if(!owner->attacking)
{
shots = 0;
if(type==GUN_SUBGUN)
{
if(lastmillis-timer4subgunDMGalt>=750) flag4subgunDMGalt = true; // 1st shot 16, 2nd 15, .. reset on "end burst" (timed)
if(!timer4subgunDMGalt) timer4subgunDMGalt = lastmillis;
}
checkautoreload();
return false;
}
@@ -1190,7 +1181,6 @@ bool gun::attack(vec &targ)
owner->lastattackweapon = this;
shots++;
if(type==GUN_SUBGUN) flag4subgunDMGalt = !flag4subgunDMGalt;
if(!info.isauto) owner->attacking = false;