diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 0d2e4f8..4e92da2 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1400,7 +1400,8 @@ void Human::SummonHero(int heroid) (this, hero_meta, GetPos(), - move_dir + move_dir, + team_id ); } } diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 1743f4f..b1e96b3 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -573,7 +573,8 @@ Car* Room::CreateCar(Human* driver, Hero* Room::CreateHero(Creature* master, MetaData::Player* meta, const a8::Vec2& pos, - const a8::Vec2& dir) + const a8::Vec2& dir, + int team_id) { Hero* hero = EntityFactory::Instance()->MakeHero(AllocUniid()); hero->meta = meta; @@ -581,6 +582,8 @@ Hero* Room::CreateHero(Creature* master, hero->room = this; hero->SetPos(pos); hero->move_dir = dir; + hero->attack_dir = dir; + hero->team_id = team_id; hero->Initialize(); AddToEntityHash(hero); AddToMoveableHash(hero); diff --git a/server/gameserver/room.h b/server/gameserver/room.h index d9369ad..94446e9 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -117,7 +117,8 @@ public: Hero* CreateHero(Creature* master, MetaData::Player* meta, const a8::Vec2& pos, - const a8::Vec2& dir); + const a8::Vec2& dir, + int team_id); void OnHumanDie(Human* hum); void OnHumanRevive(Human* hum);