1
This commit is contained in:
parent
b89eeb0f85
commit
c6aa137a5a
@ -3390,14 +3390,18 @@ void Human::ProcSkillPhase(MetaData::SkillPhase* phase)
|
||||
break;
|
||||
case kSkill_Shot:
|
||||
{
|
||||
Entity* entity = room->GetEntityByUniId(skill_target_id);
|
||||
MetaData::Equip* weapon_meta = MetaMgr::Instance()->GetEquip(phase->param1.GetInt());
|
||||
if (weapon_meta) {
|
||||
if (weapon_meta && entity) {
|
||||
float target_distance = entity->GetPos().Distance(GetPos());
|
||||
MetaData::EquipUpgrade* weapon_upgrade_meta =
|
||||
MetaMgr::Instance()->GetEquipUpgrade(weapon_meta->i->id());
|
||||
MetaData::Equip* bullet_meta =
|
||||
MetaMgr::Instance()->GetEquip(weapon_meta->i->use_bullet());
|
||||
if (weapon_upgrade_meta && bullet_meta) {
|
||||
if (bullet_meta) {
|
||||
a8::Vec2 old_attack_dir = attack_dir;
|
||||
attack_dir = entity->GetPos() - GetPos();
|
||||
attack_dir.Normalize();
|
||||
InternalShot
|
||||
(
|
||||
this,
|
||||
@ -3406,7 +3410,7 @@ void Human::ProcSkillPhase(MetaData::SkillPhase* phase)
|
||||
bullet_meta,
|
||||
1,
|
||||
skill_meta_->i->skill_id(),
|
||||
5,
|
||||
target_distance,
|
||||
false);
|
||||
attack_dir = old_attack_dir;
|
||||
}
|
||||
|
@ -2604,7 +2604,7 @@ void Room::AddPlayerPostProc(Player* hum)
|
||||
}
|
||||
if (GetRoomMode() == kZombieMode) {
|
||||
#if 1
|
||||
hum->ChangeToRace(kZombieRace, 2);
|
||||
hum->ChangeToRace(kZombieRace, 1);
|
||||
#else
|
||||
hum->ChangeToRace(kHumanRace, 1);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user