This commit is contained in:
aozhiwei 2020-05-27 16:11:01 +08:00
parent 631ddfefc8
commit 1df47dda6e
2 changed files with 9 additions and 2 deletions

View File

@ -84,6 +84,9 @@ void Bullet::OnHit(std::set<Entity*>& objects)
}
}
#endif
#ifdef DEBUG
player->SendDebugMsg(a8::Format("bullet atk:%f", {GetAtk()}));
#endif
}
}
break;
@ -114,6 +117,9 @@ void Bullet::OnHit(std::set<Entity*>& objects)
room->ScatterDrop(obstacle->GetPos(), obstacle->meta->i->drop());
}
obstacle->BroadcastFullState();
#ifdef DEBUG
player->SendDebugMsg(a8::Format("bullet atk:%f", {GetAtk()}));
#endif
}
}
break;

View File

@ -204,14 +204,15 @@ void Room::AddPlayer(Player* hum)
{
Human* hum = (Human*)param.sender.GetUserData();
std::string debugmsg = a8::Format("weapon_id:%d weapon_lv:%d atk:%f fire_rate:%f "
"volume:%d maxhp:%f",
"volume:%d maxhp:%f curr_hp:%f",
{
hum->curr_weapon->weapon_id,
hum->curr_weapon->weapon_lv,
hum->curr_weapon->GetAttrValue(kHAT_Atk),
hum->curr_weapon->GetAttrValue(kHAT_FireRate),
hum->curr_weapon->GetAttrValue(kHAT_Volume),
hum->curr_weapon->GetAttrValue(kHAT_MaxHp)
hum->curr_weapon->GetAttrValue(kHAT_MaxHp),
hum->GetHP()
});
hum->SendDebugMsg(debugmsg);
},