mirror of
				https://github.com/ineedbots/iw4_bot_warfare.git
				synced 2025-10-28 00:26:57 +00:00 
			
		
		
		
	smol changes
This commit is contained in:
		| @@ -109,6 +109,7 @@ resetBotVars() | ||||
| 	self.bot.moveTo = self.origin; | ||||
| 	self.bot.stop_move = false; | ||||
| 	self.bot.greedy_path = false; | ||||
| 	self.bot.climbing = false; | ||||
| 	 | ||||
| 	self.bot.isfrozen = false; | ||||
| 	self.bot.sprintendtime = -1; | ||||
| @@ -501,15 +502,23 @@ stance() | ||||
| 	{ | ||||
| 		self waittill_either("finished_static_waypoints", "new_static_waypoint"); | ||||
|  | ||||
| 		self.bot.climbing = false; | ||||
|  | ||||
| 		if(self.bot.isfrozen || self IsUsingRemote()) | ||||
| 			continue; | ||||
| 	 | ||||
| 		toStance = "stand"; | ||||
| 		if(self.bot.next_wp != -1) | ||||
| 			toStance = level.waypoints[self.bot.next_wp].type; | ||||
|  | ||||
| 		if (!isDefined(toStance)) | ||||
| 			toStance = "crouch"; | ||||
| 			 | ||||
| 		if(toStance == "climb") | ||||
| 		{ | ||||
| 			self.bot.climbing = true; | ||||
| 			toStance = "stand"; | ||||
| 		} | ||||
| 			 | ||||
| 		if(toStance != "stand" && toStance != "crouch" && toStance != "prone") | ||||
| 			toStance = "crouch"; | ||||
| @@ -1255,7 +1264,8 @@ aim() | ||||
| 		else if (!usingRemote) | ||||
| 		{ | ||||
| 			lookat = undefined; | ||||
| 			if(self.bot.second_next_wp != -1 && !self.bot.issprinting) | ||||
|  | ||||
| 			if(self.bot.second_next_wp != -1 && !self.bot.issprinting && !self.bot.climbing) | ||||
| 				lookat = level.waypoints[self.bot.second_next_wp].origin; | ||||
| 			else if(isDefined(self.bot.towards_goal)) | ||||
| 				lookat = self.bot.towards_goal; | ||||
| @@ -1704,6 +1714,8 @@ movetowards(goal) | ||||
| 				 | ||||
| 				randomDir = self getRandomLargestStafe(stucks); | ||||
| 			 | ||||
| 				self knife(); // knife glass | ||||
| 				wait 0.25; | ||||
| 				self botMoveTo(randomDir); | ||||
| 				wait stucks; | ||||
| 			} | ||||
|   | ||||
| @@ -1501,7 +1501,7 @@ getNearestWaypointOfWaypoints(waypoints) | ||||
| 		waypoint = waypoints[i]; | ||||
| 		thisDist = DistanceSquared(self.origin, waypoint.origin); | ||||
|  | ||||
| 		if (thisDist > closestDist) | ||||
| 		if (isDefined(answer) && thisDist > closestDist) | ||||
| 			continue; | ||||
|  | ||||
| 		answer = waypoint; | ||||
| @@ -2270,9 +2270,6 @@ bot_use_tube_think() | ||||
|  | ||||
| 		if (self IsBotFragging() || self IsBotSmoking()) | ||||
| 			continue; | ||||
| 		 | ||||
| 		if(self IsBotReloading() || self IsBotKnifing()) | ||||
| 			continue; | ||||
| 			 | ||||
| 		if(self isDefusing() || self isPlanting()) | ||||
| 			continue; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user