Stop pCampbot from firing connected event twice, which results in double counting.
							parent
							
								
									a9a24062a5
								
							
						
					
					
						commit
						e3f51df3c2
					
				|  | @ -81,16 +81,16 @@ namespace pCampBot | ||||||
| 
 | 
 | ||||||
|             m_console.Commands.AddCommand("bot", false, "shutdown", |             m_console.Commands.AddCommand("bot", false, "shutdown", | ||||||
|                     "shutdown", |                     "shutdown", | ||||||
|                     "Gracefully shut down bots", HandleShutdown); |                     "Shutdown bots and exit", HandleShutdown); | ||||||
| 
 | 
 | ||||||
|             m_console.Commands.AddCommand("bot", false, "quit", |             m_console.Commands.AddCommand("bot", false, "quit", | ||||||
|                     "quit", |                     "quit", | ||||||
|                     "Force quit (DANGEROUS, try shutdown first)", |                     "Shutdown bots and exit", | ||||||
|                     HandleShutdown); |                     HandleShutdown); | ||||||
| 
 | 
 | ||||||
|             m_console.Commands.AddCommand("bot", false, "add bots", | //            m_console.Commands.AddCommand("bot", false, "add bots", | ||||||
|                     "add bots <number>", | //                    "add bots <number>", | ||||||
|                     "Add more bots", HandleAddBots); | //                    "Add more bots", HandleAddBots); | ||||||
| 
 | 
 | ||||||
|             m_lBot = new List<PhysicsBot>(); |             m_lBot = new List<PhysicsBot>(); | ||||||
|         } |         } | ||||||
|  | @ -184,7 +184,7 @@ namespace pCampBot | ||||||
|                     m_log.Info("[" + callbot.firstname + " " + callbot.lastname + "]: Disconnected"); |                     m_log.Info("[" + callbot.firstname + " " + callbot.lastname + "]: Disconnected"); | ||||||
|                     m_td[m_lBot.IndexOf(callbot)].Abort(); |                     m_td[m_lBot.IndexOf(callbot)].Abort(); | ||||||
|                     numbots--; |                     numbots--; | ||||||
|                     if (numbots >1) |                     if (numbots <= 0) | ||||||
|                         Environment.Exit(0); |                         Environment.Exit(0); | ||||||
|                     break; |                     break; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  | @ -165,7 +165,7 @@ namespace pCampBot | ||||||
|                     m_action.AutoReset = false; |                     m_action.AutoReset = false; | ||||||
|                     m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed); |                     m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed); | ||||||
|                     m_action.Start(); |                     m_action.Start(); | ||||||
|                     OnConnected(this, EventType.CONNECTED); | //                    OnConnected(this, EventType.CONNECTED); | ||||||
|                     if (wear == "save") |                     if (wear == "save") | ||||||
|                     { |                     { | ||||||
|                         client.Appearance.SetPreviousAppearance(); |                         client.Appearance.SetPreviousAppearance(); | ||||||
|  | @ -384,6 +384,7 @@ namespace pCampBot | ||||||
|                     { |                     { | ||||||
|                         client.Assets.RequestImage(prim.Textures.DefaultTexture.TextureID, ImageType.Normal, Asset_TextureCallback_Texture); |                         client.Assets.RequestImage(prim.Textures.DefaultTexture.TextureID, ImageType.Normal, Asset_TextureCallback_Texture); | ||||||
|                     } |                     } | ||||||
|  | 
 | ||||||
|                     for (int i = 0; i < prim.Textures.FaceTextures.Length; i++) |                     for (int i = 0; i < prim.Textures.FaceTextures.Length; i++) | ||||||
|                     { |                     { | ||||||
|                         if (prim.Textures.FaceTextures[i] != null) |                         if (prim.Textures.FaceTextures[i] != null) | ||||||
|  | @ -392,10 +393,10 @@ namespace pCampBot | ||||||
|                             { |                             { | ||||||
|                                 client.Assets.RequestImage(prim.Textures.FaceTextures[i].TextureID, ImageType.Normal, Asset_TextureCallback_Texture); |                                 client.Assets.RequestImage(prim.Textures.FaceTextures[i].TextureID, ImageType.Normal, Asset_TextureCallback_Texture); | ||||||
|                             } |                             } | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
| 
 | 
 | ||||||
|                         } |  | ||||||
|                     } |  | ||||||
|                 } |  | ||||||
|                 if (prim.Sculpt.SculptTexture != UUID.Zero) |                 if (prim.Sculpt.SculptTexture != UUID.Zero) | ||||||
|                 { |                 { | ||||||
|                     client.Assets.RequestImage(prim.Sculpt.SculptTexture, ImageType.Normal, Asset_TextureCallback_Texture); |                     client.Assets.RequestImage(prim.Sculpt.SculptTexture, ImageType.Normal, Asset_TextureCallback_Texture); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Justin Clark-Casey (justincc)
						Justin Clark-Casey (justincc)