Correcting code style and config (#783)

* cosmetic changes (for perfectionists)

* cosmetic changes (in sdk)

* add quotes for all cvar values
This commit is contained in:
Vaqtincha 2022-11-24 21:04:42 +05:00 committed by GitHub
parent d8702df548
commit 946b5a9db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 59 additions and 58 deletions

104
dist/game.cfg vendored
View File

@ -5,7 +5,7 @@ echo Executing ReGameDLL Configuration File
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
mp_freeforall 0 mp_freeforall "0"
// Auto balancing of teams // Auto balancing of teams
// 0 - disabled // 0 - disabled
@ -13,20 +13,20 @@ mp_freeforall 0
// 2 - on next round // 2 - on next round
// //
// Default value: "1" // Default value: "1"
mp_autoteambalance 1 mp_autoteambalance "1"
// Designate the desired amount of buy time for each round. (in minutes) // Designate the desired amount of buy time for each round. (in minutes)
// -1 - means no time limit // -1 - means no time limit
// 0 - disable buy // 0 - disable buy
// //
// Default value: "1.5" // Default value: "1.5"
mp_buytime 0.25 mp_buytime "0.25"
// The maximum allowable amount of money in the game // The maximum allowable amount of money in the game
// NOTE: Allowable money limit is 999999 // NOTE: Allowable money limit is 999999
// //
// Default value: "16000" // Default value: "16000"
mp_maxmoney 16000 mp_maxmoney "16000"
// Disable round end by game scenario // Disable round end by game scenario
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
@ -47,7 +47,7 @@ mp_maxmoney 16000
// //
// Example setting: "ae" - blocks round time and bomb round end checks // Example setting: "ae" - blocks round time and bomb round end checks
// Default value: "0" // Default value: "0"
mp_round_infinite 0 mp_round_infinite "0"
// The round by expired time will be over, if on a map it does not have the scenario of the game. // The round by expired time will be over, if on a map it does not have the scenario of the game.
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
@ -56,19 +56,19 @@ mp_round_infinite 0
// 3 - round end with Counter-Terrorists win // 3 - round end with Counter-Terrorists win
// //
// Default value: "0" // Default value: "0"
mp_roundover 0 mp_roundover "0"
// Number of seconds to delay before restarting a round after a win. // Number of seconds to delay before restarting a round after a win.
// //
// Default value: "5" // Default value: "5"
mp_round_restart_delay 5 mp_round_restart_delay "5"
// Disable grenade damage through walls // Disable grenade damage through walls
// 0 - disabled // 0 - disabled
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
mp_hegrenade_penetration 0 mp_hegrenade_penetration "0"
// Drop a grenade after player death // Drop a grenade after player death
// 0 - disabled // 0 - disabled
@ -76,21 +76,21 @@ mp_hegrenade_penetration 0
// 2 - drop all grenades // 2 - drop all grenades
// //
// Default value: "0" // Default value: "0"
mp_nadedrops 0 mp_nadedrops "0"
// Player cannot respawn until next round // Player cannot respawn until next round
// if more than N seconds has elapsed since the beginning round // if more than N seconds has elapsed since the beginning round
// -1 - means no time limit // -1 - means no time limit
// //
// Default value: "20" // Default value: "20"
mp_roundrespawn_time 20 mp_roundrespawn_time "20"
// Automatically reload each weapon on player spawn // Automatically reload each weapon on player spawn
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
mp_auto_reload_weapons 0 mp_auto_reload_weapons "0"
// Refill amount of backpack ammo up to the max // Refill amount of backpack ammo up to the max
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
@ -99,7 +99,7 @@ mp_auto_reload_weapons 0
// 3 - refill backpack ammo on each weapon reload (NOTE: Useful for mods like DeathMatch, GunGame, ZombieMod etc.) // 3 - refill backpack ammo on each weapon reload (NOTE: Useful for mods like DeathMatch, GunGame, ZombieMod etc.)
// //
// Default value: "0" // Default value: "0"
mp_refill_bpammo_weapons 0 mp_refill_bpammo_weapons "0"
// Sets the mode infinite ammo for weapons // Sets the mode infinite ammo for weapons
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
@ -107,48 +107,48 @@ mp_refill_bpammo_weapons 0
// 2 - weapon bpammo infinite (This means for reloading) // 2 - weapon bpammo infinite (This means for reloading)
// //
// Default value: "0" // Default value: "0"
mp_infinite_ammo 0 mp_infinite_ammo "0"
// Enable infinite grenades // Enable infinite grenades
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
// 1 - grenades infinite // 1 - grenades infinite
// //
// Default value: "0" // Default value: "0"
mp_infinite_grenades 0 mp_infinite_grenades "0"
// Automatically joins the team // Automatically joins the team
// 0 - disabled // 0 - disabled
// 1 - enabled (Use in conjunction with the cvar humans_join_team any/SPEC/CT/T) // 1 - enabled (Use in conjunction with the cvar humans_join_team any/SPEC/CT/T)
// //
// Default value: "0" // Default value: "0"
mp_auto_join_team 0 mp_auto_join_team "0"
// Maximum number of allowed teamkills before autokick. // Maximum number of allowed teamkills before autokick.
// Used when enabled mp_autokick. // Used when enabled mp_autokick.
// 0 - disabled // 0 - disabled
// //
// Default value: "3" // Default value: "3"
mp_max_teamkills 3 mp_max_teamkills "3"
// If set to something other than 0, // If set to something other than 0,
// when anybodys scored reaches mp_fraglimit the server changes map. // when anybodys scored reaches mp_fraglimit the server changes map.
// 0 - means no limit // 0 - means no limit
// //
// Default value: "0" // Default value: "0"
mp_fraglimit 0 mp_fraglimit "0"
// Period between map rotations. // Period between map rotations.
// 0 - means no limit // 0 - means no limit
// //
// Default value: "0" // Default value: "0"
mp_timelimit 20 mp_timelimit "20"
// Players will automatically respawn when killed. // Players will automatically respawn when killed.
// 0 - disabled // 0 - disabled
// >0.00001 - time delay to respawn // >0.00001 - time delay to respawn
// //
// Default value: "0" // Default value: "0"
mp_forcerespawn 0 mp_forcerespawn "0"
// The hostages can take damage. // The hostages can take damage.
// 0 - disabled // 0 - disabled
@ -157,35 +157,35 @@ mp_forcerespawn 0
// 3 - only from T // 3 - only from T
// //
// Default value: "1" // Default value: "1"
mp_hostage_hurtable 1 mp_hostage_hurtable "1"
// Show radio icon. // Show radio icon.
// 0 - disabled // 0 - disabled
// 1 - enabled (default behavior) // 1 - enabled (default behavior)
// //
// Default value: "1" // Default value: "1"
mp_show_radioicon 1 mp_show_radioicon "1"
// Show scenario icon in HUD such as count of alive hostages or ticking bomb. // Show scenario icon in HUD such as count of alive hostages or ticking bomb.
// 0 - disabled (default behavior) // 0 - disabled (default behavior)
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
mp_show_scenarioicon 0 mp_show_scenarioicon "0"
// Play "Bomb has been defused" sound instead of "Counter-Terrorists win" when bomb was defused // Play "Bomb has been defused" sound instead of "Counter-Terrorists win" when bomb was defused
// 0 - disabled (default behavior) // 0 - disabled (default behavior)
// 1 - enabled // 1 - enabled
// //
// Default value: "1" // Default value: "1"
mp_old_bomb_defused_sound 1 mp_old_bomb_defused_sound "1"
// Sets the mode for the zBot // Sets the mode for the zBot
// 0 - disabled // 0 - disabled
// 1 - enable mode Deathmatch and not allow to do the scenario // 1 - enable mode Deathmatch and not allow to do the scenario
// //
// Default value: "0" // Default value: "0"
bot_deathmatch 0 bot_deathmatch "0"
// Determines the type of quota. // Determines the type of quota.
// normal - default behaviour // normal - default behaviour
@ -198,21 +198,21 @@ bot_quota_mode "normal"
// Prevents bots from joining the server for this many seconds after a map change. // Prevents bots from joining the server for this many seconds after a map change.
// //
// Default value: "0" // Default value: "0"
bot_join_delay 0 bot_join_delay "0"
// Prevents bots on your server from moving. // Prevents bots on your server from moving.
// 0 - disabled (default behavior) // 0 - disabled (default behavior)
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
bot_freeze 0 bot_freeze "0"
// Debug cvar shows triggers. // Debug cvar shows triggers.
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
showtriggers 0 showtriggers "0"
// When players can hear each other. // When players can hear each other.
// Further explanation: https://github.com/s1lentq/ReGameDLL_CS/wiki/sv_alltalk // Further explanation: https://github.com/s1lentq/ReGameDLL_CS/wiki/sv_alltalk
@ -224,19 +224,19 @@ showtriggers 0
// 5 - alive hear alive teammates, dead hear dead and alive. // 5 - alive hear alive teammates, dead hear dead and alive.
// //
// Default value: "0" // Default value: "0"
sv_alltalk 0 sv_alltalk "0"
// Time to remove item that have been dropped from the players. (in seconds) // Time to remove item that have been dropped from the players. (in seconds)
// //
// Default value: "300" // Default value: "300"
mp_item_staytime 300 mp_item_staytime "300"
// Legacy func_bomb_target touch. New one is more strict. // Legacy func_bomb_target touch. New one is more strict.
// 0 - New behavior // 0 - New behavior
// 1 - Legacy behavior // 1 - Legacy behavior
// //
// Default value: "1" // Default value: "1"
mp_legacy_bombtarget_touch 1 mp_legacy_bombtarget_touch "1"
// Specifies the players defense time after respawn. (in seconds). // Specifies the players defense time after respawn. (in seconds).
// 0 - disabled // 0 - disabled
@ -250,7 +250,7 @@ mp_respawn_immunitytime "0"
// 1 - enabled (Use in conjunction with the cvar mp_respawn_immunitytime) // 1 - enabled (Use in conjunction with the cvar mp_respawn_immunitytime)
// //
// Default value: "1" // Default value: "1"
mp_respawn_immunity_effects 1 mp_respawn_immunity_effects "1"
// Force unset spawn protection if the player doing any action. // Force unset spawn protection if the player doing any action.
// 0 - disabled // 0 - disabled
@ -258,7 +258,7 @@ mp_respawn_immunity_effects 1
// 2 - only when attacking // 2 - only when attacking
// //
// Default value: "1" // Default value: "1"
mp_respawn_immunity_force_unset 1 mp_respawn_immunity_force_unset "1"
// Kill the player in filled spawn before spawning some one else (Prevents players stucking in each other). // Kill the player in filled spawn before spawning some one else (Prevents players stucking in each other).
// Only disable this if you have semiclip or other plugins that prevents stucking // Only disable this if you have semiclip or other plugins that prevents stucking
@ -266,7 +266,7 @@ mp_respawn_immunity_force_unset 1
// 1 - enabled // 1 - enabled
// //
// Default value: "1" // Default value: "1"
mp_kill_filled_spawn 1 mp_kill_filled_spawn "1"
// Allow use of point_servercommand entities in map. // Allow use of point_servercommand entities in map.
// NOTE: Potentially dangerous for untrusted maps. // NOTE: Potentially dangerous for untrusted maps.
@ -274,7 +274,7 @@ mp_kill_filled_spawn 1
// 1 - allow // 1 - allow
// //
// Default value: "0" // Default value: "0"
mp_allow_point_servercommand 0 mp_allow_point_servercommand "0"
// Show 'HP' field into a scoreboard // Show 'HP' field into a scoreboard
// -1 - disabled // -1 - disabled
@ -286,7 +286,7 @@ mp_allow_point_servercommand 0
// 5 - show 'HP' field to teammates and spectators // 5 - show 'HP' field to teammates and spectators
// //
// Default value: "3" // Default value: "3"
mp_scoreboard_showhealth 3 mp_scoreboard_showhealth "3"
// Show 'Money' field into a scoreboard // Show 'Money' field into a scoreboard
// -1 - disabled // -1 - disabled
@ -298,7 +298,7 @@ mp_scoreboard_showhealth 3
// 5 - show 'Money' field to teammates and spectators // 5 - show 'Money' field to teammates and spectators
// //
// Default value: "3" // Default value: "3"
mp_scoreboard_showmoney 3 mp_scoreboard_showmoney "3"
// Show 'D. Kit' field into a scoreboard for teammates // Show 'D. Kit' field into a scoreboard for teammates
// NOTE: If you don't want to show defuse kit field for dead enemies // NOTE: If you don't want to show defuse kit field for dead enemies
@ -307,7 +307,7 @@ mp_scoreboard_showmoney 3
// 1 - enabled // 1 - enabled
// //
// Default value: "1" // Default value: "1"
mp_scoreboard_showdefkit 1 mp_scoreboard_showdefkit "1"
// How much to reduce damage done to teammates when shot. // How much to reduce damage done to teammates when shot.
// Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy) // Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy)
@ -351,7 +351,7 @@ mp_radio_timeout "1.5"
// 0 - disable radio messages // 0 - disable radio messages
// //
// Default value: "60" // Default value: "60"
mp_radio_maxinround 60 mp_radio_maxinround "60"
// When set, players can buy anywhere, not only in buyzones. // When set, players can buy anywhere, not only in buyzones.
// 0 - disabled // 0 - disabled
@ -360,7 +360,7 @@ mp_radio_maxinround 60
// 3 - only CT team // 3 - only CT team
// //
// Default value: "0" // Default value: "0"
mp_buy_anywhere 0 mp_buy_anywhere "0"
// Don't unduck if ducking isn't finished yet. // Don't unduck if ducking isn't finished yet.
// NOTE: This also prevents double duck. // NOTE: This also prevents double duck.
@ -368,14 +368,14 @@ mp_buy_anywhere 0
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
mp_unduck_method 0 mp_unduck_method "0"
// Whether this map should spawn a C4 bomb for a player or not. // Whether this map should spawn a C4 bomb for a player or not.
// 0 - disabled // 0 - disabled
// 1 - enabled (default behaviour) // 1 - enabled (default behaviour)
// //
// Default value: "1" // Default value: "1"
mp_give_player_c4 1 mp_give_player_c4 "1"
// When set, map weapons (located on the floor) will be shown. // When set, map weapons (located on the floor) will be shown.
// NOTE: Effect will work after round restart. // NOTE: Effect will work after round restart.
@ -383,7 +383,7 @@ mp_give_player_c4 1
// 1 - enabled (default behaviour) // 1 - enabled (default behaviour)
// //
// Default value: "1" // Default value: "1"
mp_weapons_allow_map_placed 1 mp_weapons_allow_map_placed "1"
// Observer's screen will fade to black on kill event or permanent. // Observer's screen will fade to black on kill event or permanent.
// 0 - No fade // 0 - No fade
@ -391,14 +391,14 @@ mp_weapons_allow_map_placed 1
// 2 - fade to black only on kill moment. // 2 - fade to black only on kill moment.
// //
// Default value: "0" // Default value: "0"
mp_fadetoblack 0 mp_fadetoblack "0"
// Damage from falling. // Damage from falling.
// 0 - disabled // 0 - disabled
// 1 - enabled (default behaviour) // 1 - enabled (default behaviour)
// //
// Default value: "1" // Default value: "1"
mp_falldamage 1 mp_falldamage "1"
// The default grenades that the Ts will spawn with. // The default grenades that the Ts will spawn with.
// Usage: "hegrenade flash sgren" // Usage: "hegrenade flash sgren"
@ -411,7 +411,7 @@ mp_t_default_grenades ""
// 1 - enabled (default behaviour) // 1 - enabled (default behaviour)
// //
// Default value: "1" // Default value: "1"
mp_t_give_player_knife 1 mp_t_give_player_knife "1"
// The default primary (rifle) weapon that the Ts will spawn with. // The default primary (rifle) weapon that the Ts will spawn with.
// Usage: "awp m4a1 mp5navy" // Usage: "awp m4a1 mp5navy"
@ -435,7 +435,7 @@ mp_ct_default_grenades ""
// 1 - enabled (default behaviour) // 1 - enabled (default behaviour)
// //
// Default value: "1" // Default value: "1"
mp_ct_give_player_knife 1 mp_ct_give_player_knife "1"
// The default primary (rifle) weapon that the CTs will spawn with. // The default primary (rifle) weapon that the CTs will spawn with.
// Usage: "awp m4a1 mp5navy" // Usage: "awp m4a1 mp5navy"
@ -454,38 +454,38 @@ mp_ct_default_weapons_secondary "usp"
// 2 - Give Kevlar and Helmet // 2 - Give Kevlar and Helmet
// //
// Default value: "0" // Default value: "0"
mp_free_armor 0 mp_free_armor "0"
// Players can receive all other players text chat, team restrictions apply. // Players can receive all other players text chat, team restrictions apply.
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
sv_allchat 0 sv_allchat "0"
// Players automatically re-jump while holding jump button. // Players automatically re-jump while holding jump button.
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
sv_autobunnyhopping 0 sv_autobunnyhopping "0"
// Allow player speed to exceed maximum running speed // Allow player speed to exceed maximum running speed
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
sv_enablebunnyhopping 0 sv_enablebunnyhopping "0"
// When set, players can plant anywhere, not only in bombsites. // When set, players can plant anywhere, not only in bombsites.
// 0 - disabled (default behaviour) // 0 - disabled (default behaviour)
// 1 - enabled // 1 - enabled
// //
// Default value: "0" // Default value: "0"
mp_plant_c4_anywhere 0 mp_plant_c4_anywhere "0"
// How many bonuses (frags) will get the player who defused or exploded the bomb. // How many bonuses (frags) will get the player who defused or exploded the bomb.
// 3 - (default behaviour) // 3 - (default behaviour)
// //
// Default value: "3" // Default value: "3"
mp_give_c4_frags 3 mp_give_c4_frags "3"

1
dist/game_init.cfg vendored
View File

@ -1,5 +1,6 @@
// Sets mins/maxs hull bounds for the player. // Sets mins/maxs hull bounds for the player.
// 0 - disabled (default behaviour, sets engine) // 0 - disabled (default behaviour, sets engine)
// 1 - enabled (sets gamedll) // 1 - enabled (sets gamedll)
//
// Default value: "1" // Default value: "1"
mp_hullbounds_sets "1" mp_hullbounds_sets "1"

View File

@ -57,7 +57,7 @@ void CItemAirBox::Touch(CBaseEntity *pOther)
CArmoury::Touch(pOther); CArmoury::Touch(pOther);
// airbox was picked up, so sprite to turn off // airbox was picked up, so sprite to turn off
if ((pev->effects & EF_NODRAW) == EF_NODRAW) if ((pev->effects & EF_NODRAW) == EF_NODRAW)
{ {
m_hSprite->TurnOff(); m_hSprite->TurnOff();
@ -73,7 +73,7 @@ void CItemAirBox::Restart()
UTIL_SetOrigin(pev, pev->oldorigin); UTIL_SetOrigin(pev, pev->oldorigin);
pev->velocity = g_vecZero; pev->velocity = g_vecZero;
if(m_flyup < 0) if (m_flyup < 0)
{ {
m_flyup = -m_flyup; m_flyup = -m_flyup;
} }

View File

@ -201,7 +201,7 @@ void GameDLL_SwapTeams_f()
CSGameRules()->SwapAllPlayers(); CSGameRules()->SwapAllPlayers();
float value = 1.0f; float value = 1.0f;
if(CMD_ARGC() >= 2) if (CMD_ARGC() >= 2)
{ {
value = Q_atof(CMD_ARGV(1)); value = Q_atof(CMD_ARGV(1));
} }

View File

@ -10031,7 +10031,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(OnSpawnEquip)(bool addDefault, bool equipG
} }
#ifdef REGAMEDLL_ADD #ifdef REGAMEDLL_ADD
if(!m_bIsVIP) if (!m_bIsVIP)
{ {
switch (static_cast<ArmorType>((int)free_armor.value)) switch (static_cast<ArmorType>((int)free_armor.value))
{ {

View File

@ -78,7 +78,7 @@ void CC4::Holster(int skiplocal)
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f;
#ifdef REGAMEDLL_FIXES #ifdef REGAMEDLL_FIXES
if(m_bStartedArming) if (m_bStartedArming)
{ {
m_pPlayer->SetProgressBarTime(0); m_pPlayer->SetProgressBarTime(0);
} }

View File

@ -430,7 +430,7 @@ int CUtlVector<T>::AddVectorToTail(CUtlVector const &src)
template <class T> template <class T>
inline int CUtlVector<T>::InsertMultipleBefore(int elem, int num, const T *pToInsert) inline int CUtlVector<T>::InsertMultipleBefore(int elem, int num, const T *pToInsert)
{ {
if(num == 0) if (num == 0)
return elem; return elem;
// Can insert at the end // Can insert at the end