mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-08 19:08:27 +00:00
Fixed improper targetname/classname set for CP (#700).
This commit is contained in:
parent
a712c1daeb
commit
dd8e5a76dd
@ -1958,6 +1958,23 @@ void TeleportToCheckpoint(int client, int index, bool suppressMessage)
|
|||||||
vel = NULL_VECTOR;
|
vel = NULL_VECTOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(cpcache.iTargetname != -1)
|
||||||
|
{
|
||||||
|
char sTargetname[64];
|
||||||
|
gA_Targetnames.GetString(cpcache.iTargetname, sTargetname, 64);
|
||||||
|
|
||||||
|
SetEntPropString(client, Prop_Data, "m_iName", sTargetname);
|
||||||
|
Shavit_PrintToChat(client, "set name %s", sTargetname);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cpcache.iClassname != -1)
|
||||||
|
{
|
||||||
|
char sClassname[64];
|
||||||
|
gA_Classnames.GetString(cpcache.iClassname, sClassname, 64);
|
||||||
|
|
||||||
|
SetEntPropString(client, Prop_Data, "m_iClassname", sClassname);
|
||||||
|
}
|
||||||
|
|
||||||
TeleportEntity(client, pos,
|
TeleportEntity(client, pos,
|
||||||
((gI_CheckpointsSettings[client] & CP_ANGLES) > 0 || cpcache.bSegmented)? ang:NULL_VECTOR,
|
((gI_CheckpointsSettings[client] & CP_ANGLES) > 0 || cpcache.bSegmented)? ang:NULL_VECTOR,
|
||||||
vel);
|
vel);
|
||||||
@ -1980,26 +1997,6 @@ void TeleportToCheckpoint(int client, int index, bool suppressMessage)
|
|||||||
SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", cpcache.fSpeed);
|
SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", cpcache.fSpeed);
|
||||||
SetEntPropEnt(client, Prop_Data, "m_hGroundEntity", cpcache.iGroundEntity);
|
SetEntPropEnt(client, Prop_Data, "m_hGroundEntity", cpcache.iGroundEntity);
|
||||||
|
|
||||||
int iTargetname = gA_Targetnames.FindValue(cpcache.iTargetname);
|
|
||||||
|
|
||||||
if(iTargetname != -1)
|
|
||||||
{
|
|
||||||
char sTargetname[64];
|
|
||||||
gA_Targetnames.GetString(iTargetname, sTargetname, 64);
|
|
||||||
|
|
||||||
SetEntPropString(client, Prop_Data, "m_iName", sTargetname);
|
|
||||||
}
|
|
||||||
|
|
||||||
int iClassname = gA_Classnames.FindValue(cpcache.iClassname);
|
|
||||||
|
|
||||||
if(iClassname != -1)
|
|
||||||
{
|
|
||||||
char sClassname[64];
|
|
||||||
gA_Classnames.GetString(iClassname, sClassname, 64);
|
|
||||||
|
|
||||||
SetEntPropString(client, Prop_Data, "m_iClassname", sClassname);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(gEV_Type != Engine_TF2)
|
if(gEV_Type != Engine_TF2)
|
||||||
{
|
{
|
||||||
SetEntPropFloat(client, Prop_Send, "m_flStamina", cpcache.fStamina);
|
SetEntPropFloat(client, Prop_Send, "m_flStamina", cpcache.fStamina);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user