1
This commit is contained in:
parent
f7403c0b0a
commit
c334c8537a
@ -114,9 +114,7 @@ void Android::InternalUpdate(int delta_time)
|
||||
return;
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
agent_->Exec();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Android::GiveEquip()
|
||||
|
@ -545,7 +545,7 @@ float BattleDataContext::CalcDmg(Creature* target, IBullet* bullet)
|
||||
break;
|
||||
}
|
||||
}
|
||||
float normal_dmg = total_atk * (1 - target->GetBattleContext()->GetDef() / (target->GetBattleContext()->GetDef() + 200));
|
||||
float normal_dmg = total_atk * (1 - target->GetBattleContext()->GetDef() / (target->GetBattleContext()->GetDef() + 400));
|
||||
normal_dmg *= 1 + bullet->GetStrengthenWall();
|
||||
float crit = g_calc_dmg_context.is_crit ? GetCritRate(bullet) : 0;
|
||||
float dodge = IsDodge(bullet) ? GetDodgeRuduce(bullet) : 0;
|
||||
|
@ -33,6 +33,12 @@ Buff::Buff()
|
||||
Buff::~Buff()
|
||||
{
|
||||
int i = 0;
|
||||
if (meta->buff_id() == 207014) {
|
||||
int i = 0;
|
||||
}
|
||||
if (meta->buff_id() == 207018) {
|
||||
int i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Buff::Init()
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
void HoldShieldBuff::Activate()
|
||||
{
|
||||
owner->shield_max_hp_ = SkillHelper::GetLdfyHp(owner, skill_meta);
|
||||
owner->shield_max_hp_ = owner->GetMaxHP();
|
||||
owner->shield_hp_ = owner->shield_max_hp_;
|
||||
owner->room->frame_event.AddPropChg(owner->GetWeakPtrRef(),
|
||||
kPropShieldHp,
|
||||
|
@ -836,10 +836,10 @@ void Bullet::GetHitThings(BulletCheckResult& result)
|
||||
sender.Get()->team_id == obstacle->GetTeamId(room)) {
|
||||
bool ret = Check2dRotationRectangle
|
||||
(GetPos().x,
|
||||
GetPos().y,
|
||||
GetPos().z,
|
||||
gun_meta->bullet_rad(),
|
||||
obstacle->GetPos().x,
|
||||
obstacle->GetPos().y,
|
||||
obstacle->GetPos().z,
|
||||
obstacle->meta->width(),
|
||||
obstacle->meta->height(),
|
||||
obstacle->GetRotate() * 180.0f
|
||||
|
@ -2738,12 +2738,12 @@ void Creature::CheckBulletHitHoldShield(IBullet* bullet, bool& eat)
|
||||
//param2是距离 param4是宽度
|
||||
glm::vec3 shield_pos = GetPos().ToGlmVec3() + GetAttackDir() * hold_shield_buff->meta->_buff_param2;
|
||||
bool ret = Collision::Check2dRotationRectangle
|
||||
(GetPos().GetX(),
|
||||
GetPos().GetY(),
|
||||
//10,
|
||||
bullet->GetGunMeta()->bullet_rad(),
|
||||
(bullet->GetPos().GetX(),
|
||||
bullet->GetPos().GetZ(),
|
||||
10,
|
||||
//bullet->GetGunMeta()->bullet_rad(),
|
||||
shield_pos.x,
|
||||
shield_pos.y,
|
||||
shield_pos.z,
|
||||
hold_shield_buff->meta->_buff_param4,
|
||||
mt::Param::s().bullet_planck_step_length,
|
||||
GetAttackDirRotate() * 180.0f
|
||||
@ -2930,6 +2930,9 @@ void Creature::ShortFindPath()
|
||||
}
|
||||
};
|
||||
|
||||
glm::vec3 last_pos = glm::vec3(0.0f, 0.0f, 0.0f);
|
||||
int count = 0;
|
||||
|
||||
glm::vec3 start_pos = GetPos().ToGlmVec3() + GetMoveDir() * -1.0f * 2.0f;
|
||||
for (float angle = 30.0f; angle < 90.0f; angle += 30.0f) {
|
||||
glm::vec3 move_dir = GetMoveDir();
|
||||
@ -2938,6 +2941,9 @@ void Creature::ShortFindPath()
|
||||
|
||||
glm::vec3 new_point = glm::vec3(0.0f, 0.0f, 0.0f);
|
||||
bool ret = try_move(start_pos, end_pos, new_point);
|
||||
if (ret) {
|
||||
++count;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -619,12 +619,12 @@ void Player::ProcInteraction()
|
||||
cs::SMGetItemNotify notify_msg;
|
||||
for (auto obj_id : interaction_objids) {
|
||||
Entity* entity = room->GetEntityByUniId(obj_id);
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG1
|
||||
a8::XPrintf("LootInteraction %d\n", {obj_id});
|
||||
#endif
|
||||
if (entity) {
|
||||
if (entity->GetPos().Distance2D2(GetPos()) > 600) {
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG1
|
||||
a8::XPrintf("LootInteraction error3 %d\n", {entity->GetUniId()});
|
||||
#endif
|
||||
continue;
|
||||
|
@ -1219,6 +1219,18 @@ void Room::UpdateGasInactivePvp()
|
||||
ShuaPlane();
|
||||
InitAndroidAI();
|
||||
RoomMgr::Instance()->ActiveRoom(GetRoomUuid());
|
||||
#if 1
|
||||
int auto_jump_interval = mt::Param::GetIntParam("auto_jump_interval");
|
||||
auto_jump_timer_ = xtimer.SetIntervalWpEx
|
||||
(SERVER_FRAME_RATE * auto_jump_interval + SERVER_FRAME_RATE * 3,
|
||||
[this] (int event, const a8::Args* args)
|
||||
{
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
AutoJump();
|
||||
}
|
||||
},
|
||||
&xtimer_attacher_);
|
||||
#else
|
||||
int auto_jump_interval_delay = mt::Param::GetIntParam("auto_jump_interval_delay");
|
||||
xtimer.SetTimeoutEx
|
||||
(
|
||||
@ -1237,6 +1249,7 @@ void Room::UpdateGasInactivePvp()
|
||||
&xtimer_attacher_);
|
||||
},
|
||||
&xtimer_attacher_);
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("max_run_delay:%d %d\n", {PerfMonitor::Instance()->max_run_delay_time,
|
||||
a8::XGetTickCount() - begin_tick});
|
||||
@ -3205,7 +3218,7 @@ int Room::GetOnlinePlayerNum()
|
||||
size_t Room::GetRoomMaxPlayerNum()
|
||||
{
|
||||
#ifdef MAP3D
|
||||
return 10;
|
||||
return 40;
|
||||
//return map_meta_->player();
|
||||
#else
|
||||
if (pve_instance) {
|
||||
|
@ -216,7 +216,7 @@ static void InternalCreateBullet(BulletInfo& bullet_info)
|
||||
#endif
|
||||
}
|
||||
bullet_uniid = bullet_uniid ? bullet_uniid : c->room->AllocUniid();
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG1
|
||||
a8::XPrintf("CreateBullet uniid:%d frameno:%d\n", {bullet_uniid, c->room->GetFrameNo()});
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
@ -508,7 +508,7 @@ void InternalShot(Creature* c,
|
||||
bulletIdx > (int)(bulletNum / 2)) {
|
||||
bullet_info.hand = 1;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG1
|
||||
if (bullet_info.trace_target_uniid) {
|
||||
a8::XPrintf("bullet trace_target_uniid:%d\n", {bullet_info.trace_target_uniid});
|
||||
}
|
||||
|
@ -243,10 +243,10 @@ void VirtualBullet::GetHitThings(BulletCheckResult& result)
|
||||
sender.Get()->team_id == obstacle->GetTeamId(room)) {
|
||||
bool ret = Check2dRotationRectangle
|
||||
(GetPos().x,
|
||||
GetPos().y,
|
||||
GetPos().z,
|
||||
gun_meta->bullet_rad(),
|
||||
obstacle->GetPos().x,
|
||||
obstacle->GetPos().y,
|
||||
obstacle->GetPos().z,
|
||||
obstacle->meta->width(),
|
||||
obstacle->meta->height(),
|
||||
obstacle->GetRotate() * 180.0f
|
||||
|
Loading…
x
Reference in New Issue
Block a user