Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed trap door to work nicely

  • Loading branch information...
commit 12d8b1f4cdf86ee376f13692e4d9fa2ab65ef5ef 1 parent 38e29dd
@davewx7 davewx7 authored
View
43 data/level/test.cfg
@@ -5,7 +5,7 @@
"background_offset": [0,0],
"character": [
{
- "_addr": "0xe18e0d0",
+ "_addr": "0xa307c5b8",
"current_frame": "normal",
"custom": "yes",
"cycle": 5351,
@@ -21,7 +21,7 @@
"y": 352
},
{
- "_addr": "0xe1913e0",
+ "_addr": "0xa307d1c8",
"current_frame": "normal",
"custom": "yes",
"cycle": 5351,
@@ -37,7 +37,7 @@
"y": 384
},
{
- "_addr": "0xe192330",
+ "_addr": "0xa307d668",
"activation_area": [-1028,252,-509,515],
"current_frame": "normal",
"custom": "yes",
@@ -62,7 +62,7 @@
"y": 352
},
{
- "_addr": "0xe1927d0",
+ "_addr": "0xa307db08",
"activation_area": [-1412,92,-893,355],
"current_frame": "normal",
"custom": "yes",
@@ -87,7 +87,7 @@
"y": 192
},
{
- "_addr": "0xe199570",
+ "_addr": "0xa3084818",
"current_frame": "stand",
"custom": "yes",
"cycle": 7095,
@@ -154,7 +154,7 @@
"y": 320
},
{
- "_addr": "0xe195b48",
+ "_addr": "0xa3080df0",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -177,7 +177,7 @@
"zorder": 1
},
{
- "_addr": "0xe1abd58",
+ "_addr": "0xa3097000",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -200,7 +200,7 @@
"zorder": 2
},
{
- "_addr": "0xe1afb30",
+ "_addr": "0xa3098118",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -227,7 +227,7 @@
"y": 224
},
{
- "_addr": "0xe1b01d8",
+ "_addr": "0xa309b218",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -245,7 +245,7 @@
"y": 320
},
{
- "_addr": "0xe1b0678",
+ "_addr": "0xa309b8c0",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -268,7 +268,7 @@
"y": 288
},
{
- "_addr": "0xe1b0d20",
+ "_addr": "0xa309bf68",
"current_frame": "normal",
"custom": "yes",
"face_right": 0,
@@ -281,7 +281,7 @@
"y": 333
},
{
- "_addr": "0xa803350",
+ "_addr": "0xa309f020",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -292,6 +292,25 @@
"velocity_y": 0,
"x": -256,
"y": 320
+ },
+ {
+ "_addr": "0xa1fc45f8",
+ "current_frame": "normal",
+ "custom": "yes",
+ "face_right": 1,
+ "label": "_1806546b",
+ "time_in_frame": 0,
+ "type": "trap_door",
+ "vars": {
+ "delay_fall": 70,
+ "delay_rise": 50,
+ "left_paddle": null,
+ "right_paddle": null
+ },
+ "velocity_x": 0,
+ "velocity_y": 0,
+ "x": -160,
+ "y": 224
}
],
"dark_color": [0,1,2,3],
View
2  data/objects/enemies/milgram-hazards/trap_door.cfg
@@ -66,7 +66,7 @@ object_type: [
zorder: -1,
platform_area: [0,23,54,24],
on_create: "[fire_event('solidify')]",
- on_falldown: "[animation('falling'),set(platform_area, [0,0,1,1])]",
+ on_falldown: "[animation('falling'),set(platform_area, [0,0,0,0])]",
on_process_falling: "if(abs(rotate) < 90, add(rotate, facing*time_in_animation*20), set(rotate, 90*facing))",
on_rise: "animation('rising')",
on_process_rising: "if(abs(rotate) > 0, add(rotate, -1*facing), fire_event('solidify'))",
View
2  src/custom_object.cpp
@@ -2917,6 +2917,7 @@ void custom_object::set_value_by_slot(int slot, const variant& value)
case CUSTOM_OBJECT_PLATFORM_AREA: {
if(value.is_null()) {
platform_area_.reset();
+ calculate_solid_rect();
break;
}
@@ -2924,7 +2925,6 @@ void custom_object::set_value_by_slot(int slot, const variant& value)
ASSERT_LE(value.num_elements(), 4);
set_platform_area(rect(value));
- calculate_solid_rect();
break;
}
Please sign in to comment.
Something went wrong with that request. Please try again.