机器人ai
This commit is contained in:
parent
1b6ce671ce
commit
7e76abca30
@ -31,6 +31,16 @@ void Hero::Initialize()
|
||||
ai = new HeroAI;
|
||||
ai->owner = this;
|
||||
ai->SetAiLevel(8);
|
||||
MetaData::Equip* weapon_meta = MetaMgr::Instance()->GetEquip(meta->i->default_weapon());
|
||||
if (weapon_meta) {
|
||||
weapons[GUN_SLOT1].weapon_idx = GUN_SLOT1;
|
||||
weapons[GUN_SLOT1].weapon_id = weapon_meta->i->id();
|
||||
weapons[GUN_SLOT1].weapon_lv = 1;
|
||||
weapons[GUN_SLOT1].ammo = 10000;
|
||||
weapons[GUN_SLOT1].meta = weapon_meta;
|
||||
weapons[GUN_SLOT1].Recalc();
|
||||
SetCurrWeapon(&weapons[GUN_SLOT1]);
|
||||
}
|
||||
}
|
||||
|
||||
void Hero::FillMFObjectPart(Room* room, Human* hum, cs::MFObjectPart* part_data)
|
||||
|
@ -156,6 +156,7 @@ message Player
|
||||
optional float hit_radius = 25;
|
||||
optional string ai_script = 26;
|
||||
optional string init_buffs = 27;
|
||||
optional int32 default_weapon = 28;
|
||||
}
|
||||
|
||||
message Robot
|
||||
|
Loading…
x
Reference in New Issue
Block a user