1
This commit is contained in:
parent
6ad8f90fe4
commit
78632b10c9
@ -48,6 +48,9 @@ Bullet::~Bullet()
|
|||||||
|
|
||||||
void Bullet::Initialize()
|
void Bullet::Initialize()
|
||||||
{
|
{
|
||||||
|
if (sender.Get() && sender.Get()->IsPlayer()) {
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
MoveableEntity::Initialize();
|
MoveableEntity::Initialize();
|
||||||
ability_ = sender.Get()->GetAbility();
|
ability_ = sender.Get()->GetAbility();
|
||||||
is_curr_weapon = sender.Get()->GetCurrWeapon()->meta == gun_meta;
|
is_curr_weapon = sender.Get()->GetCurrWeapon()->meta == gun_meta;
|
||||||
@ -401,7 +404,7 @@ void Bullet::MapServiceUpdate()
|
|||||||
float distance = GetPos().DistanceGlmVec3(born_pos.ToGlmVec3());
|
float distance = GetPos().DistanceGlmVec3(born_pos.ToGlmVec3());
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (IsFlyHook()) {
|
if (IsFlyHook()) {
|
||||||
a8::XPrintf("step_len:%f born_pos:%f,%f,%f curr_pos:%f,%f,%f old_pos:%f,%f,%f distance:%f\n",
|
a8::XPrintf("step_len:%f born_pos:%f,%f,%f curr_pos:%f,%f,%f old_pos:%f,%f,%f distance:%f %f\n",
|
||||||
{
|
{
|
||||||
step_len,
|
step_len,
|
||||||
born_pos.GetX(),
|
born_pos.GetX(),
|
||||||
@ -416,7 +419,8 @@ void Bullet::MapServiceUpdate()
|
|||||||
GetPos().GetY(),
|
GetPos().GetY(),
|
||||||
GetPos().GetZ(),
|
GetPos().GetZ(),
|
||||||
|
|
||||||
distance
|
distance,
|
||||||
|
raycast_len_
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1680,6 +1680,9 @@ void Room::FillTeam()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (auto& pair : team_hash_) {
|
||||||
|
pair.second->GenBattleUuid();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Room::InitAirDrop()
|
void Room::InitAirDrop()
|
||||||
|
@ -427,3 +427,22 @@ void Team::GenBattleReportData(Human* player, a8::MutableXObject* params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Team::GenBattleUuid()
|
||||||
|
{
|
||||||
|
long long battle_uuid = 0;
|
||||||
|
for (Human* hum : members_) {
|
||||||
|
if (hum->battle_uuid) {
|
||||||
|
battle_uuid = hum->battle_uuid;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!battle_uuid) {
|
||||||
|
battle_uuid = App::Instance()->NewUuid();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Human* hum : members_) {
|
||||||
|
hum->battle_uuid = battle_uuid;
|
||||||
|
hum->GetBattleContext()->battle_uuid = battle_uuid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -47,6 +47,7 @@ class Team
|
|||||||
void FillSMGameOver(cs::SMGameOver& msg);
|
void FillSMGameOver(cs::SMGameOver& msg);
|
||||||
void SendTeamBattleReport(Human* sender);
|
void SendTeamBattleReport(Human* sender);
|
||||||
void GenBattleReportData(Human* player, a8::MutableXObject* params);
|
void GenBattleReportData(Human* player, a8::MutableXObject* params);
|
||||||
|
void GenBattleUuid();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int team_id_ = 0;
|
int team_id_ = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user