Explorar o código

Merge branch 'master' of http://local.beijingyongan.com:3000/linux-dev/ya-serv

lixioayao %!s(int64=6) %!d(string=hai) anos
pai
achega
547d00f6d0
Modificáronse 1 ficheiros con 21 adicións e 6 borrados
  1. 21 6
      card_base.cpp

+ 21 - 6
card_base.cpp

@@ -12,10 +12,12 @@
 #include "websocket/wsTimerThread.h"
 #include "three_rates.h"
 #include "his_location.h"
-#include"event.h"
-#include"module_service/module_call.h"
-#include"mine.h"
-#include"common_tool.h"
+#include "event.h"
+#include "module_service/module_call.h"
+#include "mine.h"
+#include "common_tool.h"
+#include "ant.h"
+#include "area.h"
 
 extern config_file config;
 
@@ -53,7 +55,18 @@ void card_location_base::on_message(zloop<task*> * loop,const message_locinfo&lo
 {
 	m_ct = loc.m_card_ct;
 	m_time = loc.m_time_stamp;
-	m_message_handle->on_message(loop,loc,is_history);
+	auto site_ptr = sit_list::instance()->get(loc.m_site_id);
+
+	if(site_ptr->is_up_site())
+	{
+		auto area_tool=get_area_tool();
+		area_tool->set(site_ptr);
+		area_tool->on_point(shared_from_this(),point(1,1));
+	}
+	else
+	{
+		m_message_handle->on_message(loop,loc,is_history);
+	}
 }
 
 //前端推送位置函数.
@@ -67,7 +80,9 @@ void card_location_base::upt_card_pos(YA::_CARD_POS_&cp, point &pt)
         pt=_p;
     }
     else
-        _p=pt;
+	{
+       	 _p=pt;
+	}
 	cp.x = tool_other::round(_p.x,3);
 	cp.y = tool_other::round(_p.y,3);
 	//cp.z = pt.z;