balance fixes

This commit is contained in:
Jakob Fries 2007-08-04 01:53:26 +00:00
parent e4304d5c90
commit 7bf877d252
4 changed files with 15 additions and 6 deletions

View file

@ -9,6 +9,7 @@ struct weapon {
int meleereach = meleereach@1
int ammoregentime = ammoregentime@1
int maxammo = maxammo@1
int costammo = costammo@1
int duration = duration@1
int movetime = movetime@1
int velocity = velocity@1

View file

@ -324,6 +324,7 @@ weapons {
muzzleoffsetx 50.0
muzzleoffsety 6.0
maxammo 10
costammo 1
recoil 10
firedelay 100
muzzleduration 5
@ -349,6 +350,7 @@ weapons {
muzzleoffsetx 0.0
muzzleoffsety 0.0
maxammo 10
costammo 1
recoil 10
firedelay 600
muzzleduration 0
@ -377,6 +379,7 @@ weapons {
muzzleoffsetx 70.0
muzzleoffsety 6.0
maxammo 10
costammo 2
recoil 10
firedelay 600
muzzleduration 5
@ -402,6 +405,7 @@ weapons {
muzzleoffsetx 0.0
muzzleoffsety 0.0
maxammo 10
costammo 0
recoil 10
firedelay 150
muzzleduration 0
@ -409,7 +413,7 @@ weapons {
offsetx 4.0
offsety -20.0
meleedamage 1
meleereach 25
meleereach 40
ammoregentime 0
duration -1
movetime 0
@ -426,6 +430,7 @@ weapons {
muzzleoffsetx 0.0
muzzleoffsety 0.0
maxammo 10
costammo 1
recoil 10
firedelay 100
muzzleduration 0
@ -453,6 +458,7 @@ weapons {
muzzleoffsetx 40.0
muzzleoffsety -4.0
maxammo 0
costammo 0
recoil 0
firedelay 800
muzzleduration 0

View file

@ -731,7 +731,7 @@ void player::try_respawn()
weapons[WEAPON_HAMMER].ammo = -1;
weapons[WEAPON_GUN].got = true;
weapons[WEAPON_GUN].ammo = data->weapons[active_weapon].maxammo;
active_weapon = WEAPON_GUN;
reload_timer = 0;
@ -911,7 +911,8 @@ int player::handle_weapons()
create_sound(pos, SOUND_ROCKET_FIRE);
break;
case WEAPON_SHOTGUN:
for(int i = -2; i <= 2; i++)
int shotspread = min(2, weapons[active_weapon].ammo);
for(int i = -shotspread; i <= shotspread; i++)
{
float a = get_angle(direction);
a += i*0.075f;
@ -922,7 +923,7 @@ int player::handle_weapons()
//vec2(cosf(a), sinf(a))*20.0f,
server_tickspeed()/3,
this,
1, 0, 0, -1, WEAPON_SHOTGUN);
2, 0, 0, -1, WEAPON_SHOTGUN);
}
create_sound(pos, SOUND_SHOTGUN_FIRE);
break;
@ -935,7 +936,7 @@ int player::handle_weapons()
break;
}
weapons[active_weapon].ammo--;
weapons[active_weapon].ammo -= max(1, weapons[active_weapon].ammocost);
attack_tick = server_tick();
reload_timer = data->weapons[active_weapon].firedelay * server_tickspeed() / 1000;
}
@ -1631,7 +1632,7 @@ void create_explosion(vec2 p, int owner, int weapon, bool bnodamage)
l = 1-clamp((l-innerradius)/(radius-innerradius), 0.0f, 1.0f);
float dmg = 6 * l;
if((int)dmg)
ents[i]->take_damage(forcedir*dmg*2, (int)dmg, owner, weapon);
ents[i]->take_damage(forcedir*dmg*2, (int)dmg/2, owner, weapon);
}
}
}

View file

@ -208,6 +208,7 @@ public:
{
int ammoregenstart;
int ammo;
int ammocost;
bool got;
} weapons[NUM_WEAPONS];
int active_weapon;