mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- floatified position in BuildEnergyBlock
This commit is contained in:
parent
0fcbe57111
commit
7ddfd944e6
1 changed files with 4 additions and 9 deletions
|
@ -1554,25 +1554,20 @@ void DoFinale()
|
|||
|
||||
DExhumedActor* BuildEnergyBlock(sectortype* pSector)
|
||||
{
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
DVector2 apos(0, 0);
|
||||
|
||||
for(auto& wal : wallsofsector(pSector))
|
||||
{
|
||||
x += wal.wall_int_pos().X;
|
||||
y += wal.wall_int_pos().Y;
|
||||
|
||||
apos += wal.pos;
|
||||
|
||||
wal.picnum = kClockSymbol16;
|
||||
wal.pal = 0;
|
||||
wal.shade = 50;
|
||||
}
|
||||
|
||||
int xAvg = x / pSector->wallnum;
|
||||
int yAvg = y / pSector->wallnum;
|
||||
|
||||
auto pActor = insertActor(pSector, 406);
|
||||
|
||||
pActor->set_int_xy(xAvg, yAvg);
|
||||
pActor->spr.pos.XY() = apos / pSector->wallnum;
|
||||
|
||||
pSector->extra = (int16_t)EnergyBlocks.Push(pActor);
|
||||
|
||||
|
|
Loading…
Reference in a new issue