predict projectile positioin
This commit is contained in:
@ -138,12 +138,12 @@ namespace RageCoop.Client
|
|||||||
{
|
{
|
||||||
ID =sp.ID,
|
ID =sp.ID,
|
||||||
ShooterID=sp.ShooterID,
|
ShooterID=sp.ShooterID,
|
||||||
Position=p.PredictPosition(),
|
|
||||||
Rotation=p.Rotation,
|
Rotation=p.Rotation,
|
||||||
Velocity=p.Velocity,
|
Velocity=p.Velocity,
|
||||||
WeaponHash=(uint)p.WeaponHash,
|
WeaponHash=(uint)p.WeaponHash,
|
||||||
Exploded=p.IsDead
|
Exploded=p.IsDead
|
||||||
};
|
};
|
||||||
|
packet.Position=p.Position+packet.Velocity*Latency;
|
||||||
if (p.IsDead) { EntityPool.RemoveProjectile(sp.ID, "Dead"); }
|
if (p.IsDead) { EntityPool.RemoveProjectile(sp.ID, "Dead"); }
|
||||||
Send(packet, ConnectionChannel.ProjectileSync);
|
Send(packet, ConnectionChannel.ProjectileSync);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user