diff options
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 2 | ||||
| -rw-r--r-- | src/game/editor/ed_io.cpp | 11 | ||||
| -rw-r--r-- | src/game/editor/ed_layer_tiles.cpp | 13 |
3 files changed, 15 insertions, 11 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index 0ae82bfb..e7e156de 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -1246,7 +1246,7 @@ int EDITOR::do_properties(RECT *toolbox, PROPERTY *props, int *ids, int *new_val } } } - + return change; } diff --git a/src/game/editor/ed_io.cpp b/src/game/editor/ed_io.cpp index 76700781..8c4c1e92 100644 --- a/src/game/editor/ed_io.cpp +++ b/src/game/editor/ed_io.cpp @@ -333,6 +333,13 @@ int MAP::save(const char *filename) // finish the data file datafile_finish(df); dbg_msg("editor", "done"); + + // send rcon.. if we can + if(client_rcon_authed()) + { + client_rcon("sv_map_reload 1"); + } + return 1; } @@ -355,11 +362,9 @@ int MAP::load(const char *filename) if(!item) { // import old map - /* MAP old_mapstuff; editor.reset(); - editor_load_old(df, &old_mapstuff); - */ + editor_load_old(df, this); } else if(item->version == 1) { diff --git a/src/game/editor/ed_layer_tiles.cpp b/src/game/editor/ed_layer_tiles.cpp index 7b3b89a9..d24d67c4 100644 --- a/src/game/editor/ed_layer_tiles.cpp +++ b/src/game/editor/ed_layer_tiles.cpp @@ -92,7 +92,6 @@ void LAYER_TILES::brush_selecting(RECT rect) snap(&rect); gfx_quads_drawTL(rect.x, rect.y, rect.w, rect.h); gfx_quads_end(); - } int LAYER_TILES::brush_grab(LAYERGROUP *brush, RECT rect) @@ -210,9 +209,9 @@ int LAYER_TILES::render_properties(RECT *toolbox) enum { - PROP_IMAGE=0, - PROP_WIDTH, + PROP_WIDTH=0, PROP_HEIGHT, + PROP_IMAGE, NUM_PROPS, }; @@ -223,19 +222,19 @@ int LAYER_TILES::render_properties(RECT *toolbox) {0}, }; - if(editor.map.game_layer == this) + if(editor.map.game_layer == this) // remove the image from the selection if this is the game layer props[2].name = 0; static int ids[NUM_PROPS] = {0}; int new_val = 0; int prop = editor.do_properties(toolbox, props, ids, &new_val); - if(prop == PROP_IMAGE) - image = new_val%editor.map.images.len(); - else if(prop == PROP_WIDTH && new_val > 1) + if(prop == PROP_WIDTH && new_val > 1) resize(new_val, height); else if(prop == PROP_HEIGHT && new_val > 1) resize(width, new_val); + else if(prop == PROP_IMAGE) + image = new_val%editor.map.images.len(); return 0; } |