mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-25 21:40:19 +00:00
Improvements
This commit is contained in:
parent
266c90deac
commit
ed7ce1429f
3 changed files with 19 additions and 8 deletions
|
@ -54,16 +54,20 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
|
||||
yield return new WaitForEndOfFrame();
|
||||
|
||||
if (oldState != m_ped.CurrentState) // state changed in the meantime
|
||||
if (oldState != m_ped.CurrentState)
|
||||
{
|
||||
Debug.LogFormat("state changed in the meantime, old: {0}, new: {1}", oldState != null ? oldState.GetType().Name : "",
|
||||
m_ped.CurrentState != null ? m_ped.CurrentState.GetType().Name : "");
|
||||
// state changed in the meantime
|
||||
// did server change it ? or syncvar hooks invoked twice ? either way, we should stop here
|
||||
|
||||
// Debug.LogFormat("state changed in the meantime, old: {0}, new: {1}", oldState != null ? oldState.GetType().Name : "",
|
||||
// m_ped.CurrentState != null ? m_ped.CurrentState.GetType().Name : "");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// read current vehicle here - it should've been spawned by now
|
||||
this.ReadNetworkData(data);
|
||||
|
||||
Debug.LogFormat("Switching to state {0}, vehicle: {1}, seat: {2}", this.GetType().Name, this.CurrentVehicle, this.CurrentVehicleSeat);
|
||||
// Debug.LogFormat("Switching to state {0}, vehicle: {1}, seat: {2}", this.GetType().Name, this.CurrentVehicle, this.CurrentVehicleSeat);
|
||||
|
||||
// now we can enter this state
|
||||
m_ped.SwitchState(this.GetType());
|
||||
|
@ -113,6 +117,7 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
if (m_ped.IsInVehicle)
|
||||
return false;
|
||||
|
||||
// this should be removed
|
||||
if (m_ped.IsAiming || m_ped.WeaponHolder.IsFiring)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -20,14 +20,18 @@
|
|||
|
||||
- **vehicle syncing is too laggy** - local player must control the rigid body ; server will validate position/rotation/velocity changes, and correct them if needed ; when server detects collision, or applies force to rigid body, he will override state of rigid body ;
|
||||
|
||||
- try to sync rigid body forces, or just clear them on clients
|
||||
- try to sync rigid body forces, or just clear them on clients ? - will this help ? are forces cleared at the end of frame by physics engine ?
|
||||
|
||||
- all settings should take effect immediately, not after spawning a vehicle
|
||||
- add option to disable rigid body on local player ? - applying position/rotation from syncvar hooks needs to be changed ?
|
||||
|
||||
- add option to disable wheel colliders
|
||||
|
||||
- add current ped state to player stats
|
||||
|
||||
- change default ped sync rate to 20
|
||||
|
||||
- OutOfRangeDestroyer script should be destroyed on clients ; also, it should not be attached to peds owned by players ;
|
||||
|
||||
- stats window
|
||||
|
||||
- display a message to user when network is stopped
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
- Add more obstacles in demo scene
|
||||
|
||||
- Remove world stats window
|
||||
|
||||
- Add option to change fixed delta time
|
||||
|
||||
- Crouching: adjust camera aim offset ? ;
|
||||
|
|
Loading…
Reference in a new issue