Fix compile.

This commit is contained in:
Relintai 2021-11-23 17:11:38 +01:00
parent 0bb9bb898c
commit 4ba39e4438
5 changed files with 20 additions and 12 deletions

4
SCsub
View File

@ -6,8 +6,8 @@ module_env = env.Clone()
import version
if os.path.isdir('../mesh_data_resource'):
module_env.Append(CPPDEFINES=['MESH_DATA_RESOURCE_PRESENT'])
#if os.path.isdir('../mesh_data_resource'):
#module_env.Append(CPPDEFINES=['MESH_DATA_RESOURCE_PRESENT'])
has_texture_packer = False

View File

@ -22,9 +22,9 @@ SOFTWARE.
#include "prop_material_cache.h"
#include "../../props/props/prop_data.h"
#include "../../props/props/prop_data_prop.h"
#include "../../props/props/prop_data_tiled_wall.h"
#include "../props/prop_data.h"
#include "../props/prop_data_prop.h"
#include "../props/prop_data_tiled_wall.h"
#include "../singleton/prop_cache.h"
#include "../tiled_wall/tiled_wall_data.h"

View File

@ -207,7 +207,10 @@ void PropInstancePropJob::_reset() {
_prop_tiled_wall_datas.clear();
#if MESH_DATA_RESOURCE_PRESENT
_prop_mesh_datas.clear();
#endif
clear_collision_shapes();
set_build_phase_type(BUILD_PHASE_TYPE_PHYSICS_PROCESS);
@ -296,7 +299,12 @@ void PropInstancePropJob::phase_prop() {
}
if (should_do()) {
if (_prop_mesh_datas.size() == 0 && _prop_tiled_wall_datas.size() == 0) {
if (
#if MESH_DATA_RESOURCE_PRESENT
_prop_mesh_datas.size() == 0 &&
#endif
_prop_tiled_wall_datas.size() == 0) {
//reset_meshes();
reset_stages();
set_complete(true); //So threadpool knows it's done

View File

@ -77,7 +77,7 @@ SOFTWARE.
static PropUtils *prop_utils = NULL;
static PropCache *prop_texture_cache = NULL;
void register_props_types() {
void register_props_2d_types() {
ClassDB::register_class<TiledWall>();
ClassDB::register_class<TiledWallData>();
@ -148,7 +148,7 @@ void register_props_types() {
#endif
}
void unregister_props_types() {
void unregister_props_2d_types() {
if (prop_utils) {
memdelete(prop_utils);
}

View File

@ -20,10 +20,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef PROPS_REGISTER_TYPES_H
#define PROPS_REGISTER_TYPES_H
#ifndef PROPS_2D_REGISTER_TYPES_H
#define PROPS_2D_REGISTER_TYPES_H
void register_props_types();
void unregister_props_types();
void register_props_2d_types();
void unregister_props_2d_types();
#endif