Skip to content

Commit

Permalink
Fix default options when userinfo not set
Browse files Browse the repository at this point in the history
  • Loading branch information
theAsmodai committed Feb 21, 2018
1 parent 9b97eb0 commit 8c2b034
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/msvc/ReInfoZone.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<ClInclude Include="..\zones.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\amxmodx\configs\info_zone.ini" />
<None Include="..\..\amxmodx\configs\reinfozone.ini" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{88CFE56D-AFD1-43CC-9292-9DAA157286FB}</ProjectGuid>
Expand Down
2 changes: 1 addition & 1 deletion src/msvc/ReInfoZone.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\amxmodx\configs\info_zone.ini">
<None Include="..\..\amxmodx\configs\reinfozone.ini">
<Filter>Configs</Filter>
</None>
</ItemGroup>
Expand Down
9 changes: 5 additions & 4 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ const char* CPlayer::getPosition(lang_t lang)
void CPlayer::loadOptions(char* info)
{
uint8 options = g_engfuncs.pfnInfoKeyValue(info, "iz")[0];

if (options > '\\')
options--;
options -= ' ';
if (options) {
if (options > '\\')
options--;
options -= ' ';
}

m_options.integer = (options ^ g_config.defaultOptions) & 63;
m_lang = g_engfuncs.pfnInfoKeyValue(info, "lang");
Expand Down

0 comments on commit 8c2b034

Please sign in to comment.