mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +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
|
||||
struct BlockInfo
|
||||
{
|
||||
DExhumedActor* pActor;
|
||||
int x;
|
||||
int y;
|
||||
int field_8;
|
||||
short nSprite;
|
||||
};
|
||||
extern BlockInfo sBlockInfo[];
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, BlockInfo& w, Bloc
|
|||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("at8", w.field_8)
|
||||
("sprite", w.nSprite)
|
||||
("sprite", w.pActor)
|
||||
("x", w.x)
|
||||
("y", w.y)
|
||||
.EndObject();
|
||||
|
@ -870,10 +870,10 @@ void CreatePushBlock(int nSector)
|
|||
sBlockInfo[nBlock].x = xAvg;
|
||||
sBlockInfo[nBlock].y = yAvg;
|
||||
|
||||
int nSprite = insertsprite(nSector, 0);
|
||||
auto pSprite = &sprite[nSprite];
|
||||
auto pActor = insertActor(nSector, 0);
|
||||
auto pSprite = &pActor->s();
|
||||
|
||||
sBlockInfo[nBlock].nSprite = nSprite;
|
||||
sBlockInfo[nBlock].pActor = pActor;
|
||||
|
||||
pSprite->x = xAvg;
|
||||
pSprite->y = yAvg;
|
||||
|
|
|
@ -1059,9 +1059,9 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
{
|
||||
PlayerList[nPlayer].nPlayerPushSound = 1;
|
||||
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
|
||||
{
|
||||
|
@ -1085,7 +1085,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
{
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue