|
本帖最后由 657776724 于 2016-1-22 23:00 编辑
! w7 T- Y. A z3 L/ K
: E Y: ^8 L2 q引起问题的代码如下:
8 B: }) C5 n8 g1 v9 t传送带的消息触发:实现的逻辑是使用在开始的时候一次性产生多个搬运动作- treenode ts = createemptytasksequence(crane,0,0);% y6 n( i# _+ E( o% L
- for(int i=1;i<=35;i++) / a8 @1 _) B- B, f8 d
- {. W. w3 m4 G% d# _
- item1=rank(qu,i);! q* U6 T# i0 n
- inserttask(ts,TASKTYPE_TRAVEL,qu,NULL);5 Y- y" r! s0 X$ {# n" V
- inserttask(ts,TASKTYPE_FRLOAD,item1,qu);
7 r+ Q1 j& U4 L8 B- ^* a4 N - inserttask(ts,TASKTYPE_TRAVEL,des,NULL);
. S" O, Z3 w b- {# J. Q. o0 m* E - inserttask(ts,TASKTYPE_FRUNLOAD,item1,des);
5 t* _1 x$ x: T N - }
+ p5 l* T5 R+ h) z8 C - inserttask(ts,TASKTYPE_SENDMESSAGE,current,current,2);
- w/ k" ^5 d1 ?" S0 ~4 }1 F - dispatchtasksequence(ts);
复制代码 问题是在固定随机数流的情况下,所以才觉得奇怪,按理说固定随机数的时候每次运行的结果应该是一样的吧 |
|