1
This commit is contained in:
parent
8b8e735a88
commit
2bd04c0374
@ -884,7 +884,7 @@ bool Creature::InternalCanUseSkill(Skill* skill)
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
if (skill->GetCurrTimes() <= 0) {
|
||||
if (!(skill->GetCurrTimes() > 0 || skill->GetMinorType() != SMT_NONE)) {
|
||||
return false;
|
||||
}
|
||||
if (room->GetGasData().GetGasMode() == GasInactive) {
|
||||
@ -928,13 +928,20 @@ void Creature::DoSkill(int skill_id,
|
||||
float skill_distance
|
||||
)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (IsPlayer()) {
|
||||
a8::XPrintf("DoSkill skill_id:%d\n", {skill_id});
|
||||
}
|
||||
#endif
|
||||
if (room->HasRoomSwitch(kRoomSwitchDisableUseSkill)) {
|
||||
return;
|
||||
}
|
||||
Skill* skill = GetSkill(skill_id);
|
||||
if (skill && CanUseSkill(skill_id)) {
|
||||
#ifdef DEBUG1
|
||||
#ifdef DEBUG
|
||||
if (IsPlayer()) {
|
||||
a8::XPrintf("DoSkill minor_type:%d\n", {skill->GetMinorType()});
|
||||
}
|
||||
#endif
|
||||
RemoveBuffByEffectId(kBET_Hide);
|
||||
if (!nature_recover_hp_idle_timer.expired()) {
|
||||
|
@ -505,7 +505,7 @@ void InternalShot(Creature* c,
|
||||
bullet_born_offset = glm::vec3(v.z *10*1, v.y, v.x*10*-1);
|
||||
bullet_born_pos = c->GetPos().ToGlmVec3() + bullet_born_offset;
|
||||
if (c->IsPlayer() || c->IsCar()) {
|
||||
#ifdef DEBUG1
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("idx:%d offset:%f,%f,%f angle:%f old_angle:%f angle_xyz:%f,%f,%f %f %f gun_muzzle_position:%f,%f,%f pos:%f,%f,%f gun_id:%d t:%d\n",
|
||||
{
|
||||
bulletIdx,
|
||||
|
Loading…
x
Reference in New Issue
Block a user