From 2a87246be478e5ddd2bef4080f36382a889e02dd Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 27 Jan 2011 12:36:26 +0000 Subject: Moved material loading from render to core, make sure the dedicated server reads materials.ini, removed unnecessary CollisionMesh::translate() method. --- src/client/video.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/video.cc b/src/client/video.cc index 84bbe52..2949ae7 100644 --- a/src/client/video.cc +++ b/src/client/video.cc @@ -227,7 +227,7 @@ bool init() // initialize renderer render::init(width, height); - + // apply render options ui::root()->load_settings(); @@ -267,10 +267,22 @@ void resize(int w, int h) void restart() { shutdown(); + + // clear models and materials + /* resetting the rednder subsystem will force a reload of all materials + */ + model::Model::clear(); + + model::Material::clear(); + if (!init()) { client()->quit(1); } + + model::Material::init(); + render::load(); + input::reset(); } -- cgit v1.2.3