about summary refs log tree commit diff
path: root/src/engine/client/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/client/client.cpp')
-rw-r--r--src/engine/client/client.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp
index c8c5da83..6e01c005 100644
--- a/src/engine/client/client.cpp
+++ b/src/engine/client/client.cpp
@@ -157,7 +157,7 @@ float client_localtime()
 	return (time_get()-local_start_time)/(float)(time_freq());
 }
 
-void *snap_get_item(int snapid, int index, snap_item *item)
+const void *snap_get_item(int snapid, int index, snap_item *item)
 {
 	dbg_assert(snapid >= 0 && snapid < NUM_SNAPSHOT_TYPES, "invalid snapid");
 	snapshot::item *i = snapshots[snapid]->snap->get_item(index);
@@ -166,6 +166,18 @@ void *snap_get_item(int snapid, int index, snap_item *item)
 	return (void *)i->data();
 }
 
+const void *snap_find_item(int snapid, int type, int id)
+{
+	// TODO: linear search. should be fixed.
+	for(int i = 0; i < snapshots[snapid]->snap->num_items; i++)
+	{
+		snapshot::item *itm = snapshots[snapid]->snap->get_item(i);
+		if(itm->type() == type && itm->id() == id)
+			return (void *)itm->data();
+	}
+	return 0x0;
+}
+
 int snap_num_items(int snapid)
 {
 	dbg_assert(snapid >= 0 && snapid < NUM_SNAPSHOT_TYPES, "invalid snapid");
@@ -202,17 +214,6 @@ float client_frametime()
 	return frametime;
 }
 
-void *snap_find_item(int snapid, int type, int id)
-{
-	// TODO: linear search. should be fixed.
-	for(int i = 0; i < snapshots[snapid]->snap->num_items; i++)
-	{
-		snapshot::item *itm = snapshots[snapid]->snap->get_item(i);
-		if(itm->type() == type && itm->id() == id)
-			return (void *)itm->data();
-	}
-	return 0x0;
-}
 
 int menu_loop(); // TODO: what is this?