From f3441764dfddedb7a8f0fa9c4c0189ce2b220929 Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Fri, 21 May 2010 13:30:18 +0000 Subject: [PATCH] new smg spread git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4970 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/server.h | 2 +- source/src/weapon.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/src/server.h b/source/src/server.h index a5f4ca1c..81228fc3 100644 --- a/source/src/server.h +++ b/source/src/server.h @@ -396,7 +396,7 @@ guninfo guns[NUMGUNS] = { "pistol", S_PISTOL, S_RPISTOL, 1400, 160, 18, 0, 0, 55, 10, 8, 6, 5, 6, 35, 58, 125, 1, false }, { "rifle", S_RIFLE, S_RRIFLE, 1950, 840, 50, 0, 0, 20, 50, 10, 4, 4, 10, 60, 60, 150, 1, false }, { "shotgun", S_SHOTGUN, S_RSHOTGUN, 2400, 1000, 5, 0, 0, 1, 35, 7, 9, 9, 10, 115, 115, 150, 1, false }, - { "subgun", S_SUBGUN, S_RSUBGUN, 1650, 80, 15, 0, 0, 70, 15, 30, 1, 2, 4, 15, 40, 175, 1, true }, + { "subgun", S_SUBGUN, S_RSUBGUN, 1650, 80, 15, 0, 0, 20, 15, 30, 1, 2, 4, 15, 40, 175, 1, true }, { "sniper", S_SNIPER, S_RSNIPER, 1950, 1500, 80, 0, 0, 60, 50, 5, 4, 4, 10, 85, 85, 100, 1, false }, { "assault", S_ASSAULT, S_RASSAULT, 2000, 120, 24, 0, 0, 20, 40, 20, 0, 2, 2, 23, 50, 125, 1, true }, { "grenade", S_NULL, S_NULL, 1000, 650, 200, 20, 6, 1, 1, 1, 3, 1, 0, 0, 0, 0, 3, false }, diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 74fa3541..ff532ecb 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -1049,6 +1049,7 @@ bool shotgun::selectable() { return weapon::selectable() && !m_noprimary && this subgun::subgun(playerent *owner) : gun(owner, GUN_SUBGUN) {} bool subgun::selectable() { return weapon::selectable() && !m_noprimary && this == owner->primweap; } +int subgun::dynspread() { return min(info.spread * (shots - 1), info.spread * 5); } // sniperrifle @@ -1072,7 +1073,7 @@ bool sniperrifle::reload() return r; } -#define SCOPESETTLETIME 100 +#define SCOPESETTLETIME 180 int sniperrifle::dynspread() { if(scoped) @@ -1124,7 +1125,7 @@ bool rifle::selectable() { return weapon::selectable() && !m_noprimary && this = assaultrifle::assaultrifle(playerent *owner) : gun(owner, GUN_ASSAULT) {} -int assaultrifle::dynspread() { return shots > 3 ? 70 : info.spread; } +int assaultrifle::dynspread() { return shots > 3 ? info.spread * 3 : info.spread; } float assaultrifle::dynrecoil() { return info.recoil + (rnd(8)*-0.01f); } bool assaultrifle::selectable() { return weapon::selectable() && !m_noprimary && this == owner->primweap; }