X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=Programming-Tips.md;h=f2bbb41a2b69ced18593d5fc25838055cdd8f143;hb=9b505fd6c7cbc2e32a38006667b736d5f5a6ca7a;hp=601447242f3d40c417d53eb1f3fe9a0fefe35a2c;hpb=887ffd437109acc6fd6ae29fe3513306e4a333a7;p=xonotic%2Fxonotic.wiki.git diff --git a/Programming-Tips.md b/Programming-Tips.md index 6014472..f2bbb41 100644 --- a/Programming-Tips.md +++ b/Programming-Tips.md @@ -1,6 +1,8 @@ ### Debug prints -You can show text anywhere on the map using `debug_text_3d(world_coords, message);` from `common/debug.qh`. +Use `con_notify 4` together with `LOG_INFOF("my_var: %s", my_var);` (`%s` string, `%f` float, `%d` integer, `%v` vector) to see debug output without opening the console. Type `con_notify` and press `` to see descriptions and more options (or use `apropos con_notify`). + +You can draw text anywhere on the map using `debug_text_3d(world_coords, message);` from `common/debug.qh`. ### Multiple clients + clean config @@ -11,3 +13,5 @@ If you need 2 players for debugging, you can launch another client locally: ### Testing with bots You can prevent bots from firing (`bot_nofire 1`) or stop them completely (`bot_cmd * pause`). With `sv_cheats 1` (takes effect next match), you can drag them around (default V or drag object in menu). + +Note that `sv_cheats 1` prevents bots from spawning in the campaign (should you decide to put it in your `autoexec.cfg` and later wonder why the campaign is broken).