From 43e5f035e4cd591b442245d7ffe23f560187459e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 25 Feb 2017 21:48:15 +0100 Subject: [PATCH] - added a 'brief' mode to linetarget and info. --- src/c_cmds.cpp | 6 +++--- src/c_functions.cpp | 4 ++-- src/c_functions.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index e8f9509e5..ff83d8342 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -880,7 +880,7 @@ CCMD(linetarget) if (CheckCheatmode () || players[consoleplayer].mo == NULL) return; C_AimLine(&t, false); if (t.linetarget) - C_PrintInfo(t.linetarget); + C_PrintInfo(t.linetarget, argv.argc() > 1 && atoi(argv[1]) != 0); else Printf("No target found\n"); } @@ -893,7 +893,7 @@ CCMD(info) if (CheckCheatmode () || players[consoleplayer].mo == NULL) return; C_AimLine(&t, true); if (t.linetarget) - C_PrintInfo(t.linetarget); + C_PrintInfo(t.linetarget, !(argv.argc() > 1 && atoi(argv[1]) == 0)); else Printf("No target found. Info cannot find actors that have " "the NOBLOCKMAP flag or have height/radius of 0.\n"); @@ -902,7 +902,7 @@ CCMD(info) CCMD(myinfo) { if (CheckCheatmode () || players[consoleplayer].mo == NULL) return; - C_PrintInfo(players[consoleplayer].mo); + C_PrintInfo(players[consoleplayer].mo, true); } typedef bool (*ActorTypeChecker) (AActor *); diff --git a/src/c_functions.cpp b/src/c_functions.cpp index 1d1b35a45..ba3eb1175 100644 --- a/src/c_functions.cpp +++ b/src/c_functions.cpp @@ -39,7 +39,7 @@ #include "c_functions.h" -void C_PrintInfo(AActor *target) +void C_PrintInfo(AActor *target, bool verbose) { if (target->player) Printf("Player=%s, ", target->player->userinfo.GetName()); @@ -47,7 +47,7 @@ void C_PrintInfo(AActor *target) target->GetClass()->TypeName.GetChars(), target->health, target->SpawnHealth()); - PrintMiscActorInfo(target); + if (verbose) PrintMiscActorInfo(target); } void C_AimLine(FTranslatedLineTarget *t, bool nonshootable) diff --git a/src/c_functions.h b/src/c_functions.h index 3d8ab6fc8..4989469a6 100644 --- a/src/c_functions.h +++ b/src/c_functions.h @@ -34,6 +34,6 @@ void C_PrintInv(AActor *target); void C_AimLine(FTranslatedLineTarget *t, bool nonshootable); -void C_PrintInfo(AActor *target); +void C_PrintInfo(AActor *target, bool verbose); struct FTranslatedLineTarget; \ No newline at end of file