mirror of
				https://github.com/ineedbots/iw5_bot_warfare.git
				synced 2025-10-29 19:46:57 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			c8df9ef311
			...
			1e0daca087
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 1e0daca087 | ||
|  | dfe2ba0c47 | 
| @@ -218,8 +218,11 @@ init() | ||||
| 	if ( !isdefined( game[ "botWarfare" ] ) ) | ||||
| 	{ | ||||
| 		game[ "botWarfare" ] = true; | ||||
| 		game[ "botWarfareInitTime" ] = gettime(); | ||||
| 	} | ||||
| 	 | ||||
| 	level.bot_inittime = gettime(); | ||||
| 	 | ||||
| 	level.defuseobject = undefined; | ||||
| 	level.bots_smokelist = List(); | ||||
| 	level.bots_fraglist = List(); | ||||
| @@ -847,6 +850,23 @@ onPlayerConnect() | ||||
| 	} | ||||
| } | ||||
|  | ||||
| /* | ||||
| 	When a bot disconnects. | ||||
| */ | ||||
| onDisconnectPlayer() | ||||
| { | ||||
| 	name = self.name; | ||||
|  | ||||
| 	self waittill( "disconnect" ); | ||||
| 	waittillframeend; | ||||
| 	 | ||||
| 	for ( i = 0; i < level.bots.size; i++ ) | ||||
| 	{ | ||||
| 		bot = level.bots[ i ]; | ||||
| 		bot BotNotifyBotEvent( "connection", "disconnected", self, name ); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| /* | ||||
| 	When a bot disconnects. | ||||
| */ | ||||
| @@ -864,6 +884,14 @@ connected() | ||||
| { | ||||
| 	self endon( "disconnect" ); | ||||
| 	 | ||||
| 	for ( i = 0; i < level.bots.size; i++ ) | ||||
| 	{ | ||||
| 		bot = level.bots[ i ]; | ||||
| 		bot BotNotifyBotEvent( "connection", "connected", self, self.name ); | ||||
| 	} | ||||
| 	 | ||||
| 	self thread onDisconnectPlayer(); | ||||
| 	 | ||||
| 	if ( !isdefined( self.pers[ "bot_host" ] ) ) | ||||
| 	{ | ||||
| 		self thread doHostCheck(); | ||||
|   | ||||
| @@ -328,10 +328,31 @@ start_chat_watch() | ||||
| 			case "box_cap": | ||||
| 				self thread bot_chat_box_cap_watch( a, b, c, d, e, f, g ); | ||||
| 				break; | ||||
| 				 | ||||
| 			case "connection": | ||||
| 				self thread bot_chat_connection_player_watch( a, b, c, d, e, f, g ); | ||||
| 				break; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| /* | ||||
| 	When a player connected | ||||
| */ | ||||
| bot_chat_connection_player_watch( conn, player, playername, d, e, f, g ) | ||||
| { | ||||
| 	self endon( "disconnect" ); | ||||
| 	 | ||||
| 	switch ( conn ) | ||||
| 	{ | ||||
| 		case "connected": | ||||
| 			break; | ||||
| 			 | ||||
| 		case "disconnected": | ||||
| 			break; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| /* | ||||
| 	start_startgame_watch | ||||
| */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user