From: terencehill <piuntn@gmail.com>
Date: Sat, 19 Aug 2017 14:42:25 +0000 (+0200)
Subject: Fix compilation unit
X-Git-Tag: xonotic-v0.8.5~2378^2~80
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ce60d9f94ee138e703382c08383c5d837e6ab1cc;p=xonotic%2Fxonotic-data.pk3dir.git

Fix compilation unit
---

diff --git a/qcsrc/server/bot/api.qh b/qcsrc/server/bot/api.qh
index 98f85e28bc..5c41731ddf 100644
--- a/qcsrc/server/bot/api.qh
+++ b/qcsrc/server/bot/api.qh
@@ -2,6 +2,7 @@
 
 #include <server/defs.qh>
 #include <common/weapons/_all.qh>
+#include <common/physics/player.qh>
 
 const int WAYPOINTFLAG_GENERATED = BIT(23);
 const int WAYPOINTFLAG_ITEM = BIT(22);
diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc
index 306f3a05e8..439ef54715 100644
--- a/qcsrc/server/bot/default/havocbot/havocbot.qc
+++ b/qcsrc/server/bot/default/havocbot/havocbot.qc
@@ -138,7 +138,7 @@ void havocbot_ai(entity this)
 		this.aistatus |= AI_STATUS_ROAMING;
 		this.aistatus &= ~AI_STATUS_ATTACKING;
 
-		vector v, now, next;
+		vector v = '0 0 0', now, next;
 		float aimdistance,skillblend,distanceblend,blend;
 
 		SET_DESTCOORDS(this.goalcurrent, this.origin, v);
@@ -286,7 +286,7 @@ void havocbot_bunnyhop(entity this, vector dir)
 	float bunnyhopdistance;
 	vector deviation;
 	float maxspeed;
-	vector gco, gno;
+	vector gco = '0 0 0', gno;
 
 	// Don't jump when attacking
 	if(this.aistatus & AI_STATUS_ATTACKING)
@@ -448,7 +448,7 @@ bool havocbot_checkgoaldistance(entity this, vector gco)
 
 void havocbot_movetogoal(entity this)
 {
-	vector destorg;
+	vector destorg = '0 0 0';
 	vector diff;
 	vector dir;
 	vector flatdir;
@@ -1287,7 +1287,7 @@ float havocbot_moveto(entity this, vector pos)
 			debuggoalstack(this);
 
 		// Heading
-		vector dir;
+		vector dir = '0 0 0';
 		SET_DESTCOORDS(this.goalcurrent, this.origin, dir);
 		dir = dir - (this.origin + this.view_ofs);
 		dir.z = 0;
diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc
index 8b865fcf33..b0a5ccbb9d 100644
--- a/qcsrc/server/bot/default/navigation.qc
+++ b/qcsrc/server/bot/default/navigation.qc
@@ -768,8 +768,8 @@ entity navigation_findnearestwaypoint_withdist_except(entity ent, float walkfrom
 		te_plasmaburn(org);
 
 	entity best = NULL;
-	vector v, v2;
-	float v2_height;
+	vector v = '0 0 0', v2 = '0 0 0';
+	float v2_height = 0;
 
 	if(!autocvar_g_waypointeditor && walkfromwp && !ent.navigation_dynamicgoal)
 	{
@@ -815,10 +815,10 @@ entity navigation_findnearestwaypoint(entity ent, float walkfromwp)
 // finds the waypoints near the bot initiating a navigation query
 float navigation_markroutes_nearestwaypoints(entity this, float maxdist)
 {
-	vector v;
+	vector v = '0 0 0';
 	//navigation_testtracewalk = true;
 	int c = 0;
-	float v_height;
+	float v_height = 0;
 	IL_EACH(g_waypoints, !it.wpconsidered,
 	{
 		SET_TRACEWALK_DESTCOORDS(it, this.origin, v, v_height);
@@ -1271,8 +1271,8 @@ bool navigation_routetogoal(entity this, entity e, vector startposition)
 		return true;
 
 	// if it can reach the goal there is nothing more to do
-	vector dest;
-	float dest_height;
+	vector dest = '0 0 0';
+	float dest_height = 0;
 	SET_TRACEWALK_DESTCOORDS(e, startposition, dest, dest_height);
 	if (tracewalk(this, startposition, STAT(PL_MIN, this), STAT(PL_MAX, this), dest, dest_height, bot_navigation_movemode))
 		return true;
diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc
index 1837934065..d4ef6d14d0 100644
--- a/qcsrc/server/bot/default/waypoints.qc
+++ b/qcsrc/server/bot/default/waypoints.qc
@@ -559,8 +559,8 @@ void waypoint_addlink(entity from, entity to)
 // (SLOW!)
 void waypoint_think(entity this)
 {
-	vector sv, sv2, ev, ev2, dv;
-	float sv2_height, ev2_height;
+	vector sv = '0 0 0', sv2 = '0 0 0', ev = '0 0 0', ev2 = '0 0 0', dv;
+	float sv2_height = 0, ev2_height = 0;
 
 	bot_calculate_stepheightvec();