mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
cya basevelocity (fix for prediction issue)
This commit is contained in:
parent
519756bd70
commit
15a36a2e2f
@ -39,7 +39,6 @@ enum CheckpointsCache
|
||||
Float:fCPPosition[3],
|
||||
Float:fCPAngles[3],
|
||||
Float:fCPVelocity[3],
|
||||
Float:fCPBaseVelocity[3],
|
||||
MoveType:mtCPMoveType,
|
||||
Float:fCPGravity,
|
||||
Float:fCPSpeed,
|
||||
@ -1808,9 +1807,6 @@ bool SaveCheckpoint(int client, int index, bool overflow = false)
|
||||
GetEntPropVector(target, Prop_Data, "m_vecAbsVelocity", temp);
|
||||
CopyArray(temp, cpcache[fCPVelocity], 3);
|
||||
|
||||
GetEntPropVector(target, Prop_Data, "m_vecBaseVelocity", temp);
|
||||
CopyArray(temp, cpcache[fCPBaseVelocity], 3);
|
||||
|
||||
char[] sTargetname = new char[32];
|
||||
GetEntPropString(target, Prop_Data, "m_iName", sTargetname, 32);
|
||||
|
||||
@ -2002,21 +1998,22 @@ void TeleportToCheckpoint(int client, int index, bool suppressMessage)
|
||||
float ang[3];
|
||||
CopyArray(cpcache[fCPAngles], ang, 3);
|
||||
|
||||
TeleportEntity(client, pos,
|
||||
((gI_CheckpointsSettings[client] & CP_ANGLES) > 0 || cpcache[bCPSegmented])? ang:NULL_VECTOR,
|
||||
NULL_VECTOR);
|
||||
float vel[3];
|
||||
|
||||
if((gI_CheckpointsSettings[client] & CP_VELOCITY) > 0 || cpcache[bCPSegmented])
|
||||
{
|
||||
float basevel[3];
|
||||
CopyArray(cpcache[fCPBaseVelocity], basevel, 3);
|
||||
SetEntPropVector(client, Prop_Data, "m_vecBaseVelocity", basevel);
|
||||
|
||||
float vel[3];
|
||||
CopyArray(cpcache[fCPVelocity], vel, 3);
|
||||
SetEntPropVector(client, Prop_Data, "m_vecAbsVelocity", vel);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
vel = NULL_VECTOR;
|
||||
}
|
||||
|
||||
TeleportEntity(client, pos,
|
||||
((gI_CheckpointsSettings[client] & CP_ANGLES) > 0 || cpcache[bCPSegmented])? ang:NULL_VECTOR,
|
||||
vel);
|
||||
|
||||
MoveType mt = cpcache[mtCPMoveType];
|
||||
|
||||
if(mt == MOVETYPE_LADDER || mt == MOVETYPE_WALK)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user