Nuclide
Software Development Kit for id Tech
defs.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016-2022 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
17#include "cvars.h"
18
20
23
24void
25_BotLog(string functionName, string msg)
26{
27 print(sprintf("%f ^xF05%s ^7: %s\n", time, functionName, msg));
28}
29
34#define BotLog(...) if (autocvar_bot_developer) _BotLog(__FUNC__, sprintf(__VA_ARGS__))
35
36void
37_BotEntLog(string className, string functionName, float edictNum, string warnMessage)
38{
39 print(sprintf("%f ^xF05%s (id: %d) ^7: %s\n", time, functionName, edictNum, warnMessage));
40}
41
46#define BotEntLog(...) if (autocvar_bot_developer) _BotEntLog(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__))
47
48var string autocvar_bot_prefix = "";
49
50/* BotScript
51 script/bots.txt
52
53 Listing of various bot profiles
54 where infokeys can be set and interpreted
55 by the game-logic at will.
56
57 The `name` keys has to _always_ be present.
58 The `funname` key is optional.
59
60 Name acts as both an identifier as well
61 as a nickname when `funname` is not present.
62
63 Anything else is considered to be extra.
64*/
65
66typedef struct
67{
68 string m_strName;
70 string m_strExtra;
72
73#define BOTSCRIPT_MAX 32
void _BotLog(string functionName, string msg)
Definition: defs.h:25
#define BOTSCRIPT_MAX
Definition: defs.h:73
var string autocvar_bot_prefix
Definition: defs.h:48
void _BotEntLog(string className, string functionName, float edictNum, string warnMessage)
Definition: defs.h:37
var int g_botScriptCount
Definition: defs.h:75
var int autocvar_nav_radius
Definition: defs.h:22
var int autocvar_nav_linksize
Definition: defs.h:21
botScript_t g_bots[32]
Definition: defs.h:74
vector Route_SelectDestination(NSBot target)
Definition: route.qc:162
A virtual multiplayer opponent.
Definition: NSBot.h:45
float time
Definition: fteextensions.qc:509
vector(vector) normalize
string target
Definition: defs.h:23
Definition: defs.h:67
string m_strName
Definition: defs.h:68
string m_strExtra
Definition: defs.h:70
string m_strNetName
Definition: defs.h:69