Skip to content

Commit

Permalink
Small fixes and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
theAsmodai committed Nov 17, 2017
1 parent 21c0dff commit 9b97eb0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum section_e
st_radio
};

const char* sections[] =
const char* g_sections[] =
{
"",
"MAIN",
Expand All @@ -35,7 +35,7 @@ const char* sections[] =
"RADIO",
};

const char* section_default_format[] =
const char* g_section_default_format[] =
{
"",
"param value",
Expand Down Expand Up @@ -66,7 +66,7 @@ enum data_type_e
dt_translation
};

const char* data_types[] =
const char* g_data_types[] =
{
"",
"param",
Expand All @@ -88,17 +88,17 @@ const char* data_types[] =

NOINLINE section_e getSection(const char* string)
{
for (size_t i = 0; i < arraysize(sections); i++) {
if (!strcmp(string, sections[i]))
for (size_t i = 0; i < arraysize(g_sections); i++) {
if (!strcmp(string, g_sections[i]))
return section_e(i);
}
return st_unknown;
}

NOINLINE int getDataType(const char* string)
{
for (size_t i = 0; i < arraysize(data_types); i++) {
if (!strcmp(string, data_types[i]))
for (size_t i = 0; i < arraysize(g_data_types); i++) {
if (!strcmp(string, g_data_types[i]))
return i;
}
return dt_unknown;
Expand Down Expand Up @@ -541,9 +541,9 @@ NOINLINE bool parseMainConfig(const char* path, const char* file)
if (nullLast(line, ']'))
section = getSection(line);

if (section != st_unknown && section < arraysize(section_default_format)) {
if (section != st_unknown && section < arraysize(g_section_default_format)) {
char temp[256];
strcpy(temp, section_default_format[section]);
strcpy(temp, g_section_default_format[section]);
fields.parseFormat(temp);
}

Expand Down Expand Up @@ -678,7 +678,7 @@ NOINLINE bool loadMainConfig()
REG_CVAR(iz_max_aim_angle);
REG_CVAR(iz_item_max_radius);

char path[260], file[] = "info_zone.ini";
char path[260], file[] = "reinfozone.ini";
g_amxxapi.BuildPathnameR(path, sizeof path - 1, "%s/%s", g_amxxapi.GetLocalInfo("amxx_configsdir", "addons/amxmodx/data"), file);

memset(&g_config, 0, sizeof g_config);
Expand Down
2 changes: 1 addition & 1 deletion src/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static META_FUNCTIONS gMetaFunctionTable = {
plugin_info_t Plugin_info = {
META_INTERFACE_VERSION, // ifvers
"ReInfoZone", // name
"0.6", // version
"0.7", // version
__DATE__, // date
"Asmodai", // author
"http://dedicated-server.ru", // url
Expand Down
8 changes: 4 additions & 4 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ enum
m_iMenu = 820
};

const char* fith_formats_loc[] =
const char* g_fith_formats_loc[] =
{
"fith_he_loc",
"fith_flahs_loc",
"fith_smoke_loc"
};
const char* fith_formats_def[] =
const char* g_fith_formats_def[] =
{
"fith_he_def",
"fith_flahs_def",
"fith_smoke_def"
};

hudopt_t g_hudopts[16]; // 2^4
hudopt_t g_hudopts[1 << 4];
size_t g_hudopts_count;
CIzPlayers g_players;

Expand Down Expand Up @@ -471,7 +471,7 @@ void CPlayer::radioThrowGrenade(size_t grenade_type)
auto audio = g_lang.localize("fith_sound", lang, "%!MRAD_FIREINHOLE");
UTIL_SendRadioSound(player.m_edict, index, audio);

CMsgBuf msg(g_lang.localize(position[0] ? fith_formats_loc[grenade_type] : fith_formats_def[grenade_type], lang, "[name] (RADIO): [command]"));
CMsgBuf msg(g_lang.localize(position[0] ? g_fith_formats_loc[grenade_type] : g_fith_formats_def[grenade_type], lang, "[name] (RADIO): [command]"));
msg.replace("[zone]", position);
msg.replace("[name]", STRING(m_pev->netname));
UTIL_PrintChatColor(i + 1, msg.data());
Expand Down

0 comments on commit 9b97eb0

Please sign in to comment.