fix: code formatting

This commit is contained in:
jeefo 2023-03-13 15:39:15 +03:00
commit 2718adbb8f
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
13 changed files with 206 additions and 208 deletions

View file

@ -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;
} }

View file

@ -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 ());

View file

@ -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)) {