mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
This commit is contained in:
parent
a4373c887d
commit
8144f30199
69 changed files with 536 additions and 536 deletions
|
|
@ -383,8 +383,8 @@ void GameObject::Update(uint32 /*p_time*/)
|
|||
|
||||
if(spellId)
|
||||
{
|
||||
std::set<uint32>::iterator it = m_unique_users.begin();
|
||||
std::set<uint32>::iterator end = m_unique_users.end();
|
||||
std::set<uint32>::const_iterator it = m_unique_users.begin();
|
||||
std::set<uint32>::const_iterator end = m_unique_users.end();
|
||||
for (; it != end; it++)
|
||||
{
|
||||
Unit* owner = Unit::GetUnit(*this, uint64(*it));
|
||||
|
|
@ -902,7 +902,7 @@ void GameObject::Use(Unit* user)
|
|||
// every slot will be on that straight line
|
||||
float orthogonalOrientation = GetOrientation()+M_PI*0.5f;
|
||||
// find nearest slot
|
||||
for(uint32 i=0; i<info->chair.slots; i++)
|
||||
for(uint32 i=0; i<info->chair.slots; ++i)
|
||||
{
|
||||
// the distance between this slot and the center of the go - imagine a 1D space
|
||||
float relativeDistance = (info->size*i)-(info->size*(info->chair.slots-1)/2.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue