}
float ladder_zdir = 0;
- if(time < this.ladder_time)
+ if(this.ladder_entity)
{
if(this.goalcurrent.origin.z + this.goalcurrent.mins.z > this.origin.z + this.mins.z)
{
// Choose weapons for far distance
if ( distance > bot_distance_far ) {
- for(i=0; i < Weapons_COUNT && bot_weapons_far[i] != -1 ; ++i){
+ for(i=0; i < REGISTRY_COUNT(Weapons) && bot_weapons_far[i] != -1 ; ++i){
w = bot_weapons_far[i];
- if ( client_hasweapon(this, Weapons_from(w), weaponentity, true, false) )
+ if ( client_hasweapon(this, REGISTRY_GET(Weapons, w), weaponentity, true, false) )
{
if ((this.(weaponentity).m_weapon.m_id == w && combo) || havocbot_chooseweapon_checkreload(this, weaponentity, w))
continue;
- this.(weaponentity).m_switchweapon = Weapons_from(w);
+ this.(weaponentity).m_switchweapon = REGISTRY_GET(Weapons, w);
return;
}
}
// Choose weapons for mid distance
if ( distance > bot_distance_close) {
- for(i=0; i < Weapons_COUNT && bot_weapons_mid[i] != -1 ; ++i){
+ for(i=0; i < REGISTRY_COUNT(Weapons) && bot_weapons_mid[i] != -1 ; ++i){
w = bot_weapons_mid[i];
- if ( client_hasweapon(this, Weapons_from(w), weaponentity, true, false) )
+ if ( client_hasweapon(this, REGISTRY_GET(Weapons, w), weaponentity, true, false) )
{
if ((this.(weaponentity).m_weapon.m_id == w && combo) || havocbot_chooseweapon_checkreload(this, weaponentity, w))
continue;
- this.(weaponentity).m_switchweapon = Weapons_from(w);
+ this.(weaponentity).m_switchweapon = REGISTRY_GET(Weapons, w);
return;
}
}
}
// Choose weapons for close distance
- for(i=0; i < Weapons_COUNT && bot_weapons_close[i] != -1 ; ++i){
+ for(i=0; i < REGISTRY_COUNT(Weapons) && bot_weapons_close[i] != -1 ; ++i){
w = bot_weapons_close[i];
- if ( client_hasweapon(this, Weapons_from(w), weaponentity, true, false) )
+ if ( client_hasweapon(this, REGISTRY_GET(Weapons, w), weaponentity, true, false) )
{
if ((this.(weaponentity).m_weapon.m_id == w && combo) || havocbot_chooseweapon_checkreload(this, weaponentity, w))
continue;
- this.(weaponentity).m_switchweapon = Weapons_from(w);
+ this.(weaponentity).m_switchweapon = REGISTRY_GET(Weapons, w);
return;
}
}