update so not knifing when zm.

This commit is contained in:
jenz 2023-01-19 17:46:02 +01:00
parent e57a47eb34
commit 20f540256f
2 changed files with 9 additions and 6 deletions

View File

@ -42,7 +42,11 @@ def bot_process_movement(input_line):
dist_target = float(dist_target)
enemy_distance = float(enemy_distance)
targeteam = int(targeteam)
strInput = "-attack; wait 2; -use; wait 5; +attack; wait 5; cl_minmodels 1; wait 2; +use; wait 5; "
#request by bane that bots should simply not infect people shrug
if targeteam == 2:
strInput = "-attack; wait 2; -use; wait 5; wait 5; cl_minmodels 1; wait 2; +use; wait 5; "
else:
strInput = "-attack; wait 2; -use; wait 5; +attack; wait 5; cl_minmodels 1; wait 2; +use; wait 5; "
#python has no switches and such
if state in [5, 7]:
strInput += "-forward; wait 2; use weapon_knife; wait 5;"

View File

@ -129,12 +129,14 @@ public Action OnPlayerRunCmd(int client, int& buttons, int& impulse, float vel[3
if (!IsValidClient(client) || !IsPlayerAlive(client) || !is_bot_player[client]) return Plugin_Continue;
if ((GetEntityMoveType(client) & MOVETYPE_LADDER))
{
has_to_jump_bots[client] = 0;
GetEntPropVector(client, Prop_Send, "m_vecOrigin", coords_run_cmd[client]);
return Plugin_Continue;
}
if (GetEntProp(client, Prop_Data, "m_nWaterLevel") != 0)
{
has_to_jump_bots[client] = 0;
return Plugin_Continue;
}
//make sure fell of an edge instead of actually jumping
@ -152,13 +154,10 @@ public Action OnPlayerRunCmd(int client, int& buttons, int& impulse, float vel[3
buttons |= IN_JUMP; //jump
has_to_jump_bots[client] = 2;
}
else if (GetEntityFlags(client) & FL_ONGROUND)
if (GetEntityFlags(client) & FL_ONGROUND)
{
GetEntPropVector(client, Prop_Send, "m_vecOrigin", coords_run_cmd[client]);
if (has_to_jump_bots[client] == 2)
{
has_to_jump_bots[client] = 0;
}
has_to_jump_bots[client] = 0;
}
return Plugin_Continue;
}