summaryrefslogtreecommitdiff
path: root/navit/vehicleprofile.c
diff options
context:
space:
mode:
authormdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-08-28 21:14:48 +0000
committermdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-08-28 21:14:48 +0000
commit71a8b90cf0fee3f2550978aeacc35ae8f3eb944b (patch)
treeec7c2eeee317f0bab38b5c971745811a0e7b8d06 /navit/vehicleprofile.c
parent4fe726255458ba97db557170a6f5860e46ade150 (diff)
downloadnavit-svn-71a8b90cf0fee3f2550978aeacc35ae8f3eb944b.tar.gz
Add:core:Warn user if he uses a road which has no default access flags set.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5220 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/vehicleprofile.c')
-rw-r--r--navit/vehicleprofile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/navit/vehicleprofile.c b/navit/vehicleprofile.c
index cc3e6c45..96ea1872 100644
--- a/navit/vehicleprofile.c
+++ b/navit/vehicleprofile.c
@@ -140,6 +140,10 @@ vehicleprofile_add_attr(struct vehicleprofile *this_, struct attr *attr)
if (roadprofile_get_attr(attr->u.roadprofile, attr_item_types, &item_types_attr, NULL)) {
enum item_type *types=item_types_attr.u.item_types;
while (*types != type_none) {
+ /* Maptool won't place any access flags for roads which don't have default access flags set. Warn user. */
+ if(!item_get_default_flags(*types))
+ dbg(0,"On '%s' roads used in '%s' vehicleprofile access restrictions are ignored. You might even be directed to drive in wrong direction on a one-way road. "
+ "Please define default access flags for above road type to item.c and rebuild the map.\n", item_to_name(*types), this_->name);
g_hash_table_insert(this_->roadprofile_hash, (void *)(long)(*types), attr->u.roadprofile);
types++;
}