mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Only synch input states when they dirty
Sending dupe input state messages every 10 seconds is wasteful. They are already sent when the fields dirty, so there's no sense in sending them any more than that. For keeping the connection alive, we'll use lightweight pings.
This commit is contained in:
@ -628,7 +628,6 @@ void plArmatureModBase::IEnableBones(int lod, hsBool enable)
|
||||
|
||||
const char *plArmatureMod::BoneStrings[] = {"Male", "Female", "Critter", "Actor"};
|
||||
|
||||
const float plArmatureMod::kAvatarInputSynchThreshold = 10.f;
|
||||
float plArmatureMod::fMouseTurnSensitivity = 1.f;
|
||||
hsBool plArmatureMod::fClickToTurn = true;
|
||||
|
||||
@ -656,7 +655,6 @@ void plArmatureMod::IInitDefaults()
|
||||
fReverseFBOnIdle = false;
|
||||
fFollowerParticleSystemSO = nil;
|
||||
fPendingSynch = false;
|
||||
fLastInputSynch = 0;
|
||||
fOpaque = true;
|
||||
fPhysHeight = 0.f;
|
||||
fPhysWidth = 0.f;
|
||||
@ -1524,8 +1522,6 @@ void plArmatureMod::SynchInputState(uint32_t rcvID /* = kInvalidPlayerID */)
|
||||
msg->AddNetReceiver(rcvID);
|
||||
|
||||
msg->Send();
|
||||
|
||||
fLastInputSynch = hsTimer::GetSysSeconds();
|
||||
}
|
||||
|
||||
void plArmatureMod::ILinkToPersonalAge()
|
||||
@ -1589,12 +1585,6 @@ hsBool plArmatureMod::IEval(double time, float elapsed, uint32_t dirty)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (localPlayer == this)
|
||||
{
|
||||
if (time - fLastInputSynch > kAvatarInputSynchThreshold)
|
||||
SynchInputState();
|
||||
}
|
||||
|
||||
if (noOverlap)
|
||||
{
|
||||
|
@ -414,7 +414,6 @@ protected:
|
||||
uint8_t fStealthMode;
|
||||
int fStealthLevel; // you are invisible to other players/CCRs of lower stealthLevel
|
||||
|
||||
double fLastInputSynch;
|
||||
plAGModifier * fRootAGMod;
|
||||
plAvBoneMap * fBoneMap; // uses id codes to look up bones. set up by the brain as needed.
|
||||
double fLastSynch;
|
||||
|
Reference in New Issue
Block a user