From 48481ab5d0d8254e0ce08faeb662f65b16c280c4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 15 Aug 2008 15:12:44 +0000 Subject: fix docking box drawing --- src/model/map.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/model/map.cc') diff --git a/src/model/map.cc b/src/model/map.cc index 6494cd7..0e124c6 100644 --- a/src/model/map.cc +++ b/src/model/map.cc @@ -877,15 +877,15 @@ Model * Map::load(std::string const &name) dock = new Dock(); model->add_dock(dock); - } else if (mapfile.classname().compare("target_dock") == 0) { + } else if (mapfile.classname().compare("trigger_dock") == 0) { // dock attributes if (mapfile.got_key_vector3f("origin", dock->dock_location)) { - flare->light_location *= SCALE; + dock->dock_location *= SCALE; continue; } else if (mapfile.got_key_float("radius", dock->dock_radius)) { - dock->dock_radius /= 100.0f; + dock->dock_radius /= 100.0f; continue; } @@ -973,6 +973,10 @@ Model * Map::load(std::string const &name) (*eit)->engine_location -= mapfile.map_center; } + for (Model::Docks::iterator dit = model->docks().begin(); dit != model->docks().end(); dit++) { + (*dit)->dock_location -= mapfile.map_center; + } + con_debug << " " << mapfile.name() << " " << mapfile.map_brushes << " brushes " << mapfile.map_faces << "/" << mapfile.map_faces_detail << " faces/detail " << std::endl; -- cgit v1.2.3