1,584 Commits over 1,127 Days - 0.06cph!
Fix Surface not loading AudioMaterial properly making sounds extra wanky cause no material surfaces were defined
Add internal virtual GameResource.PostLoad( GameHost ) for GameResource in Sandbox.Engine to know what host to grab any dependency GameResource from
Defer calling GameResource.PostLoad until after all GameResource are "loaded" and can be grabbed with Resource.Get. Not really a hack and lets people do the most obvious thing
piss. fix DrawMaterialIcon -> DrawIcon
Add category count / filters to tools console widget so people can see they have errors and easily see them
https://files.facepunch.com/matt/1b2911b1/sbox_neEB3rhcQI.png
Rename "Legacy Source1 Inverted Normals" -> "Inverted Normals (-Y)"
Closes Facepunch/sbox-issues#1395
Add commands AlignObjects (Alt+T), AlignObjectsRotation (Alt+R) and AlignObjectsToWorkplane (Alt+E) to the selection tool
Add a hotkey table to the selection tool to make it more intuitive for newbies
https://files.facepunch.com/matt/1b2711b1/sbox_dqOz2azaq7.png
Hammer: Add default bind for SetOriginToPivot command ( Ctrl + D )
Hammer: Add AlignWorkplaneToObject command, default bind Alt+Q
Mark all entities that should show in Hammer with [HammerEntity], remove redundant properties and give them some categories
Give unique filenames to partial classes generated within the same file so the generator doesn't shit itself and crash
Fixes Facepunch/sbox-issues#1968
Overload Package.Equals/GetHashCode to match Package.FullIdent, resolves Hammer thinking the same local addon is individual packages.
Give content & model addon types proper package type mappings, prevent them showing in local games menu
Mark games to compile in tools mode in a more sane place in Sandbox.Tools instead of Sandbox.Engine
Recompile game addons on changes in tools mode when not actively in-game too, so you can adjust game resources / hammer entities without being in the game
List/Dictionary property editors work with IList / IDictionary (used by [Net])
I tried doing it within CanEditAttribute.CreateEditorFor, iterating over interfaces the type implements but it ended up being a huge sprawling mess.
So just did a plain and simple [CanEdit] of both List<> and IList<> on the same editor
Fix Theme.DrawFilename if there's not enough room for the directory
Dictionary<,> property editor, probably looks a bit shit but can't think of how to shag it up
https://files.facepunch.com/matt/1b2311b1/sbox_uEj3AVv3OB.png
Improve VR performance by as much as double, enabling multiview instancing by default and lots of misc changes to the VR render process:
- Fix our shaders for multiview instancing to work with the new transform system
- Hard code some dumped stencil meshes for Oculus HMDs, reduce render area from 5-14% ( SteamVR doesn't pass us these )
- Remove multi-gpu support, complicates shit and pointless for us to even attempt to maintain
- Add SCENE_RTSIZE_VRFRAMEBUFFER and make it adjust to multiview size, avoids allocating 8K render target for framebuffer fetches on VR
- Don't attempt to render viewmodel shadows in VR
- Fix asserts from C# trying to update viewmodels in VR mode (scenesystem transforms are locked here)
- Global.IsRunningInVR doesn't false report if you're running in non VR mode with SteamVR in the background
- Generally loads of dead code removal in the render pipeline
Co-Authored-By: Sam Pavlovic <sam@sampavlovic.com>
Always skip BaseViewModel.UpdateAllPostCamera when in VR, avoids a circular dependency that was consuming a chunk of frametime because scenesystem abs transforms were locked.
Ideally games shouldn't be making view models in VR either though.
Global.IsRunningInVR is only true if the game is started in VR mode, instead of if SteamVR is running
Render less on Oculus HMDs using stencil meshes to reduce frametime, for some reason they've never been exposed via OpenVR so hard code ones dumped with libovr.
* Rift CV1 renders 14.07% less area
* Rift S renders 11.26% less area
* Quest renders 5.69% less area
* Quest 2 renders 9.13% less area
Core shaders with multiview and fixed instance strides for transforms
Add instance stride to shader too for multiview instancing
Fix transform instance id in multiview cables shader
Simplify render pipeline by removing dead code for rendering world sessions to textures, we use the view system directly when rendering to texture
Strip multi-gpu support to simplify our rendering pipeline further in preparation for single-pass VR rendering
Loop cuts in the edge cut tool, pretty close to done but having a brain block so I'll come back to it
Allow [Change] to be combined with [ConVar.*] the same way as [Net], e.g:
```csharp
[ConVar.Replicated( "my_variable" ), Change]
public static float MyVariable { get; set; } = 100.0f;
public static void OnMyVariableChanged( float oldValue, float newValue ) { }
```
vsnd is a native type for ResourceTypeAttribute should fix the sound editor, this whole system is pretty messy though
Fix TypeLibrary.GetDescription( Type ) returning inherited types randomly which was causing prop_physics to become PropGib in Hammer and probably a load of other shit
Bounce particle goes on the hit pos, don't follow the ball you silly bugger
Use HitPosition instead of EndPosition on our sweep traces
Add TraceResult.HitPosition same as EndPosition for rays, but for sweeps its going to be the contact point where as EndPosition should be how far the sweep got
Sweep trace the paddle into the ball, way way more reliable, setup a nice cylinder hull for the paddle too
Better physics, account for paddle angular velocity, original ball velocity reflects, and resolve movement after we've been hit instead of before
Add support for sweep traces against sphere shapes, needed to do some bullshit with a 0 radius sphere
Make [UseTemplate] work properly on consolidated builds (used for s&works) - instead of the generator trying to guess root directories feed it a map of physical paths -> virtual paths for all the cs files
Probably fix the speed boost entity
Don't give alternate flags when querying DX11 display mode list
Fix crash when registering the minidump handler due to addon stuff being removed
setting default map and removing something redundant
[HideInEditor] works on asset properties
Give [GameResource] a default question_mark icon so it's not null by default (also fix DrawMaterialIcon shitting the bed with null)
Fix static/dynamic colors not working on [EditorModel] ( This is only used for light modes, weird fucking place? )
All our triggers should inherit from BaseTrigger, we get the nice fixes layla did to make them not lag like shit then
Fix ball not hitting any triggers because it's physics motion type was Static, set it to Keyframed
delete fgd
Tidy up all this shit and get it compiling again
Update SteamInput attack actions to match C#
Attack1/2 -> PrimaryAttack SecondaryAttack
InputButton.Attack1/2 becomes InputButton.PrimaryAttack and InputButton.SecondaryAttack
Delete ambiguous DistinctBy Linq extension, this is in .NET 6 now
Take distinct Hammer entities by their TypeLibrary ClassName instead of Type
Load Hammer entity types from base first always, then distinct by class name
When we have delicious new game data let Hammer know so it can do the weird stuff it does to refresh all the widgets, helpers, blah blah blah
Shut this assert up, we're calling it multiple times on purpose
Delete "Reload Game Data" from Hammer, doesn't make sense when everything is hotloaded ( plus it would be a fucking mess to implement for no reason )
Instead of deleting / recreating native CGameDataClass lets replace their data if they already exist - this fixes a bunch of crashes since they're referenced by raw pointer everywhere within native tools code
Cleanup EntityParser some more, use DisplayInfo instead of fucking with attributes ourselves, remove code that was for ModelDoc or Assets
MapClass holds it's C# type
Use TypeLibrary.AddAssembly when adding remote game packages from Hammer
Refresh Entity Tool UI after tools.refresh and we've parsed any new map entities
Remove / replace managed Hammer entities on new assemblies so they work all lovely on hotloads
Collect [PathNode] types too for Hammer
Small fix to packages of gamedata entities
HammerEntity should be HammerEntityAttribute
Fix DisplayInfo setting Group to the IconAttribute value
Remove GameData.ParseAssembly and special cases for Sandbox.Game, let's grab it all with TypeLibrary on tools.refresh
Remove Entity.Create<T>() and rename Entity.Create( name ) to Entity.CreateByName( name ) to hint that this isn't the only way to create entities ( you can use new )
Hammer entities become opt-in with [HammerEntity] - most game authors were having to do [Hammer.Skip] on most of their entities so makes sense to invert it
Fix material icons not showing in Hammer's entity tool