-fix bug in animation editor
-fix crash bug in physics motion, closes #1993
This commit is contained in:
parent
57a78ec06b
commit
f62961aba3
@ -2,3 +2,10 @@
|
||||
|
||||
name="Motion Test"
|
||||
main_scene="res://motion.scn"
|
||||
|
||||
[display]
|
||||
|
||||
width=800
|
||||
height=600
|
||||
stretch_mode="2d"
|
||||
stretch_aspect="keep"
|
||||
|
@ -224,7 +224,7 @@ public:
|
||||
bool body_test_motion(RID p_body,const Vector2& p_motion,float p_margin=0.001,MotionResult *r_result=NULL) {
|
||||
|
||||
ERR_FAIL_COND_V(main_thread!=Thread::get_caller_ID(),false);
|
||||
return body_test_motion(p_body,p_motion,p_margin,r_result);
|
||||
return physics_2d_server->body_test_motion(p_body,p_motion,p_margin,r_result);
|
||||
}
|
||||
|
||||
/* JOINT API */
|
||||
|
@ -1327,8 +1327,16 @@ void AnimationKeyEditor::_track_editor_draw() {
|
||||
float time = animation->track_get_key_time(idx,i);
|
||||
if (time<keys_from)
|
||||
continue;
|
||||
if (time>keys_to)
|
||||
if (time>keys_to) {
|
||||
|
||||
if (first && i>0 && animation->track_get_key_value(idx,i)==animation->track_get_key_value(idx,i-1)) {
|
||||
//draw whole line
|
||||
te->draw_line(ofs+Vector2(name_limit,y+h/2),ofs+Point2(settings_limit,y+h/2),color);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
float x = key_hofs + name_limit + (time-keys_from)*zoom_scale;
|
||||
|
||||
Ref<Texture> tex = type_icon[tt];
|
||||
|
Loading…
Reference in New Issue
Block a user