Commit Graph

127 Commits

Author SHA1 Message Date
Yao Wei Tjong 姚伟忠
4edba76ec2 Fix AngelScript and Lua bindings. Fix Lua samples to use new getters.
Tips: use this one liner to convert Lua scripts to use new getter signature.
find . -type f -exec grep -lP "eventData:Get.+?\(.+?\)" {} \; |xargs -n 1  perl -pi.bak -e 's/eventData:Get(.+?)\((?:([^,)]+),\s*(.*?)|(.+?))\)/eventData[\3\4]:Get\1(\2)/g'
2015-08-10 01:51:26 +08:00
Yao Wei Tjong 姚伟忠
4807206bd7 Bind all variant types from C++ to Lua and vice versa. See #820.
Other misc Lua binding enhancements:
- VariantMap in Lua can be indexed using both string literal and unsigned int literal. Internally they are both converted to StringHash. Lua table of strings/variants and any registered user types are now accepted as RHS value when assigning VariantMap's value, the variant type would be set accordingly based on the lua object type. Refcounted object would end up as VAR_PTR while others as VAR_VOIDPTR.
- Variant knows how to convert to string implicitly.
2015-08-10 01:51:26 +08:00
Yao Wei Tjong 姚伟忠
8acb9e6441 Fix Variant and VariantMap bindings to Lua. Close #820.
Add Lua bindings to return VariantVector as table of Variant.
Fix Lua database demo. It is in full working condition now.
[ci only: database, OSX]
2015-08-10 01:51:26 +08:00
Yao Wei Tjong 姚伟忠
842de2fe48 Exposed the database subsystem API to scripting.
Add AngelScript version of the database demo.
Add Lua versio nof the database demo. WIP.
2015-08-10 01:51:26 +08:00
Ivan K
d540f79eec Localization: fixes, adding comments, reworking samples, partial russification of editor 2015-07-19 16:07:24 +04:00
Ivan K
1d845712c8 Internationalization: initial commit
Localization
2015-07-18 14:43:51 +04:00
Yao Wei Tjong 姚伟忠
88d86548a4 Further minor clean up the CrowdAgent class.
Revise the sample so Jack walk and turn more naturally.
2015-05-28 17:52:12 +08:00
Yao Wei Tjong 姚伟忠
6b72c4412a Minor code clean up and bug fixes for DetourCrowd implementation.
Avoid using multiple vectors to hold the same set of objects in the DetourCrowd sample.
2015-05-27 21:51:10 +08:00
Mike3D
e166e7a84d Added moving obstacles and teleportation to sample 39. Also various behavior tweaks and ground texture modified to break monotony and discriminate with sample 15. If something doesn't appeal it can be reverted.
Also set default mask and areaID at OffMeshConnection initialization.
2015-05-23 09:27:39 +02:00
Mike3D
7f3a6ef86b Added off-mesh connections to sample 39 2015-05-20 10:56:32 +02:00
Mike3D
3fbb34f406 Use node instead of GetNode() in lua samples
Also simplified sample 15 for lua
2015-05-17 17:30:37 +02:00
Lasse Öörni
f9f920964f Remove agents & obstacles on OnNodeSet(null), similar to Drawables. Do not allow adding an agent when node is already null. Added missing enum in AngelScript navigation API. Do not keep a persistent array of agent handles in the AngelScript crowd example, as that keeps the agents alive even past removal from scene. Closes #729. 2015-05-17 16:54:57 +03:00
Mike3D
cca861f6d3 Simplified sample 39 using the crowd manager 2015-05-17 10:15:41 +02:00
JSandusky
ca7a6af1f3 CrowdAgent state handling
- CrowdAgentStateChanged event includes Node and Agent parameters
- CrowdAgentFailure event for target/agent-state failures
- GetAreaCost in NavigationMesh, script bindings updated
- Fixed error spawning Jack nodes on top of boxes in Angelscript sample
- DebugRendering for DynamicNavigationMesh layers
- Rename all references to AreaType as AreaID
- CrowdAgent angelscript enum bindings made consistent
- Include simple example handling of CrowdAgentFailure for faulty
initial state (sides of boxes) in all samples
- Consistent values in samples (box/mushroom counts)
- Completed "todo" for investigating rcFilterLedgeSpans in
DynamicNavigationMesh
2015-05-12 02:29:32 -04:00
Mike3D
581d1b550b Do not hardcode obstacle radius 2015-05-07 17:20:05 +02:00
Yao Wei Tjong 姚伟忠
252206a207 Decouple Physics subsystem from DetourCrowd implementation.
Also minor code clean up (dot the i's and cross the t's).
2015-05-07 16:52:18 +08:00
Lasse Öörni
8f29e751b7 Fix memory leak in NavBuildData. Match capitalization of the CrowdNavigation help text in all versions. 2015-05-05 17:58:31 +03:00
JSandusky
567a29d74e Implementation of DetourCrowd and DetourTileCache
Added Components:
- DynamicNavigationMesh (uses DetourTileCache)
- Obstacle (interacts with DynamicNavigationMesh)
- DetourCrowdManager (uses DetourCrowd for crowd control)
- CrowdAgent (interacts with DetourCrowdManager)
- NavArea (marks area types)

Changes:
- Refactor NavigationMesh build process
- Addition of cylinder debug rendering
- Exposed Area Type Costs in navigation

CrowdNavigation sample for Lua, Angelscript, and C++ using
DynamicNavigationMesh, Obstacle, CrowdAgent, and DetourCrowdManager
components.
2015-05-04 22:14:00 -04:00
Lasse Öörni
ba777f0d17 Fix omissions in Lua VertexBuffer / IndexBuffer / Model bindings. Add 34_DynamicGeometry.lua example. Closes #704. 2015-04-27 13:32:39 +03:00
aster2013
c8ed3759d8 Fix bug.[ci skip] 2015-02-03 19:36:28 +08:00
Mike3D
6f7ff7f5f9 Simplify sample 18 for lua 2015-01-19 16:49:45 +01:00
Yao Wei Tjong 姚伟忠
05dd995b85 Refactor all the codes and scripts to use the renamed 'bin' subdir. 2015-01-18 21:40:54 +08:00
Yao Wei Tjong 姚伟忠
05a8b79fd2 Rename "Bin" subdir to "bin". 2015-01-18 21:31:13 +08:00
Yao Wei Tjong 姚伟忠
f1e564fe00 Fix the directory name. [ci skip] 2014-03-05 12:33:30 +08:00
aster2013
058347b555 Don't export LuaScript to Lua API, make SetExecuteConsoleCommands GetExecuteConsoleCommands as global functions. 2014-03-05 12:17:07 +08:00
Lasse Öörni
8990f7129b Fixed comment. 2014-03-04 22:16:52 +02:00
Lasse Öörni
554e19628e Added Lua version of ConsoleInput sample. 2014-03-04 22:08:52 +02:00