mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
adjust code
This commit is contained in:
parent
de45114cfb
commit
1f30306061
@ -67,7 +67,8 @@ void FireWeapon()
|
||||
{
|
||||
// prediction: apply bullet force locally and send command to server
|
||||
ApplyBulletForce(rigid, hit.normal, weapon.impactForce);
|
||||
if (!isServer) CmdApplyBulletForce(predictedPhysics.target, hit.normal, weapon.impactForce); // not in host mode
|
||||
PredictedRigidbody target = predictedPhysics.target.GetComponent<PredictedRigidbody>();
|
||||
if (!isServer) CmdApplyBulletForce(target, hit.normal, weapon.impactForce); // not in host mode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user