Based on the replication block in Pawn.uc, any changes to AirControl will be replicated to the owning client.
However, AirControl never gets updated for the client in the following code called on the server. The result is a very jittery experience as the client updates its position in the air based on user input and then gets corrected by the server.
By adding a call to the following function after setting the AirControl to 0 above, I can get rid of the jittery effect, but this seems unnecessary.
Anyone have any ideas? Thanks.
Code:
// variables sent to owning client
if ( bNetDirty && bNetOwner && Role==ROLE_Authority )
InvManager, Controller, GroundSpeed, WaterSpeed, AirSpeed, AccelRate, JumpZ, AirControl;
However, AirControl never gets updated for the client in the following code called on the server. The result is a very jittery experience as the client updates its position in the air based on user input and then gets corrected by the server.
Code:
function PerformSpecialHandicap()
{
local UTPawn P;
if(HandicappedPlayer != none)
{
P = UTPawn(HandicappedPlayer.Pawn);
if(P != none)
{
P.AirControl = 0;
P.DefaultAirControl = 0;
}
}
}
By adding a call to the following function after setting the AirControl to 0 above, I can get rid of the jittery effect, but this seems unnecessary.
Code:
// this shouldn't be necessary! AirControl is supposed to be replicated to owning client.
simulated unreliable client function ClientRemoveAirControl()
{
local UTPlayerController O;
local UTPawn P;
O = UTPlayerController(Owner);
if(O!=none)
{
P = UTPawn(O.Pawn);
if(P!=none)
{
P.AirControl = 0;
P.DefaultAirControl = 0;
}
}
}
Anyone have any ideas? Thanks.