mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
balance fixes
This commit is contained in:
parent
e4304d5c90
commit
7bf877d252
|
@ -9,6 +9,7 @@ struct weapon {
|
||||||
int meleereach = meleereach@1
|
int meleereach = meleereach@1
|
||||||
int ammoregentime = ammoregentime@1
|
int ammoregentime = ammoregentime@1
|
||||||
int maxammo = maxammo@1
|
int maxammo = maxammo@1
|
||||||
|
int costammo = costammo@1
|
||||||
int duration = duration@1
|
int duration = duration@1
|
||||||
int movetime = movetime@1
|
int movetime = movetime@1
|
||||||
int velocity = velocity@1
|
int velocity = velocity@1
|
||||||
|
|
|
@ -324,6 +324,7 @@ weapons {
|
||||||
muzzleoffsetx 50.0
|
muzzleoffsetx 50.0
|
||||||
muzzleoffsety 6.0
|
muzzleoffsety 6.0
|
||||||
maxammo 10
|
maxammo 10
|
||||||
|
costammo 1
|
||||||
recoil 10
|
recoil 10
|
||||||
firedelay 100
|
firedelay 100
|
||||||
muzzleduration 5
|
muzzleduration 5
|
||||||
|
@ -349,6 +350,7 @@ weapons {
|
||||||
muzzleoffsetx 0.0
|
muzzleoffsetx 0.0
|
||||||
muzzleoffsety 0.0
|
muzzleoffsety 0.0
|
||||||
maxammo 10
|
maxammo 10
|
||||||
|
costammo 1
|
||||||
recoil 10
|
recoil 10
|
||||||
firedelay 600
|
firedelay 600
|
||||||
muzzleduration 0
|
muzzleduration 0
|
||||||
|
@ -377,6 +379,7 @@ weapons {
|
||||||
muzzleoffsetx 70.0
|
muzzleoffsetx 70.0
|
||||||
muzzleoffsety 6.0
|
muzzleoffsety 6.0
|
||||||
maxammo 10
|
maxammo 10
|
||||||
|
costammo 2
|
||||||
recoil 10
|
recoil 10
|
||||||
firedelay 600
|
firedelay 600
|
||||||
muzzleduration 5
|
muzzleduration 5
|
||||||
|
@ -402,6 +405,7 @@ weapons {
|
||||||
muzzleoffsetx 0.0
|
muzzleoffsetx 0.0
|
||||||
muzzleoffsety 0.0
|
muzzleoffsety 0.0
|
||||||
maxammo 10
|
maxammo 10
|
||||||
|
costammo 0
|
||||||
recoil 10
|
recoil 10
|
||||||
firedelay 150
|
firedelay 150
|
||||||
muzzleduration 0
|
muzzleduration 0
|
||||||
|
@ -409,7 +413,7 @@ weapons {
|
||||||
offsetx 4.0
|
offsetx 4.0
|
||||||
offsety -20.0
|
offsety -20.0
|
||||||
meleedamage 1
|
meleedamage 1
|
||||||
meleereach 25
|
meleereach 40
|
||||||
ammoregentime 0
|
ammoregentime 0
|
||||||
duration -1
|
duration -1
|
||||||
movetime 0
|
movetime 0
|
||||||
|
@ -426,6 +430,7 @@ weapons {
|
||||||
muzzleoffsetx 0.0
|
muzzleoffsetx 0.0
|
||||||
muzzleoffsety 0.0
|
muzzleoffsety 0.0
|
||||||
maxammo 10
|
maxammo 10
|
||||||
|
costammo 1
|
||||||
recoil 10
|
recoil 10
|
||||||
firedelay 100
|
firedelay 100
|
||||||
muzzleduration 0
|
muzzleduration 0
|
||||||
|
@ -453,6 +458,7 @@ weapons {
|
||||||
muzzleoffsetx 40.0
|
muzzleoffsetx 40.0
|
||||||
muzzleoffsety -4.0
|
muzzleoffsety -4.0
|
||||||
maxammo 0
|
maxammo 0
|
||||||
|
costammo 0
|
||||||
recoil 0
|
recoil 0
|
||||||
firedelay 800
|
firedelay 800
|
||||||
muzzleduration 0
|
muzzleduration 0
|
||||||
|
|
|
@ -731,7 +731,7 @@ void player::try_respawn()
|
||||||
weapons[WEAPON_HAMMER].ammo = -1;
|
weapons[WEAPON_HAMMER].ammo = -1;
|
||||||
weapons[WEAPON_GUN].got = true;
|
weapons[WEAPON_GUN].got = true;
|
||||||
weapons[WEAPON_GUN].ammo = data->weapons[active_weapon].maxammo;
|
weapons[WEAPON_GUN].ammo = data->weapons[active_weapon].maxammo;
|
||||||
|
|
||||||
active_weapon = WEAPON_GUN;
|
active_weapon = WEAPON_GUN;
|
||||||
reload_timer = 0;
|
reload_timer = 0;
|
||||||
|
|
||||||
|
@ -911,7 +911,8 @@ int player::handle_weapons()
|
||||||
create_sound(pos, SOUND_ROCKET_FIRE);
|
create_sound(pos, SOUND_ROCKET_FIRE);
|
||||||
break;
|
break;
|
||||||
case WEAPON_SHOTGUN:
|
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);
|
float a = get_angle(direction);
|
||||||
a += i*0.075f;
|
a += i*0.075f;
|
||||||
|
@ -922,7 +923,7 @@ int player::handle_weapons()
|
||||||
//vec2(cosf(a), sinf(a))*20.0f,
|
//vec2(cosf(a), sinf(a))*20.0f,
|
||||||
server_tickspeed()/3,
|
server_tickspeed()/3,
|
||||||
this,
|
this,
|
||||||
1, 0, 0, -1, WEAPON_SHOTGUN);
|
2, 0, 0, -1, WEAPON_SHOTGUN);
|
||||||
}
|
}
|
||||||
create_sound(pos, SOUND_SHOTGUN_FIRE);
|
create_sound(pos, SOUND_SHOTGUN_FIRE);
|
||||||
break;
|
break;
|
||||||
|
@ -935,7 +936,7 @@ int player::handle_weapons()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
weapons[active_weapon].ammo--;
|
weapons[active_weapon].ammo -= max(1, weapons[active_weapon].ammocost);
|
||||||
attack_tick = server_tick();
|
attack_tick = server_tick();
|
||||||
reload_timer = data->weapons[active_weapon].firedelay * server_tickspeed() / 1000;
|
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);
|
l = 1-clamp((l-innerradius)/(radius-innerradius), 0.0f, 1.0f);
|
||||||
float dmg = 6 * l;
|
float dmg = 6 * l;
|
||||||
if((int)dmg)
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,6 +208,7 @@ public:
|
||||||
{
|
{
|
||||||
int ammoregenstart;
|
int ammoregenstart;
|
||||||
int ammo;
|
int ammo;
|
||||||
|
int ammocost;
|
||||||
bool got;
|
bool got;
|
||||||
} weapons[NUM_WEAPONS];
|
} weapons[NUM_WEAPONS];
|
||||||
int active_weapon;
|
int active_weapon;
|
||||||
|
|
Loading…
Reference in a new issue