- Improved DrawSwitchableImage keyslot condition to include key species.

- Fixed: currentpos command would crash if not in game.
This commit is contained in:
Braden Obrzut 2016-01-23 21:47:20 -05:00
commit fc15be8689
2 changed files with 43 additions and 7 deletions

View file

@ -1083,8 +1083,15 @@ CCMD(nextsecret)
CCMD(currentpos)
{
AActor *mo = players[consoleplayer].mo;
Printf("Current player position: (%1.3f,%1.3f,%1.3f), angle: %1.3f, floorheight: %1.3f, sector:%d, lightlevel: %d\n",
FIXED2FLOAT(mo->X()), FIXED2FLOAT(mo->Y()), FIXED2FLOAT(mo->Z()), mo->angle/float(ANGLE_1), FIXED2FLOAT(mo->floorz), mo->Sector->sectornum, mo->Sector->lightlevel);
if(mo)
{
Printf("Current player position: (%1.3f,%1.3f,%1.3f), angle: %1.3f, floorheight: %1.3f, sector:%d, lightlevel: %d\n",
FIXED2FLOAT(mo->X()), FIXED2FLOAT(mo->Y()), FIXED2FLOAT(mo->Z()), mo->angle/float(ANGLE_1), FIXED2FLOAT(mo->floorz), mo->Sector->sectornum, mo->Sector->lightlevel);
}
else
{
Printf("You are not in game!");
}
}
//-----------------------------------------------------------------------------