|
@@ -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,15 +55,41 @@ 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)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ 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);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//前端推送位置函数.
|
|
|
-void card_location_base::upt_card_pos(YA::_CARD_POS_&cp, const point &pt)
|
|
|
+void card_location_base::upt_card_pos(YA::_CARD_POS_&cp, point &pt)
|
|
|
{
|
|
|
// YA::_CARD_POS_ cp;
|
|
|
- cp.x = tool_other::round(pt.x,3);
|
|
|
- cp.y = tool_other::round(pt.y,3);
|
|
|
+ point _p;
|
|
|
+ if(pt.empty())
|
|
|
+ {
|
|
|
+ _p=*this;
|
|
|
+ pt=_p;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _p=pt;
|
|
|
+ }
|
|
|
+ cp.x = tool_other::round(_p.x,3);
|
|
|
+ cp.y = tool_other::round(_p.y,3);
|
|
|
//cp.z = pt.z;
|
|
|
|
|
|
cp.Type=m_type;
|