Skip to content

Commit

Permalink
game_player_equip: check UsuOnly flag
Browse files Browse the repository at this point in the history
fix VS2015 compile
  • Loading branch information
Vaqtincha committed Apr 29, 2021
1 parent e86284b commit bfe67e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions dep/cppunitlite/msvc/cppunitlite.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>cppunitlite</RootNamespace>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down
7 changes: 7 additions & 0 deletions regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9892,10 +9892,17 @@ void EXT_FUNC CBasePlayer::__API_HOOK(OnSpawnEquip)(bool addDefault, bool equipG
while ((pWeaponEntity = UTIL_FindEntityByClassname(pWeaponEntity, "game_player_equip")))
{
pWeaponEntity->Touch(this);
#ifndef REGAMEDLL_FIXES
addDefault = false;
#endif
}
}

#ifdef REGAMEDLL_FIXES
if (HasWeapons())
addDefault = false;
#endif

if (m_bNotKilled)
addDefault = false;

Expand Down
2 changes: 1 addition & 1 deletion regamedll/msvc/ReGameDLL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@
<ProjectGuid>{70A2B904-B7DB-4C48-8DE0-AF567360D572}</ProjectGuid>
<RootNamespace>ReGameDLL</RootNamespace>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down

0 comments on commit bfe67e1

Please sign in to comment.