Commit Graph

193 Commits

Author SHA1 Message Date
Relintai 8cd5c05cb9 Updated the readme. 2023-01-09 20:59:08 +01:00
Relintai df35c65995 Work on fixing compile. 2023-01-09 20:03:37 +01:00
Relintai 0fd63f6cb6 Work on fixing compile. 2023-01-09 14:10:10 +01:00
Relintai 7ccb1b7819 Work on fixing compile. 2023-01-09 01:16:33 +01:00
Relintai a0ba4f2cab Updated register_types.h and cpp to the current godot 4 style. 2023-01-08 15:55:22 +01:00
Relintai 983090d21a Don't deallocate meshes on exit tree if the job is running. 2022-02-19 22:28:53 +01:00
Relintai 303343211f Fix early return in _setup_material_albedo. 2022-02-16 20:50:41 +01:00
Relintai 165048ded4 Get the dimensions from the texture instead of the image in texture_get_uv_rect of the material cache. This fixes some of the uv related issues on the webgl backend. 2022-02-16 20:48:55 +01:00
Relintai 401666b560 Move job creation from PropInstanceMerger's constructor to a virtual method. 2022-02-14 12:56:28 +01:00
Relintai deb664c781 Also check whether a job is valid before calling enter tree on it. 2022-02-14 12:50:30 +01:00
Relintai 10dbb857ce PropInstanceMerger: Set job's cancelled flag in build. Also call job's enter tree in set_job, and call it in enter tree if the job is valid, not the prop. 2022-02-14 12:49:12 +01:00
Relintai ce369408ca Fix compile after recent changes in Terraman. 2022-02-08 14:00:25 +01:00
Relintai 73dae84e9b Work on fixing compile for 4.0. 2022-02-07 00:19:52 +01:00
Relintai d66c8c4ac7 Updated copyright headers. 2022-01-12 22:15:58 +01:00
Relintai 1c59be4575 Re-extracted the class docs. 2022-01-12 22:15:46 +01:00
Relintai 2afd6eff45 Fix compile for older versions of the engine than 3.x. 2021-08-29 18:55:51 +02:00
Relintai 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
Relintai 4cc187303b Make sure PropInstancePropJob generates mesh when the prop only has tiled walls. 2021-08-27 19:26:16 +02:00
Relintai 0bfe718d03 Also copy _is_room and _room_bounds in PropData::copy_from. 2021-08-26 20:51:16 +02:00
Relintai 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
Relintai 5f915d4dd2 Cleanups to the collision shape code in TiledWall. Still unfinished though. 2021-08-25 22:54:00 +02:00
Relintai cd4f9adfd9 Added collision layers to TiledWall aswell. 2021-08-25 22:29:49 +02:00
Relintai 6f7b618622 Reverse the order of the getter and setter to match the style I use. 2021-08-25 22:29:00 +02:00
Relintai c6f6871fc2 Added collision layer and mask support to PropInstance. 2021-08-25 22:21:34 +02:00
Relintai 7ccdbd474c Fixed collision shape positions in PropInstanceMerger. Also improved it's collision shape / physics body handling. 2021-08-25 20:37:37 +02:00
Relintai 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
Relintai 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
Relintai a0153bbe0b Started work on collision support for the TIledWall. 2021-08-18 21:16:58 +02:00
Relintai 19b182dd71 Don't build if not in tree. 2021-08-18 20:41:10 +02:00
Relintai 681cdb21c6 Collider support for TiledWalls in PropInstanceMerger. 2021-08-18 20:35:12 +02:00
Relintai 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
Relintai 1143adf7ee Moved phase_physics_process and phase_prop in file. 2021-08-18 18:50:52 +02:00
Relintai 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
Relintai f2d1383ba8 Only transform the normal with the basis. 2021-08-18 18:45:40 +02:00
Relintai 2fcab242f9 Now TiledWalls can be serialized into props. 2021-08-18 18:06:09 +02:00
Relintai b18fc92ebb Make sure to call initial_setup_default in cache. 2021-08-18 17:24:48 +02:00
Relintai 9d26fd35f2 Implemented flavours. 2021-08-18 17:10:45 +02:00
Relintai 9c970bbed5 Make sure to duplicate the materials before adding them to the cache in _setup_cache. 2021-08-18 16:57:11 +02:00
Relintai 1f45f626d3 Call emit_changed() in TiledWallData in every setter. 2021-08-18 16:55:30 +02:00
Relintai e23382ac75 Fix mesh indices. 2021-08-18 16:52:02 +02:00
Relintai 97b6897429 Make sure to clear the mesh when the width of the height changes. 2021-08-18 16:28:36 +02:00
Relintai 12a4e03376 Fix the normal's directions. 2021-08-18 16:19:05 +02:00
Relintai 104a1c63d0 Implemented texture rects for the tiled wall mesher. 2021-08-18 16:16:09 +02:00
Relintai 67e9407188 Fix collision property. 2021-08-18 16:09:56 +02:00
Relintai 4d7d66e969 Implemented TiledWall meshing. 2021-08-18 16:07:03 +02:00
Relintai 78f049e8c9 Fixed binding for tiling_type. 2021-08-18 16:06:49 +02:00
Relintai 3c3e057182 Check for the VERSION_MAJOR define instead of the GODOT4. 2021-08-17 20:03:57 +02:00
Relintai 2e4ab17d2e More cleanups/initial setup for TiledWall. 2021-08-17 18:07:17 +02:00
Relintai e2916f12b3 Initial TiledWall cleanup. 2021-08-17 17:41:22 +02:00
Relintai 874c84e631 Removed texture rects from TiledWallData. I realized it's not going to work like this. 2021-08-17 17:32:59 +02:00