This commit is contained in:
aozhiwei 2024-01-12 14:31:22 +08:00
parent cf51132072
commit c0740d18ea
2 changed files with 7 additions and 1 deletions

View File

@ -177,7 +177,7 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
(
[this, hero_id, &found] (Human* hum) -> bool
{
if (!hum->dead && hum->GetHeroMeta()->id() == hero_id) {
if (!hum->dead && hum->GetHeroMeta()->id() == hero_id && GetTeam() != hum->GetTeam()) {
hum->GetMovement()->ClearPath();
hum->GetMutablePos().FromGlmVec3(GetPos().ToGlmVec3());
room->grid_service->MoveCreature(hum);

View File

@ -433,6 +433,9 @@ namespace mt
int Param::GetCritEffect(float E)
{
float E_abs = std::fabs(E);
if (E_abs <= 0.000001f) {
return 0;
}
int effect = 0;
for (int i = 0; i < s().crit_effect_range.size(); ++i) {
if (E_abs <= s().crit_effect_range.at(i)) {
@ -446,6 +449,9 @@ namespace mt
int Param::GetBlockEffect(float E)
{
float E_abs = std::fabs(E);
if (E_abs <= 0.000001f) {
return 0;
}
int effect = 0;
for (int i = 0; i < s().block_effect_range.size(); ++i) {
if (E_abs <= s().block_effect_range.at(i)) {