Fix coding guidelines + double initialized as 0.0
--HG-- branch : fix_speed
This commit is contained in:
parent
a79c371598
commit
7592d3e6c4
8 changed files with 18 additions and 17 deletions
|
@ -1085,7 +1085,7 @@ void CGameItem::resetEnchantment()
|
|||
_SapLoad = 0;
|
||||
_Enchantment.clear();
|
||||
contReset( _Enchantment );
|
||||
_LatencyEndDate = 0.0f;
|
||||
_LatencyEndDate = 0.0;
|
||||
|
||||
if (getInventory() != NULL)
|
||||
getInventory()->onItemChanged(getInventorySlot(), INVENTORIES::TItemChangeFlags(INVENTORIES::itc_enchant));
|
||||
|
@ -1351,7 +1351,7 @@ void CGameItem::clear()
|
|||
_Destroyable = true;
|
||||
_Dropable = true;
|
||||
// _SlotImage = 0xFFFF;
|
||||
_LatencyEndDate = 0.0f;
|
||||
_LatencyEndDate = 0.0;
|
||||
// _Parent = NULL;
|
||||
_Inventory = NULL;
|
||||
_InventorySlot = INVENTORIES::INVALID_INVENTORY_SLOT;
|
||||
|
|
|
@ -130,7 +130,7 @@ CCombatWeapon::CCombatWeapon(CGameItemPtr itemPtr)
|
|||
// weapon hit rate is in hit/10s and we use ticks/hits....
|
||||
if (itemPtr->hitRate() != 0)
|
||||
{
|
||||
LatencyInTicks = (10.0f / itemPtr->hitRate() ) / CTickEventHandler::getGameTimeStep();
|
||||
LatencyInTicks = (10.0 / itemPtr->hitRate() ) / CTickEventHandler::getGameTimeStep();
|
||||
}
|
||||
|
||||
Quality = (uint16)itemPtr->recommended();
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
private:
|
||||
void init()
|
||||
{
|
||||
LatencyInTicks = 0.0f;
|
||||
LatencyInTicks = 0.0;
|
||||
Damage = 0;
|
||||
Quality = 0;
|
||||
DmgType = DMGTYPE::UNDEFINED;
|
||||
|
|
|
@ -382,7 +382,7 @@ void CCombatPhrase::init()
|
|||
_CriticalHit = false;
|
||||
|
||||
_ExecutionEndDate = 0;
|
||||
_LatencyEndDate = 0.0f;
|
||||
_LatencyEndDate = 0.0;
|
||||
|
||||
_SabrinaCost = 0;
|
||||
_SabrinaRelativeCost = 1.0f;
|
||||
|
@ -892,7 +892,7 @@ bool CCombatPhrase::evaluate()
|
|||
_NotEnoughStaminaMsg = false;
|
||||
_NotEnoughHpMsg = false;
|
||||
_DisengageOnEnd = false;
|
||||
_LatencyEndDate = 0.0f;
|
||||
_LatencyEndDate = 0.0;
|
||||
_ExecutionEndDate = 0;
|
||||
|
||||
return true;
|
||||
|
@ -1702,7 +1702,7 @@ bool CCombatPhrase::launch()
|
|||
{
|
||||
H_AUTO(CCombatPhrase_launch);
|
||||
|
||||
_LatencyEndDate = 0.0f;
|
||||
_LatencyEndDate = 0.0;
|
||||
_ApplyDate = 0;
|
||||
|
||||
if ( !_Attacker )
|
||||
|
@ -2183,7 +2183,7 @@ bool CCombatPhrase::launch()
|
|||
}
|
||||
else
|
||||
{
|
||||
_LatencyEndDate = (double)time + latency;
|
||||
_LatencyEndDate = (double)time + latency;
|
||||
}
|
||||
// compute the apply date
|
||||
if (_Targets[0].Target!=NULL && actingEntity->getEntityRowId() == _Targets[0].Target->getEntityRowId())
|
||||
|
|
|
@ -1568,7 +1568,7 @@ bool CMagicPhrase::launch()
|
|||
if (_DivineInterventionOccured||_ShootAgainOccured?_BaseCastingTime:_CastingTime)
|
||||
_LatencyEndDate = (double)time + PostCastLatency + _PostCastTime;
|
||||
else
|
||||
_LatencyEndDate = 0.0f + _PostCastTime;
|
||||
_LatencyEndDate = 0.0 + _PostCastTime;
|
||||
|
||||
// compute the apply date
|
||||
if ( !_Targets.empty() && _ActorRowId != _Targets[0].getId())
|
||||
|
@ -1898,7 +1898,7 @@ void CMagicPhrase::enchantPhrase(CCharacter * user,float successFactor)
|
|||
|
||||
_Targets.resize(1);
|
||||
// user->setActionFlag( RYZOMACTIONFLAGS::Attacks, true );
|
||||
_LatencyEndDate = 0.0f;//time + _HitRateModifier + weapon.LatencyInTicks + ammo.SpeedInTicks ;
|
||||
_LatencyEndDate = 0.0;//time + _HitRateModifier + weapon.LatencyInTicks + ammo.SpeedInTicks ;
|
||||
// _BeingProcessed = false;
|
||||
|
||||
} // enchantPhrase //
|
||||
|
|
|
@ -459,11 +459,12 @@ void CPhraseManager::updatePhrases()
|
|||
CSPhrase::TPhraseState old_state;
|
||||
do
|
||||
{
|
||||
old_state = phrase->state();
|
||||
updateEntityCurrentAction( (*it).first, entityPhrases);
|
||||
phrase = entityPhrases.getCurrentAction();
|
||||
//Every time we get the next action, th phrase might be deleted (if the action is invalid or finished for non-cyclic actions like digging / crafting), always check !
|
||||
} while(phrase != NULL && old_state != phrase->state());
|
||||
old_state = phrase->state();
|
||||
updateEntityCurrentAction( (*it).first, entityPhrases);
|
||||
phrase = entityPhrases.getCurrentAction();
|
||||
//Every time we get the next action, th phrase might be deleted (if the action is invalid or finished for non-cyclic actions like digging / crafting), always check !
|
||||
}
|
||||
while(phrase != NULL && old_state != phrase->state());
|
||||
|
||||
// get next entity sentences
|
||||
++it;
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
_Idle = false;
|
||||
_ExecutionEndDate = 0;
|
||||
_ApplyDate = ~0; // ensure apply() never called before launch()
|
||||
_LatencyEndDate = 0.0f; // by default, time between apply() and end() is immediate
|
||||
_LatencyEndDate = 0.0; // by default, time between apply() and end() is immediate
|
||||
_PhraseBookIndex = 0;
|
||||
_NextCounter = 0;
|
||||
_IsStatic = false;
|
||||
|
|
|
@ -758,7 +758,7 @@ bool CSpecialPowerPhrase::launch()
|
|||
//-----------------------------------------------
|
||||
void CSpecialPowerPhrase::apply()
|
||||
{
|
||||
_LatencyEndDate = 0.0f;
|
||||
_LatencyEndDate = 0.0;
|
||||
|
||||
// TODO
|
||||
// apply effect
|
||||
|
|
Loading…
Reference in a new issue