This commit is contained in:
VDH
2025-09-11 15:51:02 +07:00
parent d72a84c532
commit 68c8799242
9 changed files with 22135 additions and 146 deletions
@@ -1,130 +0,0 @@
{
"runtimeTarget": {
"name": ".NETStandard,Version=v2.1/",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETStandard,Version=v2.1": {},
".NETStandard,Version=v2.1/": {
"CSNetwork/1.0.0": {
"dependencies": {
"System.Reflection.Metadata": "9.0.8"
},
"runtime": {
"CSNetwork.dll": {}
}
},
"System.Buffers/4.5.1": {
"runtime": {
"lib/netstandard2.0/System.Buffers.dll": {
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.6.28619.1"
}
}
},
"System.Collections.Immutable/9.0.8": {
"dependencies": {
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
},
"runtime": {
"lib/netstandard2.0/System.Collections.Immutable.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.825.36511"
}
}
},
"System.Memory/4.5.5": {
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
},
"runtime": {
"lib/netstandard2.0/System.Memory.dll": {
"assemblyVersion": "4.0.1.2",
"fileVersion": "4.6.31308.1"
}
}
},
"System.Numerics.Vectors/4.4.0": {
"runtime": {
"lib/netstandard2.0/System.Numerics.Vectors.dll": {
"assemblyVersion": "4.1.3.0",
"fileVersion": "4.6.25519.3"
}
}
},
"System.Reflection.Metadata/9.0.8": {
"dependencies": {
"System.Collections.Immutable": "9.0.8",
"System.Memory": "4.5.5"
},
"runtime": {
"lib/netstandard2.0/System.Reflection.Metadata.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.825.36511"
}
}
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"runtime": {
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
}
}
},
"libraries": {
"CSNetwork/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"System.Buffers/4.5.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
"path": "system.buffers/4.5.1",
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
},
"System.Collections.Immutable/9.0.8": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Eje6exD7AGKPg5SIkmjyWTBq0KK6SpfTBfdFUmpGG07mNbYimFJ+jyVnILcs0ikFOXoYTBpBOxKYgAk2hhjYOw==",
"path": "system.collections.immutable/9.0.8",
"hashPath": "system.collections.immutable.9.0.8.nupkg.sha512"
},
"System.Memory/4.5.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
"path": "system.memory/4.5.5",
"hashPath": "system.memory.4.5.5.nupkg.sha512"
},
"System.Numerics.Vectors/4.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==",
"path": "system.numerics.vectors/4.4.0",
"hashPath": "system.numerics.vectors.4.4.0.nupkg.sha512"
},
"System.Reflection.Metadata/9.0.8": {
"type": "package",
"serviceable": true,
"sha512": "sha512-oJQezcASFomKvSp+06pzvSFRTnzdUJtiO19peAdZ9RwiqZinBV56u7zW5fEGf2/VrQFL3qZSV7UapgG31XRWQA==",
"path": "system.reflection.metadata/9.0.8",
"hashPath": "system.reflection.metadata.9.0.8.nupkg.sha512"
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
"path": "system.runtime.compilerservices.unsafe/6.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
}
}
}
@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 9117d707eb63a6442b7b36c6b7669bf3
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 3b9d74e7123c6e144ae35ceb982d00de
@@ -23,6 +23,7 @@ namespace PerfectWorld.Scripts.Managers
if (Msg.iSubID == 0)
{
Debug.LogWarning("HoangDev : EC_ManPlayerEC_ManPlayerEC_ManPlayer");
if (GameController.Instance == null) return true;
GameController.Instance.GetHostPlayer().ProcessMessage(Msg);
}
else if (Msg.iSubID < 0)
File diff suppressed because one or more lines are too long
+13 -3
View File
@@ -14,6 +14,7 @@ using UnityEngine.InputSystem;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using Scene = UnityEngine.SceneManagement.Scene;
using System.Runtime.InteropServices;
public class CECHostPlayer : MonoBehaviour
{
@@ -186,17 +187,26 @@ public class CECHostPlayer : MonoBehaviour
switch ((int)Msg.dwMsg)
{
case int value when value == EC_MsgDef.MSG_HST_CORRECTPOS: OnMsgHstCorrectPos(Msg); break;
case int value when value == EC_MsgDef.MSG_HST_GOTO: OnMsgHstGoto(Msg); break;
}
}
public void OnMsgHstCorrectPos(in ECMSG Msg)
{
Debug.Log("OnMsgHstCorrectPos");
cmd_host_correct_pos pCmd = (cmd_host_correct_pos)Msg.dwParam1;
byte[] buf = (byte[]) Msg.dwParam1; // chỗ bạn lưu pDataBuf
GCHandle handle = GCHandle.Alloc(buf, GCHandleType.Pinned);
cmd_host_correct_pos pCmd = (cmd_host_correct_pos)Marshal.PtrToStructure(
handle.AddrOfPinnedObject(), typeof(cmd_host_correct_pos));
handle.Free();
Debug.LogWarning("pCmd.pos " + pCmd.pos);
SetPos(pCmd.pos);
}
public void OnMsgHstGoto(in ECMSG Msg)
{
Debug.Log("OnMsgHstGoto");
cmd_notify_hostpos pCmd = (cmd_notify_hostpos)Msg.dwParam1;
}
private void SetPos(Vector3 pos)
{
transform.position = pos;
+6
View File
@@ -15,6 +15,12 @@ struct cmd_host_correct_pos
public Vector3 pos;
public ushort stamp;
};
struct cmd_notify_hostpos
{
public Vector3 vPos;
public int tag;
public int line;
};
enum MoveMode
{
GP_MOVE_WALK = 0,
+9 -4
View File
@@ -26,10 +26,6 @@ public class GameController : MonoBehaviour
}
private void Awake()
{
if(instance == null)
{
instance = this;
}
}
private void Start()
@@ -43,6 +39,11 @@ public class GameController : MonoBehaviour
}
public CECHostPlayer GetHostPlayer()
{
if(hostPlayer == null)
{
hostPlayer = FindAnyObjectByType<CECHostPlayer>();
}
Debug.Log("hostPlayer " + hostPlayer);
return hostPlayer;
}
public void InitCharacter(cmd_self_info_1 info)
@@ -62,4 +63,8 @@ public class GameController : MonoBehaviour
//posGround.y -= 2f;
//ground.transform.position = posGround;
}
private void OnDestroy()
{
instance = null;
}
}