mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Misc: (try) Make Clang 10 happy
This commit is contained in:
@@ -234,7 +234,7 @@ public:
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
|
||||
for (ObjectGuid const spawnerGuid : _spawners)
|
||||
for (ObjectGuid spawnerGuid : _spawners)
|
||||
if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid))
|
||||
spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS);
|
||||
|
||||
|
||||
@@ -151,11 +151,11 @@ public:
|
||||
} else ArcingSmash_Timer -= diff;
|
||||
|
||||
//Whirlwind_Timer
|
||||
if (Whirlwind_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_WHIRLWIND);
|
||||
Whirlwind_Timer = 55000;
|
||||
} else Whirlwind_Timer -= diff;
|
||||
if (Whirlwind_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_WHIRLWIND);
|
||||
Whirlwind_Timer = 55000;
|
||||
} else Whirlwind_Timer -= diff;
|
||||
|
||||
//MightyBlow_Timer
|
||||
if (MightyBlow_Timer <= diff)
|
||||
|
||||
@@ -736,46 +736,52 @@ namespace MMAP
|
||||
|
||||
G3D::Vector3 vert;
|
||||
for (uint32 x = 0; x < vertsX; ++x)
|
||||
{
|
||||
for (uint32 y = 0; y < vertsY; ++y)
|
||||
{
|
||||
vert = G3D::Vector3(corner.x + x * GRID_PART_SIZE, corner.y + y * GRID_PART_SIZE, data[y*vertsX + x]);
|
||||
vert = vert * rotation * scale + position;
|
||||
vert.x *= -1.f;
|
||||
vert.y *= -1.f;
|
||||
liqVerts.push_back(vert);
|
||||
{
|
||||
vert = G3D::Vector3(corner.x + x * GRID_PART_SIZE, corner.y + y * GRID_PART_SIZE, data[y * vertsX + x]);
|
||||
vert = vert * rotation * scale + position;
|
||||
vert.x *= -1.f;
|
||||
vert.y *= -1.f;
|
||||
liqVerts.push_back(vert);
|
||||
}
|
||||
|
||||
int idx1, idx2, idx3, idx4;
|
||||
uint32 square;
|
||||
for (uint32 x = 0; x < tilesX; ++x)
|
||||
{
|
||||
for (uint32 y = 0; y < tilesY; ++y)
|
||||
if ((flags[x + y * tilesX] & 0x0f) != 0x0f)
|
||||
{
|
||||
square = x * tilesY + y;
|
||||
idx1 = square + x;
|
||||
idx2 = square + 1 + x;
|
||||
idx3 = square + tilesY + 1 + 1 + x;
|
||||
idx4 = square + tilesY + 1 + x;
|
||||
|
||||
// top triangle
|
||||
liqTris.push_back(idx3);
|
||||
liqTris.push_back(idx2);
|
||||
liqTris.push_back(idx1);
|
||||
// bottom triangle
|
||||
liqTris.push_back(idx4);
|
||||
liqTris.push_back(idx3);
|
||||
liqTris.push_back(idx1);
|
||||
}
|
||||
}
|
||||
|
||||
uint32 liqOffset = meshData.liquidVerts.size() / 3;
|
||||
for (uint32 j = 0; j < liqVerts.size(); ++j)
|
||||
meshData.liquidVerts.append(liqVerts[j].y, liqVerts[j].z, liqVerts[j].x);
|
||||
|
||||
for (uint32 j = 0; j < liqTris.size() / 3; ++j)
|
||||
{
|
||||
meshData.liquidTris.append(liqTris[j * 3 + 1] + liqOffset, liqTris[j * 3 + 2] + liqOffset, liqTris[j * 3] + liqOffset);
|
||||
meshData.liquidType.append(type);
|
||||
}
|
||||
}
|
||||
|
||||
int idx1, idx2, idx3, idx4;
|
||||
uint32 square;
|
||||
for (uint32 x = 0; x < tilesX; ++x)
|
||||
for (uint32 y = 0; y < tilesY; ++y)
|
||||
if ((flags[x+y*tilesX] & 0x0f) != 0x0f)
|
||||
{
|
||||
square = x * tilesY + y;
|
||||
idx1 = square+x;
|
||||
idx2 = square+1+x;
|
||||
idx3 = square+tilesY+1+1+x;
|
||||
idx4 = square+tilesY+1+x;
|
||||
|
||||
// top triangle
|
||||
liqTris.push_back(idx3);
|
||||
liqTris.push_back(idx2);
|
||||
liqTris.push_back(idx1);
|
||||
// bottom triangle
|
||||
liqTris.push_back(idx4);
|
||||
liqTris.push_back(idx3);
|
||||
liqTris.push_back(idx1);
|
||||
}
|
||||
|
||||
uint32 liqOffset = meshData.liquidVerts.size() / 3;
|
||||
for (uint32 j = 0; j < liqVerts.size(); ++j)
|
||||
meshData.liquidVerts.append(liqVerts[j].y, liqVerts[j].z, liqVerts[j].x);
|
||||
|
||||
for (uint32 j = 0; j < liqTris.size() / 3; ++j)
|
||||
{
|
||||
meshData.liquidTris.append(liqTris[j*3+1] + liqOffset, liqTris[j*3+2] + liqOffset, liqTris[j*3] + liqOffset);
|
||||
meshData.liquidType.append(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user