about summary refs log tree commit diff
path: root/src/game/client/gc_render.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-02-05 19:11:34 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-02-05 19:11:34 +0000
commit91e4c2252b1a07df013cde773d1cead3712bca43 (patch)
tree29af0b7c51da9ef48b0c2d66f779f3b43a755e64 /src/game/client/gc_render.cpp
parentda2d792186d53794d25438c157ac039adbb8c1a6 (diff)
downloadzcatch-91e4c2252b1a07df013cde773d1cead3712bca43.tar.gz
zcatch-91e4c2252b1a07df013cde773d1cead3712bca43.zip
added rotate to editor. fixed so that the game handles envelopes
Diffstat (limited to 'src/game/client/gc_render.cpp')
-rw-r--r--src/game/client/gc_render.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/game/client/gc_render.cpp b/src/game/client/gc_render.cpp
index 285b6c1c..f201a87c 100644
--- a/src/game/client/gc_render.cpp
+++ b/src/game/client/gc_render.cpp
@@ -261,6 +261,24 @@ static void envelope_eval(float time_offset, int env, float *channels)
 	channels[1] = 0;
 	channels[2] = 0;
 	channels[3] = 0;
+
+	ENVPOINT *points;
+
+	{
+		int start, num;
+		map_get_type(MAPITEMTYPE_ENVPOINTS, &start, &num);
+		if(num)
+			points = (ENVPOINT *)map_get_item(start, 0, 0);
+	}
+	
+	int start, num;
+	map_get_type(MAPITEMTYPE_ENVELOPE, &start, &num);
+	
+	if(env >= num)
+		return;
+	
+	MAPITEM_ENVELOPE *item = (MAPITEM_ENVELOPE *)map_get_item(start+env, 0, 0);
+	render_eval_envelope(points+item->start_point, item->num_points, 4, client_localtime()+time_offset, channels);
 }
 
 void render_layers(float center_x, float center_y, int pass)