game2006/server/gameserver/mt/PveGemini.cc
aozhiwei 41b32e5f5f 1
2023-11-20 15:31:52 +08:00

48 lines
1.1 KiB
C++

#include "precompile.h"
#include "mt/PveGemini.h"
IMPL_TABLE(mt::PveGemini)
namespace mt
{
void PveGemini::Init1()
{
std::vector<std::string> strings;
a8::Split(multiplayer_enemy_hp_mul(), strings, '|');
for (auto& str : strings) {
hp_muls.push_back(a8::XValue(str).GetDouble());
}
#if 0
if (hp_muls.size() != 4) {
abort();
}
#endif
{
std::vector<std::string> strings;
a8::Split(born_point(), strings, ',');
_spawn_point = glm::vec3(
(float)a8::XValue(strings[0]).GetDouble(),
(float)a8::XValue(strings[1]).GetDouble(),
(float)a8::XValue(strings[2]).GetDouble());
}
}
float PveGemini::GetHpMul(int num) const
{
#if 1
return 1;
#else
if (num > 0 && num <= (int)hp_muls.size()) {
return hp_muls[num - 1];
}
#ifdef MYDEBUG
abort();
#endif
return 0.5;
#endif
}
}