m_pClient->m_aTuning
static float s_aWeaponsFireDelay[] = {
[WEAPON_HAMMER] = (float)1, // your real value here
[WEAPON_GUN] = (float)2,
[WEAPON_SHOTGUN] = (float)3,
[WEAPON_GRENADE] = (float)4,
[WEAPON_LASER] = (float)5,
[WEAPON_NINJA] = (float)6,
};
static_assert(NUM_WEAPONS == 6, "s_aWeaponsFireDelay has to be adapted to new weapons");
float Delay = Weapon >= 0 && Weapon < NUM_WEAPONS ? s_aWeaponsFireDelay[Weapon] : 1.0f;
static_assert(NUM_WEAPONS == std::size(s_aWeaponsFireDelay), "s_aWeaponsFireDelay has to be adapted to new weapons");
static float s_aWeaponsFireDelay[] = {
[WEAPON_HAMMER] = (float)1, // your real value here
[WEAPON_GUN] = (float)2,
[WEAPON_SHOTGUN] = (float)3,
[WEAPON_GRENADE] = (float)4,
[WEAPON_LASER] = (float)5,
[WEAPON_NINJA] = (float)6,
};
static_assert(NUM_WEAPONS == 6, "s_aWeaponsFireDelay has to be adapted to new weapons");
float Delay = Weapon >= 0 && Weapon < NUM_WEAPONS ? s_aWeaponsFireDelay[Weapon] : 1.0f;
"WEAPON_X" is not a variable
static float s_aWeaponsFireDelay[] = {
[WEAPON_HAMMER] = (float)1, // your real value here
[WEAPON_GUN] = (float)2,
[WEAPON_SHOTGUN] = (float)3,
[WEAPON_GRENADE] = (float)4,
[WEAPON_LASER] = (float)5,
[WEAPON_NINJA] = (float)6,
};
static_assert(NUM_WEAPONS == 6, "s_aWeaponsFireDelay has to be adapted to new weapons");
float Delay = Weapon >= 0 && Weapon < NUM_WEAPONS ? s_aWeaponsFireDelay[Weapon] : 1.0f;
CScrollRegion
. Also fix some other minor issues with this list.
8989105
Update hungarian language file (by Cellegen) - def-
818f9e8
Version 16.3 - def-
0deeadb
Update brazilian_portuguese.txt - rffontenelle
bdfbd33
Update french.txt - archimede67
1dbfea0
Better words - archimede67
38035bb
Update Korean translations by CHaBek - cwh7435
23cf903
Add libpng dylib to mac dmg (fixes #5764) - def-
605bad3
Fix png error handling by setting jmpbuf, else libpng will kill the thread - Jupeyy
d3204d9
Prefer bundled libs because of old libpng version on CI - def-
8d4a2f7
Version 16.3.1 - def-
60ca445
Add CWindowsComLifecycle
RAII wrapper for Windows COM library - Robyt3
fdd173c
Fix close messages not being shown when connecting - heinrich5991
256f844
Version 16.3.2 - def-CGameClient *m_pClient;
which isn't initialized toofloat CTuningParams::GetWeaponFireDelay(int Weapon)
{
switch (Weapon)
{
case WEAPON_HAMMER: return (float)m_HammerHitFireDelay / 1000.f;
case WEAPON_GUN: return (float)m_GunFireDelay / 1000.f;
case WEAPON_SHOTGUN: return (float)m_ShotgunFireDelay / 1000.f;
case WEAPON_GRENADE: return (float)m_GrenadeFireDelay / 1000.f;
case WEAPON_LASER: return (float)m_LaserFireDelay / 1000.f;
case WEAPON_NINJA: return (float)m_NinjaFireDelay / 1000.f;
default: dbg_assert(false, "Invalid weapon.");
}
}
bool IsActive = !m_pClient->m_aClients[ClientID].m_Afk || LastAttackTime < m_pClient->m_aTuning[g_Config.m_ClDummy].GetWeaponFireDelay(Player.m_Weapon);
(edited)