mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-22 11:31:11 +00:00
- BlockInfo
This commit is contained in:
parent
3a5ea07951
commit
4197a7ed84
3 changed files with 8 additions and 8 deletions
|
@ -201,10 +201,10 @@ void FuncLion(int, int, int, int);
|
||||||
// 16 bytes
|
// 16 bytes
|
||||||
struct BlockInfo
|
struct BlockInfo
|
||||||
{
|
{
|
||||||
|
DExhumedActor* pActor;
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
int field_8;
|
int field_8;
|
||||||
short nSprite;
|
|
||||||
};
|
};
|
||||||
extern BlockInfo sBlockInfo[];
|
extern BlockInfo sBlockInfo[];
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, BlockInfo& w, Bloc
|
||||||
if (arc.BeginObject(keyname))
|
if (arc.BeginObject(keyname))
|
||||||
{
|
{
|
||||||
arc("at8", w.field_8)
|
arc("at8", w.field_8)
|
||||||
("sprite", w.nSprite)
|
("sprite", w.pActor)
|
||||||
("x", w.x)
|
("x", w.x)
|
||||||
("y", w.y)
|
("y", w.y)
|
||||||
.EndObject();
|
.EndObject();
|
||||||
|
@ -870,10 +870,10 @@ void CreatePushBlock(int nSector)
|
||||||
sBlockInfo[nBlock].x = xAvg;
|
sBlockInfo[nBlock].x = xAvg;
|
||||||
sBlockInfo[nBlock].y = yAvg;
|
sBlockInfo[nBlock].y = yAvg;
|
||||||
|
|
||||||
int nSprite = insertsprite(nSector, 0);
|
auto pActor = insertActor(nSector, 0);
|
||||||
auto pSprite = &sprite[nSprite];
|
auto pSprite = &pActor->s();
|
||||||
|
|
||||||
sBlockInfo[nBlock].nSprite = nSprite;
|
sBlockInfo[nBlock].pActor = pActor;
|
||||||
|
|
||||||
pSprite->x = xAvg;
|
pSprite->x = xAvg;
|
||||||
pSprite->y = yAvg;
|
pSprite->y = yAvg;
|
||||||
|
|
|
@ -1059,9 +1059,9 @@ void AIPlayer::Tick(RunListEvent* ev)
|
||||||
{
|
{
|
||||||
PlayerList[nPlayer].nPlayerPushSound = 1;
|
PlayerList[nPlayer].nPlayerPushSound = 1;
|
||||||
short nBlock = sector[PlayerList[nPlayer].nPlayerPushSect].extra;
|
short nBlock = sector[PlayerList[nPlayer].nPlayerPushSect].extra;
|
||||||
int nBlockSprite = sBlockInfo[nBlock].nSprite;
|
auto pBlockActor = sBlockInfo[nBlock].pActor;
|
||||||
|
|
||||||
D3PlayFX(StaticSound[kSound23], nBlockSprite, 0x4000);
|
D3PlayFX(StaticSound[kSound23], pBlockActor, 0x4000);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1085,7 +1085,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
||||||
{
|
{
|
||||||
if (PlayerList[nPlayer].nPlayerPushSect > -1)
|
if (PlayerList[nPlayer].nPlayerPushSect > -1)
|
||||||
{
|
{
|
||||||
StopActorSound(&exhumedActors[sBlockInfo[sector[PlayerList[nPlayer].nPlayerPushSect].extra].nSprite]);
|
StopActorSound(sBlockInfo[sector[PlayerList[nPlayer].nPlayerPushSect].extra].pActor);
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerList[nPlayer].nPlayerPushSound = -1;
|
PlayerList[nPlayer].nPlayerPushSound = -1;
|
||||||
|
|
Loading…
Reference in a new issue