bspfile: get rid of default implementations of contents_are_empty/solid/sky
This commit is contained in:
parent
38e27a38ec
commit
02d3284045
|
|
@ -169,6 +169,21 @@ struct gamedef_q1_like_t : public gamedef_t
|
|||
return {liquid_type, cflags};
|
||||
}
|
||||
|
||||
bool contents_are_empty(const contentflags_t &contents) const
|
||||
{
|
||||
return contents.native == CONTENTS_EMPTY;
|
||||
}
|
||||
|
||||
bool contents_are_solid(const contentflags_t& contents) const
|
||||
{
|
||||
return contents.native == CONTENTS_SOLID;
|
||||
}
|
||||
|
||||
bool contents_are_sky(const contentflags_t& contents) const
|
||||
{
|
||||
return contents.native == CONTENTS_SKY;
|
||||
}
|
||||
|
||||
bool contents_are_liquid(const contentflags_t &contents) const
|
||||
{
|
||||
return contents.native <= CONTENTS_WATER && contents.native >= CONTENTS_LAVA;
|
||||
|
|
|
|||
|
|
@ -1743,18 +1743,9 @@ struct gamedef_t
|
|||
virtual contentflags_t create_solid_contents(const int32_t &cflags = 0) const = 0;
|
||||
virtual contentflags_t create_sky_contents(const int32_t &cflags = 0) const = 0;
|
||||
virtual contentflags_t create_liquid_contents(const int32_t &liquid_type, const int32_t &cflags = 0) const = 0;
|
||||
virtual bool contents_are_empty(const contentflags_t &contents) const
|
||||
{
|
||||
return contents.native == create_empty_contents().native;
|
||||
}
|
||||
virtual bool contents_are_solid(const contentflags_t &contents) const
|
||||
{
|
||||
return contents.native == create_solid_contents().native;
|
||||
}
|
||||
virtual bool contents_are_sky(const contentflags_t &contents) const
|
||||
{
|
||||
return contents.native == create_sky_contents().native;
|
||||
}
|
||||
virtual bool contents_are_empty(const contentflags_t &contents) const = 0;
|
||||
virtual bool contents_are_solid(const contentflags_t &contents) const = 0;
|
||||
virtual bool contents_are_sky(const contentflags_t &contents) const = 0;
|
||||
virtual bool contents_are_liquid(const contentflags_t &contents) const = 0;
|
||||
virtual bool contents_are_valid(const contentflags_t &contents, bool strict = true) const = 0;
|
||||
virtual bool portal_can_see_through(const contentflags_t &contents0, const contentflags_t &contents1) const = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue