1
This commit is contained in:
parent
d2d0d3a62c
commit
6ebd48675e
@ -1400,7 +1400,8 @@ void Human::SummonHero(int heroid)
|
|||||||
(this,
|
(this,
|
||||||
hero_meta,
|
hero_meta,
|
||||||
GetPos(),
|
GetPos(),
|
||||||
move_dir
|
move_dir,
|
||||||
|
team_id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -573,7 +573,8 @@ Car* Room::CreateCar(Human* driver,
|
|||||||
Hero* Room::CreateHero(Creature* master,
|
Hero* Room::CreateHero(Creature* master,
|
||||||
MetaData::Player* meta,
|
MetaData::Player* meta,
|
||||||
const a8::Vec2& pos,
|
const a8::Vec2& pos,
|
||||||
const a8::Vec2& dir)
|
const a8::Vec2& dir,
|
||||||
|
int team_id)
|
||||||
{
|
{
|
||||||
Hero* hero = EntityFactory::Instance()->MakeHero(AllocUniid());
|
Hero* hero = EntityFactory::Instance()->MakeHero(AllocUniid());
|
||||||
hero->meta = meta;
|
hero->meta = meta;
|
||||||
@ -581,6 +582,8 @@ Hero* Room::CreateHero(Creature* master,
|
|||||||
hero->room = this;
|
hero->room = this;
|
||||||
hero->SetPos(pos);
|
hero->SetPos(pos);
|
||||||
hero->move_dir = dir;
|
hero->move_dir = dir;
|
||||||
|
hero->attack_dir = dir;
|
||||||
|
hero->team_id = team_id;
|
||||||
hero->Initialize();
|
hero->Initialize();
|
||||||
AddToEntityHash(hero);
|
AddToEntityHash(hero);
|
||||||
AddToMoveableHash(hero);
|
AddToMoveableHash(hero);
|
||||||
|
@ -117,7 +117,8 @@ public:
|
|||||||
Hero* CreateHero(Creature* master,
|
Hero* CreateHero(Creature* master,
|
||||||
MetaData::Player* meta,
|
MetaData::Player* meta,
|
||||||
const a8::Vec2& pos,
|
const a8::Vec2& pos,
|
||||||
const a8::Vec2& dir);
|
const a8::Vec2& dir,
|
||||||
|
int team_id);
|
||||||
|
|
||||||
void OnHumanDie(Human* hum);
|
void OnHumanDie(Human* hum);
|
||||||
void OnHumanRevive(Human* hum);
|
void OnHumanRevive(Human* hum);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user