smd501 | 25 May 2012 16:13
Picon

SF.net SVN: cel:[4897] cel/branches/soc2012/ai/apps/bttest

Revision: 4897
          http://cel.svn.sourceforge.net/cel/?rev=4897&view=rev
Author:   smd501
Date:     2012-05-25 14:13:45 +0000 (Fri, 25 May 2012)
Log Message:
-----------
Small fix so behaviour tree in bttest lasts as long as app and can then be called each frame to demonstrate
interesting behaviour

Modified Paths:
--------------
    cel/branches/soc2012/ai/apps/bttest/app.cpp
    cel/branches/soc2012/ai/apps/bttest/app.h

Modified: cel/branches/soc2012/ai/apps/bttest/app.cpp
===================================================================
--- cel/branches/soc2012/ai/apps/bttest/app.cpp	2012-05-25 06:48:59 UTC (rev 4896)
+++ cel/branches/soc2012/ai/apps/bttest/app.cpp	2012-05-25 14:13:45 UTC (rev 4897)
 <at>  <at>  -252,7 +252,7  <at>  <at> 
   //Set Up Decorator Nodes
   csRef<iExecutionLimitDecorator> explicit_execution_limit_node = 
     scfQueryInterface<iExecutionLimitDecorator> (execution_limit_node);
-  explicit_execution_limit_node->SetExecutionLimit("1");
+  explicit_execution_limit_node->SetExecutionLimit("2");

   csRef<iLoopDecorator> explicit_loop_node = 
     scfQueryInterface<iLoopDecorator> (loop_node);
 <at>  <at>  -329,7 +329,7  <at>  <at> 

 
   //Connect Tree
-  root_node->AddChild (initial_sequence_node);
+  //root_node->AddChild (initial_sequence_node);
   root_node->AddChild (execution_limit_node);
   root_node->AddChild (lottery_sequence_node);
   root_node->AddChild (random_node);
 <at>  <at>  -354,7 +354,7  <at>  <at> 

 
   //Build Tree
-  csRef<iBTNode> tree = csLoadPlugin<iBTNode> (plugin_mgr,
+  tree = csLoadPlugin<iBTNode> (plugin_mgr,
     "cel.behaviourtree.root");
   tree->AddChild(root_node);
   tree->Execute(params);

Modified: cel/branches/soc2012/ai/apps/bttest/app.h
===================================================================
--- cel/branches/soc2012/ai/apps/bttest/app.h	2012-05-25 06:48:59 UTC (rev 4896)
+++ cel/branches/soc2012/ai/apps/bttest/app.h	2012-05-25 14:13:45 UTC (rev 4897)
 <at>  <at>  -23,6 +23,8  <at>  <at> 
   csRef<iCelBlLayer> bl;
   csRef<iCelEntity> level_entity;
   csRef<iCelEntity> player_entity;
+    
+  csRef<iBTNode> tree;

   bool OnKeyboard (iEvent&);
   void Frame ();
 <at>  <at>  -42,4 +44,4  <at>  <at> 
 };

 
-#endif
+#endif
\ No newline at end of file

This was sent by the SourceForge.net collaborative development platform, the world's largest Open
Source development site.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

Gmane