1
This commit is contained in:
parent
c8618d3dea
commit
9153944fd2
@ -3759,6 +3759,8 @@ void Human::OnMetaChange()
|
||||
curr_weapon = &weapons[0];
|
||||
}
|
||||
}
|
||||
ability.hp = meta->i->health() + (spec_weapon.meta ? spec_weapon.GetAttrValue(kHAT_MaxHp) : 0);
|
||||
RecalcBaseAttr();
|
||||
skill_meta_ = MetaMgr::Instance()->GetSkill(meta->i->active_skill());
|
||||
ResetSkill();
|
||||
MetaData::Skill* passive_skill_meta = MetaMgr::Instance()->GetSkill(meta->i->passive_skill());
|
||||
|
@ -1988,7 +1988,7 @@ long long Room::GetGasInactiveTime()
|
||||
if (f8::IsTestEnv()) {
|
||||
return MetaMgr::Instance()->zbmode_gas_inactive_time + 10000;
|
||||
} else {
|
||||
return 5 + 100;
|
||||
return 5;
|
||||
}
|
||||
#else
|
||||
return MetaMgr::Instance()->zbmode_gas_inactive_time;
|
||||
@ -2661,7 +2661,7 @@ void Room::AddPlayerPostProc(Player* hum)
|
||||
RandRemoveAndroid();
|
||||
}
|
||||
if (GetRoomMode() == kZombieMode) {
|
||||
#if 1
|
||||
#if 0
|
||||
hum->ChangeToRace(kZombieRace, 3);
|
||||
#else
|
||||
hum->ChangeToRace(kHumanRace, 1);
|
||||
|
@ -210,6 +210,11 @@ void ZombieModeAI::UpdateAttack()
|
||||
}
|
||||
return;
|
||||
}
|
||||
#if 0
|
||||
if (myself->GetRace() == kHumanRace) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
//攻击逻辑
|
||||
switch (node_->ai_meta->i->attack_type()) {
|
||||
case kShotClick:
|
||||
@ -257,7 +262,7 @@ void ZombieModeAI::UpdatePursuit()
|
||||
if (distance < GetAttackRange()) {
|
||||
ChangeToState(ZSE_Attack);
|
||||
} else {
|
||||
if (node_->exec_frame_num > 100 * 2) {
|
||||
if (node_->exec_frame_num > SERVER_FRAME_RATE * 3) {
|
||||
ChangeToState(ZSE_RandomWalk);
|
||||
}
|
||||
}
|
||||
@ -474,9 +479,15 @@ void ZombieModeAI::DoSkill()
|
||||
int ZombieModeAI::GetAttackTimes()
|
||||
{
|
||||
Human* myself = (Human*)owner;
|
||||
int attack_times = 0;
|
||||
if (myself->curr_weapon) {
|
||||
return std::min(node_->ai_meta->i->attack_times(), myself->curr_weapon->GetClipVolume());
|
||||
attack_times = std::min(node_->ai_meta->i->attack_times(), myself->curr_weapon->GetClipVolume());
|
||||
} else {
|
||||
return node_->ai_meta->i->attack_times();
|
||||
attack_times = node_->ai_meta->i->attack_times();
|
||||
}
|
||||
if (attack_times <= 0) {
|
||||
return 9999;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user