1
This commit is contained in:
parent
195e8fb999
commit
f5da282ce0
@ -6,10 +6,12 @@
|
|||||||
#include "room.h"
|
#include "room.h"
|
||||||
#include "roomobstacle.h"
|
#include "roomobstacle.h"
|
||||||
#include "hero.h"
|
#include "hero.h"
|
||||||
|
#include "mapinstance.h"
|
||||||
|
|
||||||
#include "mt/AirDrop.h"
|
#include "mt/AirDrop.h"
|
||||||
#include "mt/MapThing.h"
|
#include "mt/MapThing.h"
|
||||||
#include "mt/Hero.h"
|
#include "mt/Hero.h"
|
||||||
|
#include "mt/Map.h"
|
||||||
|
|
||||||
AirDrop::AirDrop(Room* room)
|
AirDrop::AirDrop(Room* room)
|
||||||
{
|
{
|
||||||
@ -93,8 +95,21 @@ void AirDrop::ShuaMon(const glm::vec3& center, const std::vector<int>& airdrop_m
|
|||||||
const mt::Hero* hero_meta = mt::Hero::GetById(hero_id);
|
const mt::Hero* hero_meta = mt::Hero::GetById(hero_id);
|
||||||
if (hero_meta) {
|
if (hero_meta) {
|
||||||
int team_id = 666;
|
int team_id = 666;
|
||||||
glm::vec3 pos;
|
glm::vec3 ref_point = center;
|
||||||
glm::vec3 dir;
|
glm::vec3 point;
|
||||||
|
glm::vec3 pos = center;
|
||||||
|
room_->map_instance->Scale(ref_point);
|
||||||
|
if (room_->map_instance->FindRandomPointAroundCircle
|
||||||
|
(
|
||||||
|
center,
|
||||||
|
80 * room_->GetMapMeta()->scale(),
|
||||||
|
point
|
||||||
|
)) {
|
||||||
|
room_->map_instance->UnScale(point);
|
||||||
|
pos = point;
|
||||||
|
}
|
||||||
|
glm::vec3 dir = GlmHelper::UP;
|
||||||
|
GlmHelper::RotateY(dir, a8::RandAngle());
|
||||||
Hero* hero = room_->CreateHero(nullptr,
|
Hero* hero = room_->CreateHero(nullptr,
|
||||||
hero_meta,
|
hero_meta,
|
||||||
pos,
|
pos,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user