Commit Graph

177 Commits

Author SHA1 Message Date
d9d157bf37 Make sure to set job's state to incomplete before building in PropInstanceMerger. This fixes complex mesh builds when threading is disabled. 2021-08-28 11:28:52 +02:00
4cc187303b Make sure PropInstancePropJob generates mesh when the prop only has tiled walls. 2021-08-27 19:26:16 +02:00
0bfe718d03 Also copy _is_room and _room_bounds in PropData::copy_from. 2021-08-26 20:51:16 +02:00
6fe7427b03 Check whether the cache has materials instead of whether it's initialized or not in PropInstanceMerger::_build. 2021-08-25 23:42:23 +02:00
5f915d4dd2 Cleanups to the collision shape code in TiledWall. Still unfinished though. 2021-08-25 22:54:00 +02:00
cd4f9adfd9 Added collision layers to TiledWall aswell. 2021-08-25 22:29:49 +02:00
6f7b618622 Reverse the order of the getter and setter to match the style I use. 2021-08-25 22:29:00 +02:00
c6f6871fc2 Added collision layer and mask support to PropInstance. 2021-08-25 22:21:34 +02:00
7ccdbd474c Fixed collision shape positions in PropInstanceMerger. Also improved it's collision shape / physics body handling. 2021-08-25 20:37:37 +02:00
2568178b42 Only call initial_setup_default on the main thread, and document that shader duplication can crash if done from a different thread. Removed the material mutex from the prop cache as it's not needed anymore. 2021-08-25 17:24:25 +02:00
4be30142fb Added a mutex to ensure_materials_loaded in PropCache. This fixes potential "ERROR: Another resource is loaded from path" when spawning lots of PropInstanceMergers for the first time. 2021-08-25 01:20:12 +02:00
a0153bbe0b Started work on collision support for the TIledWall. 2021-08-18 21:16:58 +02:00
19b182dd71 Don't build if not in tree. 2021-08-18 20:41:10 +02:00
681cdb21c6 Collider support for TiledWalls in PropInstanceMerger. 2021-08-18 20:35:12 +02:00
5baba6436f Moved the cache setup code from PropInstanceMerger to the prop job this makes the texture merge actually threaded. 2021-08-18 18:57:19 +02:00
1143adf7ee Moved phase_physics_process and phase_prop in file. 2021-08-18 18:50:52 +02:00
51e3254bfc Tiled Wall support for PropInstance and PropinstanceMerger. Also fixed a double transform multiplication with MeshDataResources in PropInstanceMerger. 2021-08-18 18:48:13 +02:00
f2d1383ba8 Only transform the normal with the basis. 2021-08-18 18:45:40 +02:00
2fcab242f9 Now TiledWalls can be serialized into props. 2021-08-18 18:06:09 +02:00
b18fc92ebb Make sure to call initial_setup_default in cache. 2021-08-18 17:24:48 +02:00
9d26fd35f2 Implemented flavours. 2021-08-18 17:10:45 +02:00
9c970bbed5 Make sure to duplicate the materials before adding them to the cache in _setup_cache. 2021-08-18 16:57:11 +02:00
1f45f626d3 Call emit_changed() in TiledWallData in every setter. 2021-08-18 16:55:30 +02:00
e23382ac75 Fix mesh indices. 2021-08-18 16:52:02 +02:00
97b6897429 Make sure to clear the mesh when the width of the height changes. 2021-08-18 16:28:36 +02:00
12a4e03376 Fix the normal's directions. 2021-08-18 16:19:05 +02:00
104a1c63d0 Implemented texture rects for the tiled wall mesher. 2021-08-18 16:16:09 +02:00
67e9407188 Fix collision property. 2021-08-18 16:09:56 +02:00
4d7d66e969 Implemented TiledWall meshing. 2021-08-18 16:07:03 +02:00
78f049e8c9 Fixed binding for tiling_type. 2021-08-18 16:06:49 +02:00
3c3e057182 Check for the VERSION_MAJOR define instead of the GODOT4. 2021-08-17 20:03:57 +02:00
2e4ab17d2e More cleanups/initial setup for TiledWall. 2021-08-17 18:07:17 +02:00
e2916f12b3 Initial TiledWall cleanup. 2021-08-17 17:41:22 +02:00
874c84e631 Removed texture rects from TiledWallData. I realized it's not going to work like this. 2021-08-17 17:32:59 +02:00
68d448f5e1 Small temporary notes. 2021-08-17 16:31:51 +02:00
5a584fa578 Added a small comment. 2021-08-17 14:56:11 +02:00
97759a63ea Added custom rect support for textures into TiledWallData. Also implemented _setup_rects. 2021-08-17 13:47:34 +02:00
e0c9ff44e9 Added setup_cache and setup_rects methods to the TiledWallData. 2021-08-17 13:10:37 +02:00
72e25437bd Fix missing include, and missing binds. 2021-08-17 12:48:42 +02:00
e7e50c0e8a Add material cache storage for TiledWalls into PropCache. 2021-08-17 12:46:20 +02:00
c68671ff94 Added materials to the TiledWallData. 2021-08-17 12:40:19 +02:00
b95ebbda75 Fail if tiled_wall_data is not valid, and also copy the new tiling type property. 2021-08-17 12:30:57 +02:00
b057e8d9af Added a tiling type enum to TiledWallData. Also removed the now unused members and renamed a parameter. 2021-08-17 02:24:32 +02:00
362f8f803b Removed the unneeded properties from TiledWallData. 2021-08-17 02:08:48 +02:00
b311a2656c Make Ref parameters references wherever possible in TiledWallData. 2021-08-17 01:15:20 +02:00
acf1af1e77 Added an another set of getters/setters for flavour textures into TiledWallData. 2021-08-17 01:12:56 +02:00
b292a387cb Rename the prop getters to texture getters in TiledWallData. 2021-08-17 01:04:00 +02:00
fbafc568d7 Added TiledWall and TiledWallData classes. Just a skeleton for now. 2021-08-16 17:44:28 +02:00
2c7ce2fc07 Added PropDataPortal. It can be used to save Portal data into props. 2021-08-14 19:01:47 +02:00
6518bba651 Now the room hull generation tool will generate a bit more optimized meshes. It's not too bad but the meshes can still be optimized a bit. The commit contains some commented out code for now. I'll try to think up a way to remove all unneeded points from the hull. 2021-08-14 18:35:53 +02:00