Skip to content

Commit

Permalink
World|Debug: Include bounding box info in Sector/Subsector descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Aug 7, 2016
1 parent afa8b37 commit 382a6d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/world/base/plane.cpp
Expand Up @@ -183,7 +183,7 @@ Plane::Plane(Sector &sector, Vector3f const &normal, ddouble height)

String Plane::description() const
{
auto desc = String (_E(l) "Sector: " _E(.)_E(i) "%1" _E(.)
auto desc = String( _E(l) "Sector: " _E(.)_E(i) "%1" _E(.)
" " _E(l) "Height: " _E(.)_E(i) "%2" _E(.)
" " _E(l) "Height Target: " _E(.)_E(i) "%3" _E(.)
" " _E(l) "Speed: " _E(.)_E(i) "%4" _E(.))
Expand Down
6 changes: 4 additions & 2 deletions doomsday/apps/client/src/world/base/sector.cpp
Expand Up @@ -673,8 +673,10 @@ D_CMD(InspectSector)

LOG_SCR_MSG(_E(b) "Sector %i" _E(.) " [%p]")
<< sec->indexInMap() << sec;
LOG_SCR_MSG(_E(l) "Light Level: " _E(.)_E(i) "%f" _E(.)
_E(l) " Light Color: " _E(.)_E(i) "%s")
LOG_SCR_MSG( _E(l) "Bounds: " _E(.)_E(i) "%s" _E(.)
" " _E(l) "Light Color: " _E(.)_E(i) "%s" _E(.)
" " _E(l) "Light Level: " _E(.)_E(i) "%f")
<< Rectangled(sec->bounds().min, sec->bounds().max).asText()
<< sec->lightLevel()
<< sec->lightColor().asText();
if (sec->planeCount())
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/world/base/subsector.cpp
Expand Up @@ -88,7 +88,7 @@ String Subsector::description() const
" " _E(l) "Bounds: " _E(.) _E(i) "%3" _E(.))
.arg(d->id.asText())
.arg(sector().indexInMap())
.arg((Vector2d(bounds().max) - Vector2d(bounds().min)).asText());
.arg(Rectangled(bounds().min, bounds().max).asText());

DENG2_DEBUG_ONLY(
desc.prepend(String("[Subsector 0x%1]\n").arg(de::dintptr(this), 0, 16));
Expand Down

0 comments on commit 382a6d8

Please sign in to comment.