mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-14 16:27:19 +00:00
safety check
This commit is contained in:
parent
942453a2a4
commit
e649d483d2
1 changed files with 3 additions and 0 deletions
|
@ -15,6 +15,7 @@ namespace SanAndreasUnity.Net
|
|||
[SyncVar] float m_net_mass;
|
||||
|
||||
|
||||
|
||||
void Awake()
|
||||
{
|
||||
this.NetworkRigidBody = this.GetComponentOrThrow<NetworkRigidBody>();
|
||||
|
@ -22,6 +23,8 @@ namespace SanAndreasUnity.Net
|
|||
|
||||
public void InitializeOnServer(uint vehicleId, string frameName, float mass, Rigidbody rigidbody)
|
||||
{
|
||||
NetStatus.ThrowIfNotOnServer();
|
||||
|
||||
m_net_vehicleId = vehicleId;
|
||||
m_net_frameName = frameName;
|
||||
m_net_mass = mass;
|
||||
|
|
Loading…
Reference in a new issue