Skip to content

Commit ab4da82

Browse files
authored
Merge branch 'master' into startstop
2 parents 17bde89 + a9bd854 commit ab4da82

File tree

6 files changed

+59
-5
lines changed

6 files changed

+59
-5
lines changed

Client/mods/deathmatch/logic/CNetAPI.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,8 +1119,16 @@ void CNetAPI::WritePlayerPuresync(CClientPlayer* pPlayerModel, NetBitStreamInter
11191119
flags.data.bSyncingVelocity = (!flags.data.bIsOnGround || (pPlayerModel->GetPlayerSyncCount() % 4) == 0);
11201120
flags.data.bStealthAiming = (pPlayerModel->IsStealthAiming() == true);
11211121
flags.data.isReloadingWeapon = (pPlayerModel->IsReloadingWeapon() == true);
1122+
flags.data.animInterrupted = pPlayerModel->HasSyncedAnim() && (!pPlayerModel->IsRunningAnimation() || pPlayerModel->m_animationOverridedByClient);
11221123

1123-
if (pPlayerWeapon->GetSlot() > 15)
1124+
// The animation has been overwritten or interrupted by the client
1125+
if (flags.data.animInterrupted)
1126+
{
1127+
pPlayerModel->SetHasSyncedAnim(false);
1128+
pPlayerModel->m_animationOverridedByClient = false;
1129+
}
1130+
1131+
if (flags.data.bHasAWeapon && pPlayerWeapon->GetSlot() > 15)
11241132
flags.data.bHasAWeapon = false;
11251133

11261134
BitStream.Write(&flags);

Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ bool CPlayerPuresyncPacket::Read(NetBitStreamInterface& BitStream)
6363
pSourcePlayer->SetStealthAiming(flags.data.bStealthAiming);
6464
pSourcePlayer->SetReloadingWeapon(flags.data.isReloadingWeapon);
6565

66+
if (flags.data.animInterrupted)
67+
pSourcePlayer->SetAnimationData({});
68+
6669
// Contact element
6770
CElement* pContactElement = NULL;
6871
if (flags.data.bHasContact)

Shared/sdk/net/SyncStructures.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ struct SPlayerPuresyncFlags : public ISyncStructure
544544
{
545545
enum
546546
{
547-
BITCOUNT = 13
547+
BITCOUNT = 14
548548
};
549549

550550
bool Read(NetBitStreamInterface& stream)
@@ -572,6 +572,7 @@ struct SPlayerPuresyncFlags : public ISyncStructure
572572
bool bSyncingVelocity : 1;
573573
bool bStealthAiming : 1;
574574
bool isReloadingWeapon : 1;
575+
bool animInterrupted : 1;
575576
} data;
576577
};
577578

utils/buildactions/utils.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function os.sha256_file(path)
9696
local windows = os.host() == "windows"
9797
local s, errc
9898
if windows then
99-
s, errc = os.outputof(string.format("CertUtil -hashfile \"%s\" SHA256", path))
99+
s, errc = os.outputof(string.format("call \"utils\\7z\\7za.exe\" h -scrcSHA256 \"%s\"", path))
100100
else
101101
s, errc = os.outputof(string.format("sha256sum \"%s\" | awk '{ print $1 }'", path))
102102
end
@@ -109,7 +109,7 @@ function os.sha256_file(path)
109109

110110
-- Clean windows output
111111
if windows then
112-
s = (s:match("\n(.*)\n(.*)") or ""):gsub(" ", "")
112+
s = (s:match("SHA256 for data: +([^\n]*)") or "")
113113
end
114114

115115
return s:lower()

win-build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ IF /i [%2] == [Win32] (
4545
set BUILD_PLATFORM=ARM64
4646
) ELSE (
4747
IF not [%2] == [] (
48-
echo Invalid first argument %2. Using default platform %BUILD_PLATFORM%.
48+
echo Invalid second argument %2. Using default platform %BUILD_PLATFORM%.
4949
)
5050
)
5151

wine-build.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
if [ -z "$MSBUILDPATH" ]; then
4+
echo "Could not find MSBuild. Make sure the MSBUILDPATH environment variable points"
5+
echo "to either MSBuild.exe or a script that handles the invocation of MSBuild.exe."
6+
echo ""
7+
echo "If using msvc-wine, it should point to /path/to/msvc-wine-install-dir/bin/x64/msbuild"
8+
exit 1
9+
fi
10+
echo "Found MSBuild at: $MSBUILDPATH"
11+
12+
BUILD_CONFIGURATION=Release
13+
BUILD_PLATFORM=Win32
14+
15+
# Read configuration (1st parameter)
16+
case ${1,,} in
17+
debug) BUILD_CONFIGURATION=Debug ;;
18+
release) BUILD_CONFIGURATION=Release ;;
19+
"") ;;
20+
*) echo "Invalid first argument $1. Using default configuration $BUILD_CONFIGURATION." ;;
21+
esac
22+
23+
# Read platform (2nd parameter)
24+
case ${2,,} in
25+
win32) BUILD_PLATFORM=Win32 ;;
26+
x64) BUILD_PLATFORM=x64 ;;
27+
arm) BUILD_PLATFORM=ARM ;;
28+
arm64) BUILD_PLATFORM=ARM64 ;;
29+
"") ;;
30+
*) echo "Invalid second argument $2. Using default platform $BUILD_PLATFORM." ;;
31+
esac
32+
33+
echo "Build configuration:"
34+
echo " BUILD_CONFIGURATION = $BUILD_CONFIGURATION"
35+
echo " BUILD_PLATFORM = $BUILD_PLATFORM"
36+
37+
# Create solution (ignoring pause)
38+
wine win-create-projects.bat < /dev/null
39+
echo ""
40+
41+
# Start compiling
42+
"$MSBUILDPATH" Build/MTASA.sln -property:Configuration="$BUILD_CONFIGURATION" -property:Platform="$BUILD_PLATFORM" -maxCpuCount

0 commit comments

Comments
 (0)