better team joining

This commit is contained in:
nullifiedcat 2017-03-23 21:15:08 +03:00
parent d4bb2c669c
commit 7acadeb080
2 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ void DoWalking() {
}
CachedEntity* found_entity = ENTITY(following_idx);
if (mimic_slot && !g_pLocalPlayer->life_state) {
if (mimic_slot && !g_pLocalPlayer->life_state && !CE_BYTE(found_entity, netvar.iLifeState)) {
CachedEntity* owner_weapon = ENTITY(CE_INT(found_entity, netvar.hActiveWeapon) & 0xFFF);
if (CE_GOOD(owner_weapon) && CE_GOOD(g_pLocalPlayer->weapon())) {
// FIXME proper classes

View File

@ -106,7 +106,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
if (g_GlobalVars->curtime < last_jointeam_try) last_jointeam_try = 0.0f;
if (!g_pLocalPlayer->team) team_joining_state = 1;
if (!g_pLocalPlayer->team || (g_pLocalPlayer->team == TEAM_SPEC)) team_joining_state = 1;
else {
if (team_joining_state) {
logging::Info("Trying to change CLASS");
@ -220,7 +220,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
}
if (CE_GOOD(g_pLocalPlayer->entity) && !g_pLocalPlayer->life_state) {
hacks::shared::followbot::DoWalking();
SAFE_CALL(hacks::shared::followbot::DoWalking());
}
if (cmd)
g_Settings.last_angles = cmd->viewangles;