thanks again, i got it. all changes have been made in AI_States.cpp. thanks for pointing me in the right direction.
Code:
switch ( newTactical ) {
case AITACTICAL_MOVE_TETHER:
if(enemy.ent){
result = MoveToAttack ( enemy.ent, animator.GetAnim ( "ranged_attack" ) );
// Found nothing but still have a find going
if ( !result && aasFind ) {
// turn ranged back on for next update on next frame
combat.tacticalMaskUpdate |= AITACTICAL_RANGED_BIT;
return false;
}
break;
}
result = MoveToTether ( tether );
break;
your codespot had to be changed too:
Code:
// No tether move if not tethered
if ( !IsTethered ( ) ) {
availableTactical &= ~(AITACTICAL_MOVE_TETHER_BIT);
// Filter out any tactical states that require a leader
if ( !leader || (enemy.ent && IsEnemyVisible() && enemy.range < move.followRange[1] * 2.0f ) ) {
availableTactical &= ~(AITACTICAL_MOVE_FOLLOW_BIT);
} else if ( leader && !enemy.ent ) {
availableTactical &= ~(AITACTICAL_COVER_BITS);
}
// When tethered disable actions that dont adhear to the tether.
} else {
if(!enemy.ent){
availableTactical &= ~(AITACTICAL_MELEE_BIT|AITACTICAL_MOVE_FOLLOW_BIT|AITACTICAL_HIDE_BIT|AITACTICAL_COVER_ADVANCE_BIT|AITACTICAL_COVER_FLANK_BIT|AITACTICAL_COVER_RETREAT_BIT|AITACTICAL_COVER_AMBUSH_BIT);
}
}
Code:
// handle Auto break tethers
if ( IsTethered ( ) && tether->IsAutoBreak ( ) && IsWithinTether ( ) ) {
tether = NULL;
}
// bdmn begin:
if(IsTethered ( ) && IsWithinTether () ){
tether = NULL;
}
// bdmn end
Code:
case AITACTICAL_MOVE_TETHER:
// If not moving we dont want to idle in the move state so skip it
if ( !move.fl.moving ) {
return AICTRESULT_SKIP;
}
// We are still heading towards our tether so dont reissue a move
return AICTRESULT_OK;