Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitec9e0c9

Browse files
committed
Update the version to 3.6.38
1 parent8f314f7 commitec9e0c9

File tree

27 files changed

+218
-178
lines changed

27 files changed

+218
-178
lines changed

‎CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ cmake_minimum_required (VERSION 2.8)
3131
# set(CMAKE_CONFIGURATION_TYPES "Debug;Release;Profile" CACHE STRING "" FORCE)
3232
set(CMAKE_CONFIGURATION_TYPES"Debug;Release"CACHESTRING"" FORCE)
3333

34-
set (BEHAVIAC_PACKAGE_VERSION 3.6.37)
34+
set (BEHAVIAC_PACKAGE_VERSION 3.6.38)
3535

3636
#option( BUILD_SHARED_LIBS "set to OFF to build static libraries" ON )
3737
SET(BUILD_SHARED_LIBSONCACHEBOOL"set to OFF to build static libraries")

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/Tencent/behaviac/blob/master/license.txt)
2-
[![Release Version](https://img.shields.io/badge/release-3.6.37-red.svg)](https://github.com/Tencent/behaviac/releases)
2+
[![Release Version](https://img.shields.io/badge/release-3.6.38-red.svg)](https://github.com/Tencent/behaviac/releases)
33
[![Updates](https://img.shields.io/badge/Platform-%20iOS%20%7C%20OS%20X%20%7C%20Android%20%7C%20Windows%20%7C%20Linux%20-brightgreen.svg)](https://github.com/Tencent/behaviac/blob/master/history.txt)
44
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/behaviac/pulls)
55

‎history.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2017-08-17 3.6.38
2+
Improve the GC for the C#.
3+
14
2017-08-08 3.6.37
25
Support generating the codes for initializing the member array.
36

‎inc/behaviac/common/_config.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
#defineBEHAVIAC_RELEASE 0
1212
#endif
1313

14-
#defineBEHAVIAC_VERSION_STRING "3.6.37"
14+
#defineBEHAVIAC_VERSION_STRING "3.6.38"
1515

‎integration/demo_running/behaviac/Agent/Agent.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,6 @@ public void LogVariables(bool bForce)
13651365
}
13661366
}
13671367
}
1368-
13691368
#endif
13701369
}
13711370

@@ -1375,9 +1374,11 @@ public void LogRunningNodes()
13751374
if(Config.IsLoggingOrSocketing&&this.m_currentBT!=null)
13761375
{
13771376
List<BehaviorTask>runningNodes=this.m_currentBT.GetRunningNodes(false);
1377+
vare=runningNodes.GetEnumerator();
13781378

1379-
foreach(BehaviorTaskbehaviorTaskinrunningNodes)
1379+
while(e.MoveNext())
13801380
{
1381+
BehaviorTaskbehaviorTask=e.Current;
13811382
stringbtStr=BehaviorTask.GetTickInfo(this,behaviorTask,"enter");
13821383

13831384
//empty btStr is for internal BehaviorTreeTask

‎integration/demo_running/behaviac/Base/Operation.cs‎

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1+
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
22
// Tencent is pleased to support the open source community by making behaviac available.
33
//
44
// Copyright (C) 2015-2017 THL A29 Limited, a Tencent company. All rights reserved.
@@ -1818,37 +1818,41 @@ public static EOperatorType ParseOperatorType(string operatorType)
18181818

18191819
publicstaticboolCompare<T>(Tleft,Tright,EOperatorTypecomparisonType)
18201820
{
1821-
boolbLeftNull=(left==null);
1822-
boolbRightNull=(right==null);
1823-
1824-
if(bLeftNull&&bRightNull)// both are null
1825-
{
1826-
if(comparisonType==EOperatorType.E_EQUAL)
1827-
{
1828-
returntrue;
1829-
}
1830-
elseif(comparisonType==EOperatorType.E_NOTEQUAL)
1831-
{
1832-
returnfalse;
1833-
}
1834-
else
1835-
{
1836-
Debug.Check(false);
1837-
}
1838-
}
1839-
elseif(bLeftNull||bRightNull)// one is null and ther other one is not null
1821+
Typetype=typeof(T);
1822+
if(!type.IsValueType)
18401823
{
1841-
if(comparisonType==EOperatorType.E_EQUAL)
1842-
{
1843-
returnfalse;
1844-
}
1845-
elseif(comparisonType==EOperatorType.E_NOTEQUAL)
1824+
boolbLeftNull=(left==null);
1825+
boolbRightNull=(right==null);
1826+
1827+
if(bLeftNull&&bRightNull)// both are null
18461828
{
1847-
returntrue;
1829+
if(comparisonType==EOperatorType.E_EQUAL)
1830+
{
1831+
returntrue;
1832+
}
1833+
elseif(comparisonType==EOperatorType.E_NOTEQUAL)
1834+
{
1835+
returnfalse;
1836+
}
1837+
else
1838+
{
1839+
Debug.Check(false);
1840+
}
18481841
}
1849-
else
1842+
elseif(bLeftNull||bRightNull)// one is null and the other is not null
18501843
{
1851-
Debug.Check(false);
1844+
if(comparisonType==EOperatorType.E_EQUAL)
1845+
{
1846+
returnfalse;
1847+
}
1848+
elseif(comparisonType==EOperatorType.E_NOTEQUAL)
1849+
{
1850+
returntrue;
1851+
}
1852+
else
1853+
{
1854+
Debug.Check(false);
1855+
}
18521856
}
18531857
}
18541858

@@ -1878,15 +1882,9 @@ public static bool Compare<T>(T left, T right, EOperatorType comparisonType)
18781882
}
18791883
}
18801884

1881-
Typetype=typeof(T);
1882-
18831885
if(!type.IsValueType)
18841886
{
1885-
// reference type
1886-
objectl=(object)left;
1887-
objectr=(object)right;
1888-
1889-
boolbEqual=Object.ReferenceEquals(l,r);
1887+
boolbEqual=Object.ReferenceEquals(left,right);
18901888

18911889
if(bEqual)
18921890
{

‎integration/demo_running/behaviac/BehaviorTree/BehaviorTree.cs‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,9 +1494,12 @@ public void InstantiatePars(Dictionary<uint, IInstantiatedVariable> vars)
14941494
{
14951495
if(this.m_localProps!=null)
14961496
{
1497-
foreach(KeyValuePair<uint,ICustomizedProperty>pairinthis.m_localProps)
1497+
vare=this.m_localProps.Keys.GetEnumerator();
1498+
1499+
while(e.MoveNext())
14981500
{
1499-
vars[pair.Key]=pair.Value.Instantiate();
1501+
uintvarId=e.Current;
1502+
vars[varId]=this.m_localProps[varId].Instantiate();
15001503
}
15011504
}
15021505
}
@@ -1505,8 +1508,11 @@ public void UnInstantiatePars(Dictionary<uint, IInstantiatedVariable> vars)
15051508
{
15061509
if(this.m_localProps!=null)
15071510
{
1508-
foreach(uintvarIdinthis.m_localProps.Keys)
1511+
vare=this.m_localProps.Keys.GetEnumerator();
1512+
1513+
while(e.MoveNext())
15091514
{
1515+
uintvarId=e.Current;
15101516
vars.Remove(varId);
15111517
}
15121518
}

‎integration/demo_running/behaviac/BehaviorTree/BehaviorTree_task.cs‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,9 +1372,12 @@ internal void AddVariables(Dictionary<uint, IInstantiatedVariable> vars)
13721372
{
13731373
if(vars!=null)
13741374
{
1375-
foreach(KeyValuePair<uint,IInstantiatedVariable>pairinvars)
1375+
vare=vars.Keys.GetEnumerator();
1376+
1377+
while(e.MoveNext())
13761378
{
1377-
this.LocalVars[pair.Key]=pair.Value;
1379+
uintvarId=e.Current;
1380+
this.LocalVars[varId]=vars[varId];
13781381
}
13791382
}
13801383
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.6.37
1+
3.6.38

‎integration/unity/Assets/Scripts/behaviac/runtime/Agent/Agent.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,6 @@ public void LogVariables(bool bForce)
13651365
}
13661366
}
13671367
}
1368-
13691368
#endif
13701369
}
13711370

@@ -1375,9 +1374,11 @@ public void LogRunningNodes()
13751374
if(Config.IsLoggingOrSocketing&&this.m_currentBT!=null)
13761375
{
13771376
List<BehaviorTask>runningNodes=this.m_currentBT.GetRunningNodes(false);
1377+
vare=runningNodes.GetEnumerator();
13781378

1379-
foreach(BehaviorTaskbehaviorTaskinrunningNodes)
1379+
while(e.MoveNext())
13801380
{
1381+
BehaviorTaskbehaviorTask=e.Current;
13811382
stringbtStr=BehaviorTask.GetTickInfo(this,behaviorTask,"enter");
13821383

13831384
//empty btStr is for internal BehaviorTreeTask

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp