Core/Cleanup:
Mostly if(.. -> if (.. and for(.. -> for (.. but also some miscellaneous cleanup
This commit is contained in:
@@ -27,8 +27,7 @@
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "CellImpl.h"
|
||||
|
||||
int
|
||||
TotemAI::Permissible(const Creature* creature)
|
||||
int TotemAI::Permissible(Creature const* creature)
|
||||
{
|
||||
if (creature->isTotem())
|
||||
return PERMIT_BASE_PROACTIVE;
|
||||
@@ -41,8 +40,7 @@ TotemAI::TotemAI(Creature* c) : CreatureAI(c), i_victimGuid(0)
|
||||
ASSERT(c->isTotem());
|
||||
}
|
||||
|
||||
void
|
||||
TotemAI::MoveInLineOfSight(Unit*)
|
||||
void TotemAI::MoveInLineOfSight(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -51,10 +49,9 @@ void TotemAI::EnterEvadeMode()
|
||||
me->CombatStop(true);
|
||||
}
|
||||
|
||||
void
|
||||
TotemAI::UpdateAI(const uint32 /*diff*/)
|
||||
void TotemAI::UpdateAI(uint32 const /*diff*/)
|
||||
{
|
||||
if (me->ToTotem()->GetTotemType() != TOTEM_ACTIVE)
|
||||
if (me->ToTotem()->GetTotemType() != TOTEM_ACTIVE)
|
||||
return;
|
||||
|
||||
if (!me->isAlive() || me->IsNonMeleeSpellCasted(false))
|
||||
@@ -98,8 +95,7 @@ TotemAI::UpdateAI(const uint32 /*diff*/)
|
||||
i_victimGuid = 0;
|
||||
}
|
||||
|
||||
void
|
||||
TotemAI::AttackStart(Unit*)
|
||||
void TotemAI::AttackStart(Unit* /*victim*/)
|
||||
{
|
||||
// Sentry totem sends ping on attack
|
||||
if (me->GetEntry() == SENTRY_TOTEM_ENTRY && me->GetOwner()->GetTypeId() == TYPEID_PLAYER)
|
||||
|
||||
@@ -31,12 +31,12 @@ class TotemAI : public CreatureAI
|
||||
|
||||
explicit TotemAI(Creature* c);
|
||||
|
||||
void MoveInLineOfSight(Unit*);
|
||||
void AttackStart(Unit*);
|
||||
void MoveInLineOfSight(Unit* who);
|
||||
void AttackStart(Unit* victim);
|
||||
void EnterEvadeMode();
|
||||
|
||||
void UpdateAI(const uint32);
|
||||
static int Permissible(const Creature*);
|
||||
void UpdateAI(uint32 const diff);
|
||||
static int Permissible(Creature const* creature);
|
||||
|
||||
private:
|
||||
uint64 i_victimGuid;
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace FactorySelector
|
||||
{
|
||||
const CreatureAICreator* factory = iter->second;
|
||||
const SelectableAI* p = dynamic_cast<const SelectableAI*>(factory);
|
||||
ASSERT(p != NULL);
|
||||
ASSERT(p);
|
||||
int val = p->Permit(creature);
|
||||
if (val > best_val)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ namespace FactorySelector
|
||||
MovementGenerator* selectMovementGenerator(Creature* creature)
|
||||
{
|
||||
MovementGeneratorRegistry& mv_registry(*MovementGeneratorRepository::instance());
|
||||
ASSERT(creature->GetCreatureTemplate() != NULL);
|
||||
ASSERT(creature->GetCreatureTemplate());
|
||||
const MovementGeneratorCreator* mv_factory = mv_registry.GetRegistryItem(creature->GetDefaultMovementType());
|
||||
|
||||
/* if (mv_factory == NULL)
|
||||
|
||||
@@ -1630,7 +1630,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
|
||||
default:
|
||||
{
|
||||
float ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true);
|
||||
if(ground_z > INVALID_HEIGHT)
|
||||
if (ground_z > INVALID_HEIGHT)
|
||||
z = ground_z;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -21148,10 +21148,10 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
|
||||
}
|
||||
|
||||
uint32 price = 0;
|
||||
if(crItem->IsGoldRequired(pProto) && pProto->BuyPrice > 0) //Assume price cannot be negative (do not know why it is int32)
|
||||
if (crItem->IsGoldRequired(pProto) && pProto->BuyPrice > 0) //Assume price cannot be negative (do not know why it is int32)
|
||||
{
|
||||
uint32 maxCount = MAX_MONEY_AMOUNT / pProto->BuyPrice;
|
||||
if((uint32)count > maxCount)
|
||||
if ((uint32)count > maxCount)
|
||||
{
|
||||
sLog->outError("Player %s tried to buy %u item id %u, causing overflow", GetName(), (uint32)count, pProto->ItemId);
|
||||
count = (uint8)maxCount;
|
||||
|
||||
@@ -1494,7 +1494,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* victim, const uint32 damage, SpellInfo
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*itr)->GetSpellInfo()))
|
||||
if (ToPlayer()->HasItemFitToSpellRequirements((*itr)->GetSpellInfo()))
|
||||
bonusPct += (*itr)->GetAmount();
|
||||
}
|
||||
}
|
||||
@@ -1504,6 +1504,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* victim, const uint32 damage, SpellInfo
|
||||
maxArmorPen = float(400 + 85 * victim->getLevel());
|
||||
else
|
||||
maxArmorPen = 400 + 85 * victim->getLevel() + 4.5f * 85 * (victim->getLevel() - 59);
|
||||
|
||||
// Cap armor penetration to this number
|
||||
maxArmorPen = std::min((armor + maxArmorPen) / 3, armor);
|
||||
// Figure out how much armor do we ignore
|
||||
@@ -5751,7 +5752,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
// Glyph of Polymorph
|
||||
case 56375:
|
||||
{
|
||||
if(!target)
|
||||
if (!target)
|
||||
return false;
|
||||
target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(32409)); // SW:D shall not be removed.
|
||||
target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
|
||||
@@ -5810,7 +5811,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
// Blessing of Ancient Kings (Val'anyr, Hammer of Ancient Kings)
|
||||
case 64411:
|
||||
{
|
||||
if(!victim)
|
||||
if (!victim)
|
||||
return false;
|
||||
basepoints0 = int32(CalculatePctN(damage, 15));
|
||||
if (AuraEffect* aurEff = victim->GetAuraEffect(64413, 0, GetGUID()))
|
||||
@@ -6121,7 +6122,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
// Divine Aegis
|
||||
if (dummySpell->SpellIconID == 2820)
|
||||
{
|
||||
if(!target)
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
// Multiple effects stack, so let's try to find this aura.
|
||||
@@ -6291,7 +6292,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
// Glyph of Shred
|
||||
case 54815:
|
||||
{
|
||||
if(!target)
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
// try to find spell Rip on the target
|
||||
@@ -6597,7 +6598,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
// Explosive Shot
|
||||
if (procSpell->SpellFamilyFlags[2] & 0x200)
|
||||
{
|
||||
if(!victim)
|
||||
if (!victim)
|
||||
return false;
|
||||
if (AuraEffect const* pEff = victim->GetAuraEffect(SPELL_AURA_PERIODIC_DUMMY, SPELLFAMILY_HUNTER, 0x0, 0x80000000, 0x0, GetGUID()))
|
||||
basepoints0 = pEff->GetSpellInfo()->CalcPowerCost(this, SpellSchoolMask(pEff->GetSpellInfo()->SchoolMask)) * 4/10/3;
|
||||
|
||||
@@ -797,7 +797,7 @@ namespace Trinity
|
||||
if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem())
|
||||
return false;
|
||||
|
||||
if(!u->isTargetableForAttack(false))
|
||||
if (!u->isTargetableForAttack(false))
|
||||
return false;
|
||||
|
||||
return i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u);
|
||||
|
||||
@@ -787,20 +787,20 @@ void Map::RemoveCreatureFromMoveList(Creature* c)
|
||||
void Map::MoveAllCreaturesInMoveList()
|
||||
{
|
||||
_creatureToMoveLock = true;
|
||||
for(std::vector<Creature*>::iterator itr = _creaturesToMove.begin(); itr != _creaturesToMove.end(); ++itr)
|
||||
for (std::vector<Creature*>::iterator itr = _creaturesToMove.begin(); itr != _creaturesToMove.end(); ++itr)
|
||||
{
|
||||
Creature* c = *itr;
|
||||
if(c->FindMap() != this) //pet is teleported to another map
|
||||
if (c->FindMap() != this) //pet is teleported to another map
|
||||
continue;
|
||||
|
||||
if(c->_moveState != CREATURE_CELL_MOVE_ACTIVE)
|
||||
if (c->_moveState != CREATURE_CELL_MOVE_ACTIVE)
|
||||
{
|
||||
c->_moveState = CREATURE_CELL_MOVE_NONE;
|
||||
continue;
|
||||
}
|
||||
|
||||
c->_moveState = CREATURE_CELL_MOVE_NONE;
|
||||
if(!c->IsInWorld())
|
||||
if (!c->IsInWorld())
|
||||
continue;
|
||||
|
||||
// do move or do move to respawn or remove creature if previous all fail
|
||||
|
||||
@@ -96,32 +96,32 @@ void MapManager::checkAndCorrectGridStatesArray()
|
||||
|
||||
Map* MapManager::CreateBaseMap(uint32 id)
|
||||
{
|
||||
Map* m = FindBaseMap(id);
|
||||
Map* map = FindBaseMap(id);
|
||||
|
||||
if (m == NULL)
|
||||
if (map == NULL)
|
||||
{
|
||||
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
|
||||
|
||||
const MapEntry* entry = sMapStore.LookupEntry(id);
|
||||
if (entry && entry->Instanceable())
|
||||
{
|
||||
m = new MapInstanced(id, i_gridCleanUpDelay);
|
||||
map = new MapInstanced(id, i_gridCleanUpDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
m = new Map(id, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
|
||||
map = new Map(id, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
|
||||
}
|
||||
i_maps[id] = m;
|
||||
i_maps[id] = map;
|
||||
}
|
||||
|
||||
ASSERT(m != NULL);
|
||||
return m;
|
||||
ASSERT(map);
|
||||
return map;
|
||||
}
|
||||
|
||||
Map* MapManager::FindBaseNonInstanceMap(uint32 mapId) const
|
||||
{
|
||||
Map* map = FindBaseMap(mapId);
|
||||
if(map && map->Instanceable())
|
||||
if (map && map->Instanceable())
|
||||
return NULL;
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ enum SpellAttr3
|
||||
|
||||
enum SpellAttr4
|
||||
{
|
||||
SPELL_ATTR4_IGNORE_RESISTANCES = 0x00000001, // 0 spells with this attribute will completely ignore the target resistances (theese spells cant be resisted)
|
||||
SPELL_ATTR4_IGNORE_RESISTANCES = 0x00000001, // 0 spells with this attribute will completely ignore the target's resistance (these spells can't be resisted)
|
||||
SPELL_ATTR4_PROC_ONLY_ON_CASTER = 0x00000002, // 1 proc only on effects with TARGET_UNIT_CASTER?
|
||||
SPELL_ATTR4_UNK2 = 0x00000004, // 2
|
||||
SPELL_ATTR4_UNK3 = 0x00000008, // 3
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
#define MAX_QUIET_DISTANCE 43.0f
|
||||
|
||||
template<class T>
|
||||
void
|
||||
FleeingMovementGenerator<T>::_setTargetLocation(T &owner)
|
||||
void FleeingMovementGenerator<T>::_setTargetLocation(T &owner)
|
||||
{
|
||||
if (!&owner)
|
||||
return;
|
||||
@@ -53,8 +52,7 @@ FleeingMovementGenerator<T>::_setTargetLocation(T &owner)
|
||||
}
|
||||
|
||||
template<class T>
|
||||
bool
|
||||
FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z)
|
||||
bool FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z)
|
||||
{
|
||||
if (!&owner)
|
||||
return false;
|
||||
@@ -65,8 +63,8 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z)
|
||||
|
||||
float temp_x, temp_y, angle;
|
||||
const Map* _map = owner.GetBaseMap();
|
||||
//primitive path-finding
|
||||
for(uint8 i = 0; i < 18; ++i)
|
||||
// primitive path-finding
|
||||
for (uint8 i = 0; i < 18; ++i)
|
||||
{
|
||||
if (i_only_forward && i > 2)
|
||||
break;
|
||||
@@ -187,8 +185,7 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z)
|
||||
}
|
||||
|
||||
template<class T>
|
||||
bool
|
||||
FleeingMovementGenerator<T>::_setMoveData(T &owner)
|
||||
bool FleeingMovementGenerator<T>::_setMoveData(T &owner)
|
||||
{
|
||||
float cur_dist_xyz = owner.GetDistance(i_caster_x, i_caster_y, i_caster_z);
|
||||
|
||||
@@ -280,8 +277,7 @@ FleeingMovementGenerator<T>::_setMoveData(T &owner)
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void
|
||||
FleeingMovementGenerator<T>::Initialize(T &owner)
|
||||
void FleeingMovementGenerator<T>::Initialize(T &owner)
|
||||
{
|
||||
if (!&owner)
|
||||
return;
|
||||
@@ -312,8 +308,7 @@ FleeingMovementGenerator<T>::Initialize(T &owner)
|
||||
}
|
||||
|
||||
template<>
|
||||
void
|
||||
FleeingMovementGenerator<Creature>::_Init(Creature &owner)
|
||||
void FleeingMovementGenerator<Creature>::_Init(Creature &owner)
|
||||
{
|
||||
if (!&owner)
|
||||
return;
|
||||
@@ -324,8 +319,7 @@ FleeingMovementGenerator<Creature>::_Init(Creature &owner)
|
||||
}
|
||||
|
||||
template<>
|
||||
void
|
||||
FleeingMovementGenerator<Player>::_Init(Player &)
|
||||
void FleeingMovementGenerator<Player>::_Init(Player &)
|
||||
{
|
||||
is_water_ok = true;
|
||||
is_land_ok = true;
|
||||
@@ -354,8 +348,7 @@ void FleeingMovementGenerator<T>::Reset(T &owner)
|
||||
}
|
||||
|
||||
template<class T>
|
||||
bool
|
||||
FleeingMovementGenerator<T>::Update(T &owner, const uint32 &time_diff)
|
||||
bool FleeingMovementGenerator<T>::Update(T &owner, const uint32 &time_diff)
|
||||
{
|
||||
if (!&owner || !owner.isAlive())
|
||||
return false;
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
#include "MovementGenerator.h"
|
||||
|
||||
template<class T>
|
||||
class FleeingMovementGenerator
|
||||
: public MovementGeneratorMedium< T, FleeingMovementGenerator<T> >
|
||||
class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovementGenerator<T> >
|
||||
{
|
||||
public:
|
||||
FleeingMovementGenerator(uint64 fright) : i_frightGUID(fright), i_nextCheckTime(0) {}
|
||||
@@ -55,8 +54,7 @@ class FleeingMovementGenerator
|
||||
TimeTracker i_nextCheckTime;
|
||||
};
|
||||
|
||||
class TimedFleeingMovementGenerator
|
||||
: public FleeingMovementGenerator<Creature>
|
||||
class TimedFleeingMovementGenerator : public FleeingMovementGenerator<Creature>
|
||||
{
|
||||
public:
|
||||
TimedFleeingMovementGenerator(uint64 fright, uint32 time) :
|
||||
|
||||
@@ -27,8 +27,7 @@ template < class T >
|
||||
class HomeMovementGenerator;
|
||||
|
||||
template <>
|
||||
class HomeMovementGenerator<Creature>
|
||||
: public MovementGeneratorMedium< Creature, HomeMovementGenerator<Creature> >
|
||||
class HomeMovementGenerator<Creature> : public MovementGeneratorMedium< Creature, HomeMovementGenerator<Creature> >
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 & /*diff*/)
|
||||
if (!&unit)
|
||||
return false;
|
||||
|
||||
if(unit.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED))
|
||||
if (unit.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED))
|
||||
{
|
||||
unit.ClearUnitState(UNIT_STATE_ROAMING_MOVE);
|
||||
return true;
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
#include "FollowerReference.h"
|
||||
|
||||
template<class T>
|
||||
class PointMovementGenerator
|
||||
: public MovementGeneratorMedium< T, PointMovementGenerator<T> >
|
||||
class PointMovementGenerator : public MovementGeneratorMedium< T, PointMovementGenerator<T> >
|
||||
{
|
||||
public:
|
||||
PointMovementGenerator(uint32 _id, float _x, float _y, float _z, float _speed = 0.0f) : id(_id),
|
||||
@@ -46,8 +45,7 @@ class PointMovementGenerator
|
||||
float speed;
|
||||
};
|
||||
|
||||
class AssistanceMovementGenerator
|
||||
: public PointMovementGenerator<Creature>
|
||||
class AssistanceMovementGenerator : public PointMovementGenerator<Creature>
|
||||
{
|
||||
public:
|
||||
AssistanceMovementGenerator(float _x, float _y, float _z) :
|
||||
|
||||
@@ -127,8 +127,7 @@ void RandomMovementGenerator<Creature>::Initialize(Creature &creature)
|
||||
}
|
||||
|
||||
template<>
|
||||
void
|
||||
RandomMovementGenerator<Creature>::Reset(Creature &creature)
|
||||
void RandomMovementGenerator<Creature>::Reset(Creature &creature)
|
||||
{
|
||||
Initialize(creature);
|
||||
}
|
||||
@@ -141,8 +140,7 @@ void RandomMovementGenerator<Creature>::Finalize(Creature &creature)
|
||||
}
|
||||
|
||||
template<>
|
||||
bool
|
||||
RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 diff)
|
||||
bool RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 diff)
|
||||
{
|
||||
if (creature.HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED))
|
||||
{
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
#include "MovementGenerator.h"
|
||||
|
||||
template<class T>
|
||||
class RandomMovementGenerator
|
||||
: public MovementGeneratorMedium< T, RandomMovementGenerator<T> >
|
||||
class RandomMovementGenerator : public MovementGeneratorMedium< T, RandomMovementGenerator<T> >
|
||||
{
|
||||
public:
|
||||
RandomMovementGenerator(float spawn_dist = 0.0f) : i_nextMoveTime(0), wander_distance(spawn_dist) {}
|
||||
|
||||
@@ -78,7 +78,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner)
|
||||
|
||||
//We don't update Mob Movement, if the difference between New destination and last destination is < BothObjectSize
|
||||
float bothObjectSize = i_target->GetObjectBoundingRadius() + owner.GetObjectBoundingRadius() + CONTACT_DISTANCE;
|
||||
if( i_destinationHolder.HasDestination() && i_destinationHolder.GetDestinationDiff(x,y,z) < bothObjectSize )
|
||||
if ( i_destinationHolder.HasDestination() && i_destinationHolder.GetDestinationDiff(x,y,z) < bothObjectSize )
|
||||
return;
|
||||
*/
|
||||
|
||||
|
||||
@@ -34,8 +34,7 @@ class TargetedMovementGeneratorBase
|
||||
};
|
||||
|
||||
template<class T, typename D>
|
||||
class TargetedMovementGeneratorMedium
|
||||
: public MovementGeneratorMedium< T, D >, public TargetedMovementGeneratorBase
|
||||
class TargetedMovementGeneratorMedium : public MovementGeneratorMedium< T, D >, public TargetedMovementGeneratorBase
|
||||
{
|
||||
protected:
|
||||
TargetedMovementGeneratorMedium(Unit &target, float offset, float angle) :
|
||||
|
||||
@@ -58,9 +58,8 @@ template<class T>
|
||||
class WaypointMovementGenerator;
|
||||
|
||||
template<>
|
||||
class WaypointMovementGenerator<Creature>
|
||||
: public MovementGeneratorMedium< Creature, WaypointMovementGenerator<Creature> >,
|
||||
public PathMovementBase<Creature, WaypointPath const*>
|
||||
class WaypointMovementGenerator<Creature> : public MovementGeneratorMedium< Creature, WaypointMovementGenerator<Creature> >,
|
||||
public PathMovementBase<Creature, WaypointPath const*>
|
||||
{
|
||||
public:
|
||||
WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true)
|
||||
@@ -110,9 +109,8 @@ public PathMovementBase<Creature, WaypointPath const*>
|
||||
/** FlightPathMovementGenerator generates movement of the player for the paths
|
||||
* and hence generates ground and activities for the player.
|
||||
*/
|
||||
class FlightPathMovementGenerator
|
||||
: public MovementGeneratorMedium< Player, FlightPathMovementGenerator >,
|
||||
public PathMovementBase<Player, TaxiPathNodeList const*>
|
||||
class FlightPathMovementGenerator : public MovementGeneratorMedium< Player, FlightPathMovementGenerator >,
|
||||
public PathMovementBase<Player, TaxiPathNodeList const*>
|
||||
{
|
||||
public:
|
||||
explicit FlightPathMovementGenerator(TaxiPathNodeList const& pathnodes, uint32 startNode = 0)
|
||||
|
||||
@@ -288,7 +288,7 @@ std::string MoveSpline::ToString() const
|
||||
str << "facing angle: " << facing.angle;
|
||||
else if (splineflags.final_target)
|
||||
str << "facing target: " << facing.target;
|
||||
else if(splineflags.final_point)
|
||||
else if (splineflags.final_point)
|
||||
str << "facing point: " << facing.f.x << " " << facing.f.y << " " << facing.f.z;
|
||||
str << std::endl;
|
||||
str << "time passed: " << time_passed << std::endl;
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace Movement
|
||||
Vector3 middle = (real_path[0] + real_path[last_idx]) / 2.f;
|
||||
Vector3 offset;
|
||||
// first and last points already appended
|
||||
for(uint32 i = 1; i < last_idx; ++i)
|
||||
for (uint32 i = 1; i < last_idx; ++i)
|
||||
{
|
||||
offset = middle - real_path[i];
|
||||
data.appendPackXYZ(offset.x, offset.y, offset.z);
|
||||
@@ -169,7 +169,7 @@ namespace Movement
|
||||
{
|
||||
data << move_spline.facing.target;
|
||||
}
|
||||
else if(splineFlags.final_point)
|
||||
else if (splineFlags.final_point)
|
||||
{
|
||||
data << move_spline.facing.f.x << move_spline.facing.f.y << move_spline.facing.f.z;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ void WardenMac::HandleHashResult(ByteBuffer &buff)
|
||||
|
||||
uint8 mod_seed[16] = { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE };
|
||||
|
||||
for(int i = 0; i < 4; ++i)
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
keyIn[i] = *(int*)(&mod_seed[0] + i * 4);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user