Core: Fix many "errors"/warnings and coding style (3)

Game

Errors were found using Cppcheck, open-source static analysis tool
This commit is contained in:
Nay committed 2012-08-30 22:44:33 +01:00
1 parent abbb896cfb
commit e3d9768a50
28 files changed
+72 -105

No files matched your search

+1 -1
View File
@@ -1764,10 +1764,10 @@ bool WorldObject::canSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
if (obj->IsAlwaysVisibleFor(this) || CanAlwaysSee(obj))
return true;
bool corpseCheck = false;
bool corpseVisibility = false;
if (distanceCheck)
{
bool corpseCheck = false;
if (Player const* thisPlayer = ToPlayer())
{
if (thisPlayer->isDead() && thisPlayer->GetHealth() > 0 && // Cheap way to check for ghost state