small fixes
This commit is contained in:
parent
95047562d7
commit
4613a3f2c0
2 changed files with 8 additions and 5 deletions
|
@ -67,11 +67,14 @@ void String::copy_from(const char *p_cstr) {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
resize(len+1); // include 0
|
||||
|
||||
for(int i=0;i<len+1;i++) {
|
||||
|
||||
set(i,p_cstr[i]);
|
||||
CharType *dst = this->ptr();
|
||||
|
||||
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);
|
||||
|
||||
Vector2 cdir = body->get_one_way_collision_direction();
|
||||
if (cdir!=Vector2() && p_motion.dot(cdir)<0)
|
||||
continue;
|
||||
//if (cdir!=Vector2() && p_motion.dot(cdir)<0)
|
||||
// continue;
|
||||
|
||||
cbk.valid_dir=cdir;
|
||||
cbk.valid_depth=body->get_one_way_collision_max_depth();
|
||||
|
|
Loading…
Reference in a new issue