1
This commit is contained in:
parent
a1d4fcd0c0
commit
bbd187541c
@ -6,6 +6,8 @@
|
|||||||
#include "hero.h"
|
#include "hero.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "pbutils.h"
|
#include "pbutils.h"
|
||||||
|
#include "glmhelper.h"
|
||||||
|
|
||||||
#include "mt/Param.h"
|
#include "mt/Param.h"
|
||||||
#include "mt/Hero.h"
|
#include "mt/Hero.h"
|
||||||
#include "mt/PveGemini.h"
|
#include "mt/PveGemini.h"
|
||||||
@ -64,9 +66,9 @@ void Incubator::AllocAndroid(Human* target, int num)
|
|||||||
A8_ABORT();
|
A8_ABORT();
|
||||||
}
|
}
|
||||||
int try_count = 0;
|
int try_count = 0;
|
||||||
a8::Vec2 dir = a8::Vec2::UP;
|
glm::vec3 dir = GlmHelper::UP;
|
||||||
while (num > 0 && try_count < 20 && !hold_humans_.empty()) {
|
while (num > 0 && try_count < 20 && !hold_humans_.empty()) {
|
||||||
dir.Rotate(a8::RandAngle());
|
GlmHelper::RotateY(dir, a8::RandAngle());
|
||||||
int rand_len = rand() % mt::Param::s().incubator_rand_length;
|
int rand_len = rand() % mt::Param::s().incubator_rand_length;
|
||||||
Human* hum = hold_humans_[0];
|
Human* hum = hold_humans_[0];
|
||||||
Position old_pos = hum->GetPos();
|
Position old_pos = hum->GetPos();
|
||||||
@ -227,10 +229,12 @@ void Incubator::AutoAllocAndroid()
|
|||||||
|
|
||||||
void Incubator::ActiveAndroid(Human* hum, Human* android)
|
void Incubator::ActiveAndroid(Human* hum, Human* android)
|
||||||
{
|
{
|
||||||
a8::Vec2 center = room->GetGasData().pos_new;
|
glm::vec3 center = glm::vec3(room->GetGasData().pos_new.x,
|
||||||
|
0.0f,
|
||||||
|
room->GetGasData().pos_new.y);
|
||||||
float start_distance = a8::RandEx(200, 600);
|
float start_distance = a8::RandEx(200, 600);
|
||||||
a8::Vec2 start_dir = a8::Vec2::UP;
|
glm::vec3 start_dir = GlmHelper::UP;
|
||||||
start_dir.Rotate(a8::RandAngle());
|
GlmHelper::RotateY(start_dir, a8::RandAngle());
|
||||||
|
|
||||||
android->SetPos(hum->GetPos());
|
android->SetPos(hum->GetPos());
|
||||||
int try_count = 0;
|
int try_count = 0;
|
||||||
@ -326,13 +330,7 @@ void Incubator::SpawnWaveMon(int wave)
|
|||||||
int team_id = 666;
|
int team_id = 666;
|
||||||
Creature* master = nullptr;
|
Creature* master = nullptr;
|
||||||
|
|
||||||
// 999
|
|
||||||
#if 1
|
|
||||||
glm::vec3 dir = GlmHelper::UP;
|
glm::vec3 dir = GlmHelper::UP;
|
||||||
#else
|
|
||||||
a8::Vec2 dir = hero_pos;
|
|
||||||
dir.Normalize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Hero* hero = room->CreateHero(master,
|
Hero* hero = room->CreateHero(master,
|
||||||
hero_meta,
|
hero_meta,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user