changed mind about jump boosting

This commit is contained in:
christian 2021-07-29 13:54:27 +02:00
parent 44f609b0c4
commit 003b8cb5fa

View File

@ -335,7 +335,7 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
{
float Vel[3], feet_origin[3], ground_pos[3], downwards[3];
//TODO prevent bot from falling off edge if nothing infront
float velocity_addition_z_axis = 300.0;
float velocity_addition_z_axis = 300.0; //300.0
GetEntPropVector(client, Prop_Data, "m_vecVelocity", Vel);
Vel[2] += velocity_addition_z_axis;
@ -370,13 +370,13 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
GetVectorAngles(Result, Result);
TeleportEntity(client, NULL_VECTOR, Result, NULL_VECTOR);
bot_avoid_edge[client] = 0;
ApplyBoost(client, 150.0);
ApplyBoost(client, 350.0);
}
}
}
}
SetEntPropVector(client, Prop_Data, "m_vecBaseVelocity", Vel);
//TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, Vel);
//SetEntPropVector(client, Prop_Data, "m_vecBaseVelocity", Vel);
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, Vel);
}
buttons_old[client] = buttons;
flags_old[client] = flags;
@ -390,8 +390,8 @@ void ApplyBoost(int client, float amount){
NormalizeVector(vel, direction);
ScaleVector(direction, amount);
AddVectors(vel, direction, vel);
//TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vel);
SetEntPropVector(client, Prop_Data, "m_vecBaseVelocity", vel);
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vel);
//SetEntPropVector(client, Prop_Data, "m_vecBaseVelocity", vel);
}
public bool is_bot_player(int client)