Skip to content

Commit

Permalink
Fix (#2558)
Browse files Browse the repository at this point in the history
Fixed issue #2545
  • Loading branch information
matheustkn committed Apr 8, 2022
1 parent 92cdb3a commit 29f3038
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,16 @@ bool CStaticFunctionDefinitions::IsElementInWater(CClientEntity& Entity, bool& b
case CCLIENTPLAYER:
{
CClientPed& Ped = static_cast<CClientPed&>(Entity);
bInWater = Ped.IsInWater();
break;
if (Ped.GetOccupiedVehicle())
{
bInWater = Ped.GetOccupiedVehicle()->IsInWater();
break;
}
else
{
bInWater = Ped.IsInWater();
break;
}
}
case CCLIENTVEHICLE:
{
Expand Down

0 comments on commit 29f3038

Please sign in to comment.