mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
Fixed wrong flags and netprops for fake clients in checkpoints.
This commit is contained in:
parent
9fc2b72504
commit
5c0a7cd55c
@ -1739,13 +1739,9 @@ bool SaveCheckpoint(int client, int index, bool overflow = false)
|
||||
iClassname = gA_Classnames.PushString(sClassname);
|
||||
}
|
||||
|
||||
cpcache.iTargetname = iTargetname;
|
||||
cpcache.iClassname = iClassname;
|
||||
cpcache.iMoveType = GetEntityMoveType(target);
|
||||
cpcache.fGravity = GetEntityGravity(target);
|
||||
cpcache.fSpeed = GetEntPropFloat(target, Prop_Send, "m_flLaggedMovementValue");
|
||||
cpcache.fStamina = (gEV_Type != Engine_TF2)? GetEntPropFloat(target, Prop_Send, "m_flStamina"):0.0;
|
||||
cpcache.iGroundEntity = GetEntPropEnt(target, Prop_Data, "m_hGroundEntity");
|
||||
|
||||
int iFlags = GetEntityFlags(target);
|
||||
|
||||
@ -1753,6 +1749,21 @@ bool SaveCheckpoint(int client, int index, bool overflow = false)
|
||||
{
|
||||
iFlags |= FL_CLIENT;
|
||||
iFlags |= FL_AIMTARGET;
|
||||
iFlags &= ~FL_ATCONTROLS;
|
||||
iFlags &= ~FL_FAKECLIENT;
|
||||
|
||||
cpcache.fStamina = 0.0;
|
||||
cpcache.iGroundEntity = -1;
|
||||
cpcache.iTargetname = -1;
|
||||
cpcache.iClassname = -1;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
cpcache.fStamina = (gEV_Type != Engine_TF2)? GetEntPropFloat(target, Prop_Send, "m_flStamina"):0.0;
|
||||
cpcache.iGroundEntity = GetEntPropEnt(target, Prop_Data, "m_hGroundEntity");
|
||||
cpcache.iTargetname = iTargetname;
|
||||
cpcache.iClassname = iClassname;
|
||||
}
|
||||
|
||||
cpcache.iFlags = iFlags;
|
||||
|
||||
@ -1338,7 +1338,7 @@ void UpdateReplayInfo(int client, int style, float time, int track)
|
||||
|
||||
if((iFlags & FL_ATCONTROLS) == 0)
|
||||
{
|
||||
SetEntityFlags(client, (iFlags|FL_ATCONTROLS));
|
||||
SetEntityFlags(client, (iFlags | FL_ATCONTROLS));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user