- added a few 'const'.

This commit is contained in:
Christoph Oelckers 2023-04-16 10:41:38 +02:00
parent 77d14ec721
commit 71a005fda6
2 changed files with 3 additions and 3 deletions

View file

@ -23,12 +23,12 @@ DDukeActor* spawn(DDukeActor* spawner, int type);
DDukeActor* spawn(DDukeActor* actj, PClassActor* pname);
// return type is int for scripting - the value must still be true or false!
inline int badguy(DDukeActor* pSprite)
inline int badguy(const DDukeActor* pSprite)
{
return !!(pSprite->flags1 & (SFLAG_BADGUY | SFLAG_INTERNAL_BADGUY));
}
inline int bossguy(DDukeActor* pSprite)
inline int bossguy(const DDukeActor* pSprite)
{
return !!(pSprite->flags1 & SFLAG_BOSS);
}

View file

@ -587,7 +587,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, badguy, badguy)
ACTION_RETURN_INT(badguy(self));
}
int duke_scripted(DDukeActor* act)
int duke_scripted(const DDukeActor* act)
{
return act->conInfo() != nullptr;
}