This commit is contained in:
aozhiwei 2023-01-29 12:03:14 +08:00
parent 12d05842b0
commit 48e7302102
3 changed files with 26 additions and 5 deletions

View File

@ -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
};

View File

@ -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");

View File

@ -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<MapInstance>
std::vector<int> poly_ext_datas_;
std::vector<HeightInfo> height_datas_;
std::string map_tpl_name_;
const mt::Map* map_meta_ = nullptr;
MapService* map_service_ = nullptr;