Skip to content

Commit

Permalink
-improved physics ccd
Browse files Browse the repository at this point in the history
-html5 exporter works again
-disable repeat on image loader by default
-can change shape offset en tileset, texture offset was broken
  • Loading branch information
reduz committed Feb 19, 2014
1 parent 8c1731b commit d7d65fa
Show file tree
Hide file tree
Showing 65 changed files with 69,928 additions and 68,284 deletions.
2 changes: 1 addition & 1 deletion bin/tests/test_physics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class TestPhysicsMainLoop : public MainLoop {
PhysicsServer * ps = PhysicsServer::get_singleton();

RID mesh_instance = vs->instance_create2(type_mesh_map[p_shape],scenario);
RID body = ps->body_create(p_body,!p_active_default);
RID body = ps->body_create(p_body,!p_active_default);
ps->body_set_space(body,space);
ps->body_set_param(body,PhysicsServer::BODY_PARAM_BOUNCE,0.5);
//todo set space
Expand Down
1 change: 1 addition & 0 deletions bin/tests/test_physics_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ class TestPhysics2DMainLoop : public MainLoop {
RID body = ps->body_create();
ps->body_add_shape(body,body_shape_data[p_shape].shape);
ps->body_set_space(body,space);
ps->body_set_continuous_collision_detection_mode(body,Physics2DServer::CCD_MODE_CAST_SHAPE);
ps->body_set_state(body,Physics2DServer::BODY_STATE_TRANSFORM,p_xform);

// print_line("add body with xform: "+p_xform);
Expand Down
7 changes: 7 additions & 0 deletions core/globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ bool Globals::_load_resource_pack(const String& p_pack) {

//if data.pck is found, all directory access will be from here
DirAccess::make_default<DirAccessPack>(DirAccess::ACCESS_RESOURCES);
using_datapack=true;

return true;
}
Expand Down Expand Up @@ -1327,6 +1328,10 @@ void Globals::set_disable_platform_override(bool p_disable) {
disable_platform_override=p_disable;
}

bool Globals::is_using_datapack() const {

return using_datapack;
}

void Globals::_bind_methods() {

Expand Down Expand Up @@ -1439,6 +1444,8 @@ Globals::Globals() {
custom_prop_info["render/mipmap_policy"]=PropertyInfo(Variant::INT,"render/mipmap_policy",PROPERTY_HINT_ENUM,"Allow,Allow For Po2,Disallow");
custom_prop_info["render/thread_model"]=PropertyInfo(Variant::INT,"render/thread_model",PROPERTY_HINT_ENUM,"Single-Unsafe,Single-Safe,Multi-Threaded");
set("display/emulate_touchscreen",false);

using_datapack=false;
}


Expand Down
3 changes: 3 additions & 0 deletions core/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class Globals : public Object {
String resource_path;
HashMap<String,PropertyInfo> custom_prop_info;
bool disable_platform_override;
bool using_datapack;


bool _set(const StringName& p_name, const Variant& p_value);
Expand Down Expand Up @@ -127,6 +128,8 @@ class Globals : public Object {

void register_global_defaults();

bool is_using_datapack() const;

Globals();
~Globals();

Expand Down
Loading

0 comments on commit d7d65fa

Please sign in to comment.