Skip to content

Conversation

@SmileyAG
Copy link
Contributor

@SmileyAG SmileyAG commented Jan 2, 2024

  • Inherit msurface_t for a new struct in both ways (depends if the file is C or C++)
  • Find engine build number from sv_version cvar that is declared in engine-side (that code is taken from BugfixedHL-Rebased)
  • To the message above, sv_version outputs information like this: sv_version "1.1.2.2/Stdio,48,9920"
  • Replace cuboid with polygons drawing for triggers on hardware engine if the model data available, otherwise continue to draw as cuboid

Yes, it turns out there are enough real examples when triggers may not be a cuboid, so drawing with polygons is seem always a matter of time
But as we already know, in map compilers that are not from Valve, as an optimization it's cut off all of that data for unused brush models and therefore that data is not available

Of course that some tools like bspguy can restore that information from a .bsp file, but I don’t I think that we want now to make a large complex work for such minor task

This code is not completely final, because I’m still thinking about what exactly speed / offset I want to use for change the alpha in these polygons, after this it most likely will be ready for merge, so for now I just made a pull request for a review but not as a merge

#ifndef SOFTWARE_BUILD
if (IEngineStudio.IsHardware() && model && model->nummodelsurfaces)
{
#define DrawPolygons(surfs) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's cursed. Put it in a lambda with auto parameter (C++14, which OpenAG builds with) or a template function

@YaLTeR
Copy link
Owner

YaLTeR commented Jan 5, 2024

For some reason from my BXT trigger drawing experiments I remember that the compilers strip out the model data completely, leaving just the collision. Is that not the case?

@SmileyAG SmileyAG marked this pull request as draft June 6, 2024 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants