添加调试信息
This commit is contained in:
parent
f1d9fd66f9
commit
631ddfefc8
@ -195,6 +195,28 @@ void Room::AddPlayer(Player* hum)
|
||||
RandRemoveAndroid();
|
||||
}
|
||||
NotifyUiUpdate();
|
||||
#ifdef DEBUG
|
||||
xtimer.AddRepeatTimerAndAttach
|
||||
(SERVER_FRAME_RATE * 5,
|
||||
a8::XParams()
|
||||
.SetSender(hum),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
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",
|
||||
{
|
||||
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->SendDebugMsg(debugmsg);
|
||||
},
|
||||
&hum->xtimer_attacher.timer_list_);
|
||||
#endif
|
||||
}
|
||||
|
||||
int Room::AllocUniid()
|
||||
|
Loading…
x
Reference in New Issue
Block a user