移除代码里的warning
This commit is contained in:
parent
e71d2a4f47
commit
c88e463f97
@ -691,7 +691,7 @@ void Human::SyncAroundPlayers(const char* file, int line, const char* func)
|
||||
a8::UdpLog::Instance()->Debug("hum2 %d %s", {(long long)this, objs_str});
|
||||
}
|
||||
room->CheckPartObjects(hum, this);
|
||||
bool ok = hum->InPartObjects(this);
|
||||
hum->InPartObjects(this);
|
||||
#endif
|
||||
assert(hum->part_objects.find(this) != hum->part_objects.end());
|
||||
if (hum->part_objects.find(this) == hum->part_objects.end()) {
|
||||
@ -1816,11 +1816,11 @@ void Human::ClearFrameData()
|
||||
if (!a8::HasBitFlag(status, HS_Disable)) {
|
||||
for (auto& itr : out_objects) {
|
||||
Entity* entity = room->GetEntityByUniId(itr);
|
||||
Human* hum = (Human*)entity;
|
||||
if (entity) {
|
||||
RemovePartObjects(entity);
|
||||
if (entity->IsEntityType(ET_Player)) {
|
||||
((Human*)entity)->RemovePartObjects(this);
|
||||
Human* hum = (Human*)entity;
|
||||
hum->RemovePartObjects(this);
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
|
@ -138,12 +138,12 @@ void Player::UpdateMove()
|
||||
if (tank_weapon.meta && tank_oil_value < 0.00001f) {
|
||||
return;
|
||||
}
|
||||
a8::Vec2 old_pos = GetPos();
|
||||
_UpdateMove(std::max(1, (int)GetSpeed()));
|
||||
if (GetLastCollisionDoor() && !TestCollision(room, GetLastCollisionDoor())) {
|
||||
SetLastCollisionDoor(nullptr);
|
||||
}
|
||||
#if 0
|
||||
a8::Vec2 old_pos = GetPos();
|
||||
if (tank_weapon.meta) {
|
||||
CheckSkinTank();
|
||||
tank_oil_value -= old_pos.Distance(GetPos()) * (MetaMgr::Instance()->average_oil / 100.0f);
|
||||
|
@ -984,7 +984,7 @@ void Room::CombineTeam()
|
||||
return;
|
||||
}
|
||||
|
||||
int first_team_num = 4;
|
||||
size_t first_team_num = 4;
|
||||
switch (total_count) {
|
||||
case 3:
|
||||
{
|
||||
@ -1780,7 +1780,6 @@ void Room::ShuaAndroidTimerFunc()
|
||||
&xtimer_attacher_.timer_list_,
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Room* room = (Room*)param.sender.GetUserData();
|
||||
}
|
||||
);
|
||||
if (shua_time > 0 && shua_num > 0) {
|
||||
@ -1822,7 +1821,6 @@ void Room::DieAndroidTimerFunc()
|
||||
&xtimer_attacher_.timer_list_,
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Room* room = (Room*)param.sender.GetUserData();
|
||||
}
|
||||
);
|
||||
if (die_time > 0 && die_num > 0) {
|
||||
@ -2096,7 +2094,6 @@ void Room::CheckPartObjects(Human* testa, Human* testb)
|
||||
if (testa && testb) {
|
||||
if ((a == testa && b == testb) ||
|
||||
(a == testb && b == testa)) {
|
||||
int i = 0;
|
||||
}
|
||||
}
|
||||
if (a->InPartObjects(b)) {
|
||||
@ -2116,7 +2113,6 @@ void Room::CheckPartObjects(Human* testa, Human* testb)
|
||||
if (testa && testb) {
|
||||
if ((huma == testa && humb == testb) ||
|
||||
(huma == testb && humb == testa)) {
|
||||
int i = 0;
|
||||
}
|
||||
}
|
||||
if (a8::HasBitFlag(huma->status, HS_Disable) ||
|
||||
@ -2132,7 +2128,7 @@ void Room::CheckPartObjects(Human* testa, Human* testb)
|
||||
}
|
||||
}
|
||||
|
||||
void Room::GetAliveHumans(std::vector<Human*>& alive_humans, int num, Human* exclude_hum)
|
||||
void Room::GetAliveHumans(std::vector<Human*>& alive_humans, size_t num, Human* exclude_hum)
|
||||
{
|
||||
alive_humans.reserve(num);
|
||||
{
|
||||
@ -2422,7 +2418,7 @@ Human* Room::GetOneCanEnableAndroid()
|
||||
return !humans.empty() ? humans[0] : nullptr;
|
||||
}
|
||||
|
||||
void Room::GetCanEnableAndroids(std::vector<Human*>& humans, int num)
|
||||
void Room::GetCanEnableAndroids(std::vector<Human*>& humans, size_t num)
|
||||
{
|
||||
for (auto& pair : human_hash_) {
|
||||
if (pair.second->IsAndroid() &&
|
||||
@ -2477,7 +2473,7 @@ Player* Room::GetOneAlivePlayer()
|
||||
return !humans.empty() ? humans[0] : nullptr;
|
||||
}
|
||||
|
||||
void Room::GetAlivePlayers(std::vector<Player*>& humans, int num)
|
||||
void Room::GetAlivePlayers(std::vector<Player*>& humans, size_t num)
|
||||
{
|
||||
for (auto& pair : accountid_hash_) {
|
||||
if (!pair.second->real_dead) {
|
||||
|
@ -115,10 +115,10 @@ public:
|
||||
void CheckPartObjects(Human* testa = nullptr, Human* testb = nullptr);
|
||||
bool RuningInTimer();
|
||||
Human* GetOneCanEnableAndroid();
|
||||
void GetCanEnableAndroids(std::vector<Human*>& humans, int num);
|
||||
void GetCanEnableAndroids(std::vector<Human*>& humans, size_t num);
|
||||
void InstallCheckAutoDieTimer(Human* hum);
|
||||
Player* GetOneAlivePlayer();
|
||||
void GetAlivePlayers(std::vector<Player*>& humans, int num);
|
||||
void GetAlivePlayers(std::vector<Player*>& humans, size_t num);
|
||||
int GetCanShuaNum(int shua_num);
|
||||
|
||||
private:
|
||||
@ -166,7 +166,7 @@ private:
|
||||
void ProcDisableHuman();
|
||||
void OnHumanGridChg(Human* target);
|
||||
void ShuaGridRound(Human* target);
|
||||
void GetAliveHumans(std::vector<Human*>& alive_humans, int num, Human* exclude_hum);
|
||||
void GetAliveHumans(std::vector<Human*>& alive_humans, size_t num, Human* exclude_hum);
|
||||
void CheckAliveHuman(Human* hum, std::vector<Human*>& alive_humans);
|
||||
a8::Vec2 GetDefaultBornPoint();
|
||||
|
||||
|
2
third_party/a8engine
vendored
2
third_party/a8engine
vendored
@ -1 +1 @@
|
||||
Subproject commit 8ab07d896fab50c552a60220fa2508967f76a69b
|
||||
Subproject commit d73ff7eb0c53e6d93db95b14d0fb5945fae24649
|
2
third_party/framework
vendored
2
third_party/framework
vendored
@ -1 +1 @@
|
||||
Subproject commit 15ab670d4a295138900981a1cc5c2cc48b80c2e5
|
||||
Subproject commit 6a5392433ccd85ffbfea9a904fde0f5bae22c155
|
Loading…
x
Reference in New Issue
Block a user