diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 75f82045..a0b799d7 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1410,11 +1410,7 @@ void Human::DeadDrop() #ifdef DEBUG return false; #else - if (JsonDataMgr::Instance()->channel == kTouTiaoChannelId) { - return false; - } else { - return skin->skin_id != 0; - } + return skin->skin_id != 0; #endif }; diff --git a/server/gameserver/mapinstance.cc b/server/gameserver/mapinstance.cc index 081691e5..0bba8dc0 100644 --- a/server/gameserver/mapinstance.cc +++ b/server/gameserver/mapinstance.cc @@ -22,6 +22,8 @@ #include "roommgr.h" +#include "navmesh.pb.h" + static const int NAV_ERROR_NEARESTPOLY = -2; static const int NAV_ERROR = -1; @@ -83,6 +85,22 @@ void MapInstance::Init() if (current_uniid_ >= FIXED_OBJECT_MAXID) { A8_ABORT(); } + { + a8::XPrintf("begin\n", {}); + FILE *fp = fopen(("main3d_mapHeight.txt"), "rb"); + assert(fp); + fseek(fp, 0, SEEK_END); + size_t file_size = ftell(fp); + char *p = (char*)malloc(file_size); + fseek(fp, 0, SEEK_SET); + fread(p, 1, file_size, fp); + + navmesh::HeightList list; + list.ParseFromArray(p, file_size); + free(p); + fclose(fp); + a8::XPrintf("end\n", {}); + } { navmesh_ = dtAllocNavMesh(); FILE *fp = fopen((mt::MetaMgr::Instance()->GetResDir() + "map4.bin").c_str(), "rb"); diff --git a/server/gameserver/mapinstance.h b/server/gameserver/mapinstance.h index efcfe4a3..11886ab8 100644 --- a/server/gameserver/mapinstance.h +++ b/server/gameserver/mapinstance.h @@ -5,6 +5,11 @@ const int MAX_POLYS = 256; +struct HeightInfo +{ + +}; + class Entity; class Obstacle; class MapService; @@ -61,6 +66,8 @@ class MapInstance : public std::enable_shared_from_this std::vector poly_ext_datas_; + std::vector height_datas_; + std::string map_tpl_name_; const mt::Map* map_meta_ = nullptr; MapService* map_service_ = nullptr;