Fix some formatting in src/game/server/entities/character.cpp

This commit is contained in:
heinrich5991 2019-07-31 21:08:16 +02:00
parent ef32fc4bed
commit 947b5e7936

View file

@ -341,7 +341,7 @@ void CCharacter::FireWeapon()
bool FullAuto = false;
if(m_Core.m_ActiveWeapon == WEAPON_GRENADE || m_Core.m_ActiveWeapon == WEAPON_SHOTGUN || m_Core.m_ActiveWeapon == WEAPON_RIFLE)
FullAuto = true;
if (m_Jetpack && m_Core.m_ActiveWeapon == WEAPON_GUN)
if(m_Jetpack && m_Core.m_ActiveWeapon == WEAPON_GUN)
FullAuto = true;
// don't fire non auto weapons when player is deep and sv_deepfly is disabled
@ -368,8 +368,8 @@ void CCharacter::FireWeapon()
// Timer stuff to avoid shrieking orchestra caused by unfreeze-plasma
if(m_PainSoundTimer<=0)
{
m_PainSoundTimer = 1 * Server()->TickSpeed();
GameServer()->CreateSound(m_Pos, SOUND_PLAYER_PAIN_LONG, Teams()->TeamMask(Team(), -1, m_pPlayer->GetCID()));
m_PainSoundTimer = 1 * Server()->TickSpeed();
GameServer()->CreateSound(m_Pos, SOUND_PLAYER_PAIN_LONG, Teams()->TeamMask(Team(), -1, m_pPlayer->GetCID()));
}
return;
}
@ -728,7 +728,7 @@ void CCharacter::Tick()
m_pPlayer->m_ForceBalanced = false;
}*/
if (m_Paused)
if(m_Paused)
return;
DDRaceTick();
@ -2094,7 +2094,7 @@ void CCharacter::DDRacePostCoreTick()
if (m_pPlayer->m_DefEmoteReset >= 0 && m_pPlayer->m_DefEmoteReset <= Server()->Tick())
{
m_pPlayer->m_DefEmoteReset = -1;
m_pPlayer->m_DefEmoteReset = -1;
m_EmoteType = m_pPlayer->m_DefEmote = EMOTE_NORMAL;
m_EmoteStop = -1;
}
@ -2161,10 +2161,12 @@ bool CCharacter::Freeze(int Seconds)
if (m_FreezeTick < Server()->Tick() - Server()->TickSpeed() || Seconds == -1)
{
for(int i = 0; i < NUM_WEAPONS; i++)
{
if(m_aWeapons[i].m_Got)
{
m_aWeapons[i].m_Ammo = 0;
}
{
m_aWeapons[i].m_Ammo = 0;
}
}
m_Armor = 0;
m_FreezeTime = Seconds == -1 ? Seconds : Seconds * Server()->TickSpeed();
m_FreezeTick = Server()->Tick();