bspfile: add gamedef_t::contents_seals_map()
This commit is contained in:
parent
064147b908
commit
9977c14a2f
|
|
@ -80,6 +80,8 @@ struct gamedef_generic_t : public gamedef_t
|
|||
|
||||
bool portal_can_see_through(const contentflags_t &, const contentflags_t &) const { throw std::bad_cast(); }
|
||||
|
||||
bool contents_seals_map(const contentflags_t &contents) const { throw std::bad_cast(); }
|
||||
|
||||
std::string get_contents_display(const contentflags_t &) const { throw std::bad_cast(); }
|
||||
|
||||
const std::initializer_list<aabb3d> &get_hull_sizes() const { throw std::bad_cast(); }
|
||||
|
|
@ -252,6 +254,11 @@ struct gamedef_q1_like_t : public gamedef_t
|
|||
return !(contents0.is_solid(this) || contents1.is_solid(this)) && contents0 == contents1;
|
||||
}
|
||||
|
||||
bool contents_seals_map(const contentflags_t &contents) const override
|
||||
{
|
||||
return contents_are_solid(contents) || contents_are_sky(contents);
|
||||
}
|
||||
|
||||
std::string get_contents_display(const contentflags_t &contents) const
|
||||
{
|
||||
switch (contents.native) {
|
||||
|
|
@ -587,6 +594,11 @@ struct gamedef_q2_t : public gamedef_t
|
|||
return visible_contents(c0 ^ c1);
|
||||
}
|
||||
|
||||
bool contents_seals_map(const contentflags_t& contents) const override
|
||||
{
|
||||
return contents_are_solid(contents) || contents_are_sky(contents);
|
||||
}
|
||||
|
||||
std::string get_contents_display(const contentflags_t &contents) const
|
||||
{
|
||||
constexpr const char *bitflag_names[] = {"SOLID", "WINDOW", "AUX", "LAVA", "SLIME", "WATER", "MIST", "128",
|
||||
|
|
|
|||
|
|
@ -1781,6 +1781,7 @@ struct gamedef_t
|
|||
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;
|
||||
virtual bool contents_seals_map(const contentflags_t &contents) const = 0;
|
||||
virtual std::string get_contents_display(const contentflags_t &contents) const = 0;
|
||||
virtual const std::initializer_list<aabb3d> &get_hull_sizes() const = 0;
|
||||
virtual contentflags_t face_get_contents(
|
||||
|
|
|
|||
Loading…
Reference in New Issue