- added a sector() method to spritetype.

For making game code working with sectors a bit easier to read.
This commit is contained in:
Christoph Oelckers 2021-11-06 13:26:46 +01:00
parent 9e4afd543c
commit ba2d4acc18
2 changed files with 8 additions and 0 deletions

View file

@ -153,6 +153,12 @@ extern walltype wall[MAXWALLS];
extern spritetype sprite[MAXSPRITES];
EXTERN int leveltimer;
inline sectortype* spritetype::sector() const
{
return &::sector[sectnum];
}
extern sectortype sectorbackup[MAXSECTORS];
extern walltype wallbackup[MAXWALLS];

View file

@ -362,6 +362,8 @@ struct spritetype
{
return interpolatedangle(oang, ang, smoothratio, 16);
}
sectortype* sector() const;
};
using tspritetype = spritetype;