Proper town logic; needs lots of fixing
This commit is contained in:
@@ -352,7 +352,7 @@ void Characters_::character_physics(Object *obj)
|
||||
} else if (obj->has_meta("cmdqueue") && obj->has_meta("climb")) {
|
||||
go = true;
|
||||
}
|
||||
if (!kb->is_on_floor() && !obj->has_meta("climb"))
|
||||
if (!kb->is_on_floor() && !obj->has_meta("climb") && !obj->has_meta("vehicle"))
|
||||
velocity += Vector3(0.0f, -9.8f, 0.0f);
|
||||
if (go)
|
||||
velocity = kb->move_and_slide(velocity, Vector3(0.0f, 1.0f, 0.0f), true, 4, 0.785f, false);
|
||||
@@ -605,7 +605,6 @@ void Characters_::_notification(int p_what)
|
||||
continue;
|
||||
if (!ch->has_meta("orientation"))
|
||||
continue;
|
||||
printf("running physics for %p\n", ch);
|
||||
character_physics(ch);
|
||||
Spatial *sp = Object::cast_to<Spatial>(ch);
|
||||
Vector3 direction = sp->get_global_transform().xform(Vector3(0, 0, -1));
|
||||
|
||||
Reference in New Issue
Block a user