From 20f540256fe798f2c18d654756ed43e9fdda9856 Mon Sep 17 00:00:00 2001 From: jenz Date: Thu, 19 Jan 2023 17:46:02 +0100 Subject: [PATCH] update so not knifing when zm. --- AutismBotIngame/python/ingamefollowct.py | 6 +++++- AutismBotIngame/scripting/autism_bot_info.sp | 9 ++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/AutismBotIngame/python/ingamefollowct.py b/AutismBotIngame/python/ingamefollowct.py index 23ee0103..829617f7 100644 --- a/AutismBotIngame/python/ingamefollowct.py +++ b/AutismBotIngame/python/ingamefollowct.py @@ -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;" diff --git a/AutismBotIngame/scripting/autism_bot_info.sp b/AutismBotIngame/scripting/autism_bot_info.sp index 7951ccc8..9935dd3e 100644 --- a/AutismBotIngame/scripting/autism_bot_info.sp +++ b/AutismBotIngame/scripting/autism_bot_info.sp @@ -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; }