mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Add fire delay tunings
This commit is contained in:
parent
62a1a36fa2
commit
2b32b4a18a
|
@ -106,6 +106,7 @@ enum
|
|||
VERSION_DDNET_RCONPROTECT = 408,
|
||||
VERSION_DDNET_ANTIPING_PROJECTILE = 604,
|
||||
VERSION_DDNET_HOOKDURATION_TUNE = 607,
|
||||
VERSION_DDNET_FIREDELAY_TUNE = 701,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -579,7 +579,14 @@ void CCharacter::FireWeapon()
|
|||
m_aWeapons[m_Core.m_ActiveWeapon].m_Ammo--;*/
|
||||
|
||||
if(!m_ReloadTimer)
|
||||
m_ReloadTimer = g_pData->m_Weapons.m_aId[m_Core.m_ActiveWeapon].m_Firedelay * Server()->TickSpeed() / 1000;
|
||||
{
|
||||
float FireDelay;
|
||||
if (!m_TuneZone)
|
||||
GameServer()->Tuning()->Get(38 + m_Core.m_ActiveWeapon, &FireDelay);
|
||||
else
|
||||
GameServer()->TuningList()[m_TuneZone].Get(38 + m_Core.m_ActiveWeapon, &FireDelay);
|
||||
m_ReloadTimer = FireDelay * Server()->TickSpeed() / 1000;
|
||||
}
|
||||
}
|
||||
|
||||
void CCharacter::HandleWeapons()
|
||||
|
|
|
@ -520,6 +520,8 @@ void CGameContext::SendTuningParams(int ClientID, int Zone)
|
|||
last = 33;
|
||||
else if (m_apPlayers[ClientID] && m_apPlayers[ClientID]->m_ClientVersion < VERSION_DDNET_HOOKDURATION_TUNE)
|
||||
last = 37;
|
||||
else if (m_apPlayers[ClientID] && m_apPlayers[ClientID]->m_ClientVersion < VERSION_DDNET_FIREDELAY_TUNE)
|
||||
last = 38;
|
||||
|
||||
for(unsigned i = 0; i < last; i++)
|
||||
{
|
||||
|
|
|
@ -52,4 +52,11 @@ MACRO_TUNING_PARAM(ShotgunStrength, shotgun_strength, 10.0f)
|
|||
MACRO_TUNING_PARAM(ExplosionStrength, explosion_strength, 6.0f)
|
||||
MACRO_TUNING_PARAM(HammerStrength, hammer_strength, 1.0f)
|
||||
MACRO_TUNING_PARAM(HookDuration, hook_duration, 1.25f)
|
||||
|
||||
MACRO_TUNING_PARAM(HammerFireDelay, hammer_fire_delay, 125)
|
||||
MACRO_TUNING_PARAM(GunFireDelay, gun_fire_delay, 125)
|
||||
MACRO_TUNING_PARAM(ShotgunFireDelay, shotgun_fire_delay, 500)
|
||||
MACRO_TUNING_PARAM(GrenadeFireDelay, grenade_fire_delay, 500)
|
||||
MACRO_TUNING_PARAM(RifleFireDelay, rifle_fire_delay, 800)
|
||||
MACRO_TUNING_PARAM(NinjaFireDelay, ninja_fire_delay, 800)
|
||||
#endif
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
#define GAME_VERSION "0.6.3, 7.0"
|
||||
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
|
||||
static const char GAME_RELEASE_VERSION[8] = "7.0";
|
||||
#define CLIENT_VERSIONNR 700
|
||||
#define CLIENT_VERSIONNR 701
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue