1
This commit is contained in:
parent
7825e7250e
commit
d6ff97211e
@ -422,14 +422,25 @@ int MapInstance::Raycast(int layer, const glm::vec3& start, const glm::vec3& end
|
|||||||
hit_pos_[1] = h;
|
hit_pos_[1] = h;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
{
|
||||||
|
std::string dbg_data = a8::Format("npolys:%d ", {npolys});
|
||||||
for (int i = 0; i < npolys; ++i) {
|
for (int i = 0; i < npolys; ++i) {
|
||||||
auto itr = poly_hash.find(polys_[i]);
|
auto itr = poly_hash.find(polys_[i]);
|
||||||
if (itr != poly_hash.end()) {
|
if (itr != poly_hash.end()) {
|
||||||
|
auto tile = std::get<0>(itr->second);
|
||||||
|
auto poly = std::get<1>(itr->second);
|
||||||
|
assert(poly->vertCount > 2);
|
||||||
|
dbg_data += a8::Format("poly%d: vert_count:%d ", {i + 1, poly->vertCount});
|
||||||
|
for (int ii = 0; ii < poly->vertCount; ++ii) {
|
||||||
|
const float* va = &tile->verts[poly->verts[ii] * 3];
|
||||||
|
dbg_data += a8::Format(" v:%d %f,%f,%f ", {ii, va[0], va[1], va[2]});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
a8::XPrintf("raycast hit dbg_data:%s\n", {dbg_data});
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ void MoveHelper::CalcTargetPos(float distance)
|
|||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (owner_->IsPlayer()) {
|
if (owner_->IsPlayer()) {
|
||||||
a8::XPrintf("CalcTargetPos src_pos:%f,%f,%f tar_pos:%f,%f,%f is_hit:%d start:%f,%f,%f end:%f,%f,%f distance:%f src_distance\n",
|
a8::XPrintf("CalcTargetPos src_pos:%f,%f,%f tar_pos:%f,%f,%f is_hit:%d start:%f,%f,%f end:%f,%f,%f distance:%f src_distance:%f\n",
|
||||||
{
|
{
|
||||||
point.src_pos.x,
|
point.src_pos.x,
|
||||||
point.src_pos.y,
|
point.src_pos.y,
|
||||||
|
@ -3385,7 +3385,7 @@ int Room::GetOnlinePlayerNum()
|
|||||||
size_t Room::GetRoomMaxPlayerNum()
|
size_t Room::GetRoomMaxPlayerNum()
|
||||||
{
|
{
|
||||||
#ifdef MAP3D
|
#ifdef MAP3D
|
||||||
return 2;
|
return 1;
|
||||||
return map_meta_->pb->player();
|
return map_meta_->pb->player();
|
||||||
//return 2;
|
//return 2;
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user