small fixes
This commit is contained in:
parent
95047562d7
commit
4613a3f2c0
|
@ -67,11 +67,14 @@ void String::copy_from(const char *p_cstr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resize(len+1); // include 0
|
resize(len+1); // include 0
|
||||||
|
|
||||||
for(int i=0;i<len+1;i++) {
|
CharType *dst = this->ptr();
|
||||||
|
|
||||||
set(i,p_cstr[i]);
|
for (int i=0;i<len+1;i++) {
|
||||||
|
|
||||||
|
dst[i]=p_cstr[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -657,8 +657,8 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body,const Vector2&p_motion,float p
|
||||||
const Body2DSW *body=static_cast<const Body2DSW*>(col_obj);
|
const Body2DSW *body=static_cast<const Body2DSW*>(col_obj);
|
||||||
|
|
||||||
Vector2 cdir = body->get_one_way_collision_direction();
|
Vector2 cdir = body->get_one_way_collision_direction();
|
||||||
if (cdir!=Vector2() && p_motion.dot(cdir)<0)
|
//if (cdir!=Vector2() && p_motion.dot(cdir)<0)
|
||||||
continue;
|
// continue;
|
||||||
|
|
||||||
cbk.valid_dir=cdir;
|
cbk.valid_dir=cdir;
|
||||||
cbk.valid_depth=body->get_one_way_collision_max_depth();
|
cbk.valid_depth=body->get_one_way_collision_max_depth();
|
||||||
|
|
Loading…
Reference in a new issue