about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/engine/client/ec_client.c4
-rw-r--r--src/game/editor/ed_popups.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c
index 210d9b28..a8da7457 100644
--- a/src/engine/client/ec_client.c
+++ b/src/engine/client/ec_client.c
@@ -635,7 +635,7 @@ static const char *client_load_map_search(const char *mapname, int wanted_crc)
 		return error;
 
 	/* try the downloaded maps */
-	str_format(buf2, sizeof(buf2), "%s_%8x.map", mapname, wanted_crc);
+	str_format(buf2, sizeof(buf2), "maps/%s_%8x.map", mapname, wanted_crc);
 	engine_savepath(buf2, buf, sizeof(buf));
 	error = client_load_map(buf, wanted_crc);
 	return error;
@@ -768,7 +768,7 @@ static void client_process_packet(NETPACKET *packet)
 					else
 					{
 						char buf[512];
-						str_format(buf, sizeof(buf), "%s_%8x.map", map, map_crc);
+						str_format(buf, sizeof(buf), "maps/%s_%8x.map", map, map_crc);
 						engine_savepath(buf, mapdownload_filename, sizeof(mapdownload_filename));
 
 						dbg_msg("client/network", "starting to download map to '%s'", mapdownload_filename);
diff --git a/src/game/editor/ed_popups.cpp b/src/game/editor/ed_popups.cpp
index 81192521..bcd26092 100644
--- a/src/game/editor/ed_popups.cpp
+++ b/src/game/editor/ed_popups.cpp
@@ -284,9 +284,9 @@ int popup_quad(RECT view)
 	int new_val = 0;
 	int prop = editor.do_properties(&view, props, ids, &new_val);		
 	
-	if(prop == PROP_POS_ENV) quad->pos_env = new_val;
+	if(prop == PROP_POS_ENV) quad->pos_env = clamp(new_val, -1, editor.map.envelopes.len()-1);
 	if(prop == PROP_POS_ENV_OFFSET) quad->pos_env_offset = new_val;
-	if(prop == PROP_COLOR_ENV) quad->color_env = new_val;
+	if(prop == PROP_COLOR_ENV) quad->color_env = clamp(new_val, -1, editor.map.envelopes.len()-1);
 	if(prop == PROP_COLOR_ENV_OFFSET) quad->color_env_offset = new_val;
 	
 	return 0;