- fixed misplaced variable initialization.

This commit is contained in:
Christoph Oelckers 2019-01-10 18:02:23 +01:00
parent 5dbd81ea7f
commit 2b30ae6ccd

View file

@ -1098,6 +1098,7 @@ void DoomSpecificInfo (char *buffer, size_t bufflen)
buffer += mysnprintf (buffer, buffend - buffer, "\r\nWad %d: %s", i, arg);
}
auto &vp = r_viewpoint;
if (gamestate != GS_LEVEL && gamestate != GS_TITLELEVEL)
{
buffer += mysnprintf (buffer, buffend - buffer, "\r\n\r\nNot in a map.");
@ -1112,7 +1113,6 @@ void DoomSpecificInfo (char *buffer, size_t bufflen)
}
else
{
auto &vp = r_viewpoint;
buffer += mysnprintf (buffer, buffend - buffer, "\r\n\r\nviewx = %f", vp.Pos.X);
buffer += mysnprintf (buffer, buffend - buffer, "\r\nviewy = %f", vp.Pos.Y);
buffer += mysnprintf (buffer, buffend - buffer, "\r\nviewz = %f", vp.Pos.Z);