mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-27 10:40:52 +00:00
35 lines
735 B
C
35 lines
735 B
C
#pragma once
|
|
#include "dobject.h"
|
|
#include "build.h"
|
|
|
|
BEGIN_DUKE_NS
|
|
|
|
|
|
using DukeStatIterator = TStatIterator<DDukeActor>;
|
|
using DukeSectIterator = TSectIterator<DDukeActor>;
|
|
using DukeSpriteIterator = TSpriteIterator<DDukeActor>;
|
|
|
|
inline DDukeActor* player_struct::GetActor()
|
|
{
|
|
return actor;
|
|
}
|
|
|
|
inline int player_struct::GetPlayerNum()
|
|
{
|
|
return actor->PlayerIndex();
|
|
}
|
|
|
|
DDukeActor* spawn(DDukeActor* spawner, PClassActor* pname);
|
|
|
|
// return type is int for scripting - the value must still be true or false!
|
|
inline int badguy(const DDukeActor* pSprite)
|
|
{
|
|
return !!(pSprite->flags1 & (SFLAG_BADGUY | SFLAG_INTERNAL_BADGUY));
|
|
}
|
|
|
|
inline int bossguy(const DDukeActor* pSprite)
|
|
{
|
|
return !!(pSprite->flags1 & SFLAG_BOSS);
|
|
}
|
|
|
|
END_DUKE_NS
|