fix: code formatting
This commit is contained in:
parent
290681d2d8
commit
2718adbb8f
13 changed files with 206 additions and 208 deletions
|
|
@ -32,8 +32,7 @@ plugin_info_t Plugin_info = {
|
||||||
PT_ANYTIME, // when unloadable
|
PT_ANYTIME, // when unloadable
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace variadic {
|
void hook_ClientCommand (edict_t *ent, char const *format, ...) {
|
||||||
void clientCommand (edict_t *ent, char const *format, ...) {
|
|
||||||
// this function forces the client whose player entity is ent to issue a client command.
|
// this function forces the client whose player entity is ent to issue a client command.
|
||||||
// How it works is that clients all have a argv global string in their client DLL that
|
// How it works is that clients all have a argv global string in their client DLL that
|
||||||
// stores the command string; if ever that string is filled with characters, the client DLL
|
// stores the command string; if ever that string is filled with characters, the client DLL
|
||||||
|
|
@ -80,7 +79,6 @@ namespace variadic {
|
||||||
}
|
}
|
||||||
engfuncs.pfnClientCommand (ent, buffer);
|
engfuncs.pfnClientCommand (ent, buffer);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
|
CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
|
||||||
// this function is called right after GiveFnptrsToDll() by the engine in the game DLL (or
|
// this function is called right after GiveFnptrsToDll() by the engine in the game DLL (or
|
||||||
|
|
@ -779,7 +777,7 @@ CR_LINKAGE_C int GetEngineFunctions (enginefuncs_t *table, int *) {
|
||||||
engfuncs.pfnSetClientMaxspeed (ent, newMaxspeed);
|
engfuncs.pfnSetClientMaxspeed (ent, newMaxspeed);
|
||||||
};
|
};
|
||||||
|
|
||||||
table->pfnClientCommand = variadic::clientCommand;
|
table->pfnClientCommand = hook_ClientCommand;
|
||||||
|
|
||||||
return HLTrue;
|
return HLTrue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -768,7 +768,8 @@ void BotManager::listBots () {
|
||||||
|
|
||||||
ctrl.msg ("%-3.5s\t%-19.16s\t%-10.12s\t%-3.4s\t%-3.4s\t%-3.4s\t%-3.5s", "index", "name", "personality", "team", "difficulty", "frags", "alive");
|
ctrl.msg ("%-3.5s\t%-19.16s\t%-10.12s\t%-3.4s\t%-3.4s\t%-3.4s\t%-3.5s", "index", "name", "personality", "team", "difficulty", "frags", "alive");
|
||||||
|
|
||||||
for (const auto &bot : bots) {;
|
for (const auto &bot : bots) {
|
||||||
|
;
|
||||||
ctrl.msg ("[%-3.1d]\t%-19.16s\t%-10.12s\t%-3.4s\t%-3.1d\t%-3.1d\t%-3.4s", bot->index (), bot->pev->netname.chars (), bot->m_personality == Personality::Rusher ? "rusher" : bot->m_personality == Personality::Normal ? "normal" : "careful", bot->m_team == Team::CT ? "CT" : "T", bot->m_difficulty, static_cast <int> (bot->pev->frags), bot->m_notKilled ? "yes" : "no");
|
ctrl.msg ("[%-3.1d]\t%-19.16s\t%-10.12s\t%-3.4s\t%-3.1d\t%-3.1d\t%-3.4s", bot->index (), bot->pev->netname.chars (), bot->m_personality == Personality::Rusher ? "rusher" : bot->m_personality == Personality::Normal ? "normal" : "careful", bot->m_team == Team::CT ? "CT" : "T", bot->m_difficulty, static_cast <int> (bot->pev->frags), bot->m_notKilled ? "yes" : "no");
|
||||||
}
|
}
|
||||||
ctrl.msg ("%d bots", m_bots.length ());
|
ctrl.msg ("%d bots", m_bots.length ());
|
||||||
|
|
|
||||||
|
|
@ -597,8 +597,7 @@ void Bot::checkTerrain (float movedDistance, const Vector &dirNormal) {
|
||||||
++i;
|
++i;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (bits & CollisionProbe::Duck)
|
if (bits & CollisionProbe::Duck) {
|
||||||
{
|
|
||||||
state[i] = 0;
|
state[i] = 0;
|
||||||
|
|
||||||
if (canDuckUnder (dirNormal)) {
|
if (canDuckUnder (dirNormal)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue