Actually implement the bot request object textures switch started in 225cf0d.

Forgot to propogate it down to bot level.
0.7.6-extended
Justin Clark-Casey (justincc) 2013-08-14 23:37:07 +01:00
parent 104626d732
commit 5011c657b5
2 changed files with 9 additions and 0 deletions

View File

@ -58,6 +58,11 @@ namespace pCampBot
public delegate void AnEvent(Bot callbot, EventType someevent); // event delegate for bot events public delegate void AnEvent(Bot callbot, EventType someevent); // event delegate for bot events
/// <summary>
/// Controls whether bots request textures for the object information they receive
/// </summary>
public bool RequestObjectTextures { get; set; }
/// <summary> /// <summary>
/// Bot manager. /// Bot manager.
/// </summary> /// </summary>
@ -469,6 +474,9 @@ namespace pCampBot
public void Objects_NewPrim(object sender, PrimEventArgs args) public void Objects_NewPrim(object sender, PrimEventArgs args)
{ {
if (!RequestObjectTextures)
return;
Primitive prim = args.Prim; Primitive prim = args.Prim;
if (prim != null) if (prim != null)

View File

@ -300,6 +300,7 @@ namespace pCampBot
Bot pb = new Bot(bm, behaviours, firstName, lastName, password, startLocation, loginUri); Bot pb = new Bot(bm, behaviours, firstName, lastName, password, startLocation, loginUri);
pb.wear = wearSetting; pb.wear = wearSetting;
pb.Client.Settings.SEND_AGENT_UPDATES = InitBotSendAgentUpdates; pb.Client.Settings.SEND_AGENT_UPDATES = InitBotSendAgentUpdates;
pb.RequestObjectTextures = InitBotRequestObjectTextures;
pb.OnConnected += handlebotEvent; pb.OnConnected += handlebotEvent;
pb.OnDisconnected += handlebotEvent; pb.OnDisconnected += handlebotEvent;