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
commit1a76694cc48c045bfdf297c545fa1361810d4567 (patch)
treeec7c2eeee317f0bab38b5c971745811a0e7b8d06 /navit/vehicleprofile.c
parent8b4c4af8cec93f4c3d5a88d29d862f9510391e5d (diff)
downloadnavit-1a76694cc48c045bfdf297c545fa1361810d4567.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 cc3e6c453..96ea1872c 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++;
}