aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2013-12-14 18:41:26 +0100
committerjackpoz <giacomopoz@gmail.com>2013-12-14 18:41:26 +0100
commit1c0903e2862d4e4c7e17c8a45fe9dc3163b3ebce (patch)
treeaed14a90ef879821548c2bf4eb66ec1b08f0bf86 /src/server/game/AI/SmartScripts
parentdd546f073aa8acf54f525c0a0836a502d859580d (diff)
Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values. Most of them are false positives, always initialized before being accessed, while some of them are real issues spotted by valgrind too.
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp1
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index c13fdb87de4..1c78b97866f 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -67,6 +67,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
mFollowCredit = 0;
mFollowArrivedEntry = 0;
mFollowCreditType = 0;
+ mFollowArrivedTimer = 0;
mInvincibilityHpLevel = 0;
mJustReset = false;
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 2e5b3d3626f..f6ace2f9881 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -1036,6 +1036,10 @@ struct SmartTarget
raw.param1 = p1;
raw.param2 = p2;
raw.param3 = p3;
+ x = 0.0f;
+ y = 0.0f;
+ z = 0.0f;
+ o = 0.0f;
}
SMARTAI_TARGETS type;
float x, y, z, o;