438 Commits over 1,371 Days - 0.01cph!
Defer OnAfterTreeRender until end of tick to ensure children processed first and references set (#1180)
* Defer OnAfterTreeRender until end of tick to ensure children processed first and references set
* Only update (run pending events, tick, scroll velocity) after render once - reset that flag on hotload if render tree becomes dirty
* Revert "Only update (run pending events, tick, scroll velocity) after render once - reset that flag on hotload if render tree becomes dirty"
This reverts commit aae36e1777d11a5649c24985c0f8802ced3397b4.
Fix setting GameLobby.ConVars not checking correct key for input
Remove Map options for Game projects (this stuff to be handled in game menus only in future)
Remove map select stuff from LaunchConfig
Remove validate map stuff from GameMenuInstance
Obsolete ValidateMap, MapSelectionMode and MapList
Scrape Effects (#1139)
* Add props to Surface for impact decal and scrape effects / decals
* Use ContactPoint + SurfaceNormal to pass into AddImpactSound
* Let's add decals and particle effects for impacts but try only doing it if speed > 30 - maybe we configure this per surface?
* Add PhysicsImpact struct and use that to seperate effects for Hard and Soft impacts in Surface description (decals + fx)
* Correctly spawn soft or hard physics impact particles + decals based on squared speed
* Add normal from first valid manifold on contact to friction events to pass to C#
* Enable/Disable physics impacts and scrape events as props for now, pass normal from fiction event to AddFrictionSound and create effects where necessary
* Also grab contact center from first manifold and pass to C#
* Use contact pos for decals + effects, try to base effect frequency on energy volume scale, fix decal placement remove particles on friction effect stop
* Set destroy time to 0.5 (this is a failsafe anyway)
* Don't have particles follow entity, do it ourselves so we can set to actual contact pos
* Set forward for scrape particles to contact normal
* Use method for getting inherited surface values if necessary to avoid repeating same code
* Add Mass and Direction named control points for friction particles. Mass is body mass, direction is body velocity normal. CP0 is already setting position and contact normal
* Lower destroy time for effects
* Reorganize scrape data in surface def, lower default values. Don't fallback to rough by default. If it's a smooth scrape and there's no effects for that - do nothing by default
* Surface is considered smooth by default, can set roughness factor higher for rough surfaces...
* Get material for triangle by index for shape 2 on friction events should fix all friction events against world surfaces having hit surface be "default"
* Store friction hit surface (last) and if we've changed hit surface stop any previous effects and sounds
* Remove unused prop
* Remove unused var
* Make EnableScrapeEffects and EnableImpactEffects internal for now
* Make FrictionEffects a dictionary
* Call PhysicsGameSystem.Shutdown on GameLoop shutdown to ensure vars cleared
* Add an Intensity named control point value (0-1) for scrape particle effects to use
Set default value if property does not exist in AddDictionaryPropertyInt as we do in AddDictionaryProperty<T>
TickRate Project Settings (#1134)
* TickRate project settings
* Def tick rate 50 as it was
* Obsolete Game.TickRate.set
* take tickrate stuff out of serverconfig
WIP: Impact and Scrapes (#1072)
* strip impact sound stuff from native
* put it in c# commented out for implementation there later
* Strip CPhysSurfacePropertiesSoundNames
* Add GetFrictionNotifications() to IPhysicsWorld
* Add FrictionEvent, call c# with friction notifications
* Add OnFrictionEvent c# side, add some log for test
* Add GetFrictionNotifications override to CPhysicsWorld. put note to call shutdownfrictionsounds in entity InternalDestruct for later
* Start re-impl impacts in c#
* Remove some logs, ensure impact sound plays from body position
* Strip m_audioParams / CPhysSurfacePropertiesAudio
* Add ScrapeRough/ScrapeSmooth to Surface sound def, add RoughnessFactor and RoughThreshold
* Reorganize code + implement friction sounds in theory
* Call StopFrictionSounds in entity destruct
* Add friction sound to list.... some debug logs...
* Reverse MathX.approach params (it was this way in native :S)
* Add some stuff to entity similar to StartTouch/Touch/EndTouch but for scrapes - revise later
* Use ScrapeEvent incase we need to add/change params later
* Call it ScrapeEventData like CollisionEventData and move it out of Entity
* Fix access violation
* Test
* Remove ScrapeEvent / Entity.Start/EndScrape stuff for now we can look at that later
Fixed Sound.Stop/SetVolume/SetPitch/SetRandomPitch/SetPosition not working
Merge branch 'master' of github.com:Facepunch/sbox
Support passing no choices to listen for any text
Actually have SpeechRecognition.Start take an IEnumerable<string> for choices - lets you use string[], Lists, method returning IEnumerable etc
Use init instead of setter for SpeechRecognitionResult properties
Obsolete SpeechRecognition.Listen. Add SpeechRecognition.Start. Callback for SpeechRecognition.Start passes SpeechRecognitionResult with additional info: Confidence (0-1), how confident are we that this is the right result? And Success, did we find a match? The old SpeechRecognition.Listen method routes through this for backwards compat for now. Fixes sboxgame/issues#2562
Merge branch 'master' of github.com:Facepunch/sbox
Merge branch 'master' of github.com:Facepunch/sbox
Fix Time.Now / Time.Delta not being updated properly C# side in PostBotTick
Merge branch 'master' of github.com:Facepunch/sbox
Networkable Component References (#1056)
* add componentid to IComponent
* make component id public - add internal findbyid method, add lookup dict for comp by id
* add/remove components from lookup where appropriate
* Add VarIComponent to support [Net] IComponent types
* Add replicate codegen
* VarIComponent -> VarEntityComponent, make ComponentId internal again, remove from IComponent interface. in Replicate..Component search for derived types from EntityComponent
* FindById should just return an EntityComponent now
Fix crash in particle system when using SetParticleControlComponent with an invalid CP value. If the CP passed is higher than function read limit, log warning and return origin vector in GetControlPointPosition
Let's just limit RpcHistory.Storage to 1024 elements by removing the first element if we go over that. RpcHistory.Purge is called when a net message (rpc) is received, but if one isn't received for a while the rpc history can build up to insane amounts and cause issues with hotloading
Instead of silently failing throw arg exceptions - fix internal events not having correct params (#1003)
Add GameEvent.Server.ClientJoined and GameEvent.Server.ClientDisconnect events
Merge branch 'master' of github.com:Facepunch/sbox
Error when compiling if event listener method has incorrect params based on MethodArguments attribute (#992)
* Initial commit
* Nicer error
* Use an error id thats not used
* Use full name when getting attribute so dont process this for some other random attribute with the same name
* Apply to any attr
* Change error title
* Remove unused using statements
Move game specific events to GameEvents, keep Event.Hotload and Event.Debug.Overlay, mark others obsolete (#993)
Fix System.Collections.Concurrent not being supported
Fix mimic bots not copying player's action inputs
Merge branch 'master' of github.com:Facepunch/sbox
Compile shaders for a project after importing it
Merge branch 'master' of github.com:Facepunch/sbox
Add Sandbox.Internal.GlobalGameNamespace to global namespaces for csproj for libraries
Merge branch 'master' of github.com:Facepunch/sbox
Library minimal project sets HasAssets to true by default + expose these options during project creation for libraries (let libs contain assets)
Merge branch 'master' of github.com:Facepunch/sbox
Throw error when [ClientRpc] is added to invalid methods (not an Entity type, or EntityComponent type, or static method)
Merge branch 'master' of github.com:Facepunch/sbox
Allow any Entity type to be a [ClientInput]
Merge branch 'master' of sbox
WIP: ShaderGraph Comments (#907)
* WIP Shader Graph Comments (some funky QT stuff going on though with GraphicsItem?) https://files.facepunch.com/conna/1b2211b1/sbox-dev_hfZT4FhruD.mp4
* Add select color choices for comments
* Add description field too for tooltips
* Jiggle position and reset each update to force a redraw and update hitbox (temp)
* Snap to grid on resize
* Let static RPCs be nested in other static classes
* WIP Shader Graph Comments (some funky QT stuff going on though with GraphicsItem?) https://files.facepunch.com/conna/1b2211b1/sbox-dev_hfZT4FhruD.mp4
* Add select color choices for comments
* Add description field too for tooltips
* Jiggle position and reset each update to force a redraw and update hitbox (temp)
* Snap to grid on resize
* Call PrepareGeometryChange when resizing
* Hide Comment Node, add seperate Add Comment option always on top
* Update colors + add new one
* Show description inside the box
* Selecting a comment normally will automatically select any nodes inside of its bounds
* Better selection handling for nodes inside
* Added layla's resize stuff + KISS approach to selecting children. click the box selects whats inside.
* Comments take priority for Property display
* Deselect current nodes when pressing on comment if not already selected
* Use LeftMouseButton instead coz it exists and it's nicer
* Always keep inner nodes selected (check last mouse down)
* Remove drag indicator from comment as not needed now
* Comment UI tooltip updates when title/desc changed
* When dragging a comment node on top of another comment node, alter its z index so its on top of that one
* Greatly increase the max comment node size
* Fix layering
* Better layer system + normalize layers
* Can just drag a comment node to select and drag its contents too. Double click a comment node to select only the node itself
Fix predicted network and predicted local swap. Only store and restore predicted child networkables if we should based on network / variables flags
Restore functionality to remember ConVar values between hotloads. Don't remember values if the ConVar isn't our host type
Move ConVar generators to ConVar folder. Add ConVar.Engine file to generate backing field + set underlying ConVar value for tool ConVars. Don't do any generation for engine ConVars if we aren't a tools package. Similarly, don't do any generation for other ConVar types if we _are_ a tools package.
Merge branch 'master' of github.com:Facepunch/sbox
Remove ConsoleSystem.HasSwitch. Make CommandLine internals visible to Sandbox.Server
Add ConVar.Server + ConVar.Client generators so setting these properties from their respective realms will update underlying ConVar
Update ConvarReplicated to match ConVar.Menu/ConVar.ClientData naming for consistency
Update generator class names for consistency
Add ConVarClient/ConVarServer visit property calls to worker
Don't set ConVar value from game setting default if we have a command line switch
Fix commented out logs so we can use them in future
Remember values from hotloads again (for now)
Comment out RememberValue again for now until I have a solution
Merge branch 'master' of github.com:Facepunch/sbox
ThreadStatic tag builder in Trace.From. Todo: look into thread safety for traces(?)
Merge branch 'master' of github.com:Facepunch/sbox
Let static RPCs be nested in other static classes (correct branch this time)
Comment explaining what's going on - note to self
Seemingly fixes odd lag compensation rewind tick offset. Seems to have perfect lag compensation results even with 300 fake ping - I need to test this in a real environment though
Merge branch 'master' of github.com:Facepunch/sbox
Use Entity.FindByIndex instead of Entity.All.FirstOrDefault in OnNetMessage when finding entity
Fully purge any RPC history with tick less than current tick when receiving new net message
When an RPC is called within a predicted context with a To target, if the local client is a recipient call the base function and remember for Prediction (fixes sboxgame/issues/issues/2935)
Supporting INetworkSerializer types as RPC parameters
[Predicted] Support for BaseNetworkable and Components (#794)
* Initial commit
* Iterate through BaseNetworkable properties too
Fixed Screen.GetOrthoRay and fixed SceneCamera.GetRay (when the camera is ortho)
Merge branch 'master' of github.com:Facepunch/sbox
This should fix an issue where switching pawns could sometimes break inputs
Skip input data if we encounter a component that no longer exists (should fix issues where client sends input for a component that the server has since deleted)
Fix read past stream error when using [ClientInput] on properties with unsupported types and instead log a warning
Add Saved Game styling for new lobby
Merge branch 'master' of github.com:Facepunch/sbox
Render Tags (#758)
* Initial commit / backup
* Copy entity tags to scene object on initial/change, and ensure light entity's sceneobject is actually the right one
* remove unused HasTag overload
* Support "world" tag to render only or exclude static objects and hammer geometry
* Typo
* Include/exclude sunlight and other lights according to set tags
* Copy tags to sceneobject on create, and update when tags added/removed from entity. support lights
* Let's respect the camera's exclude / render tags in HighlightRenderer
* Add tag checks in DrawSceneObject too
* Remove unused GetTags overload
* Remove unused
* ITagSet, SimpleTagSet. Have camera use SimpleTagSet, have sceneobjects use SceneObjectTags
* GetAll ->TryGetAll. Use HasExclude/HasRenderTag when adding tag
* Only ITagSet is a public interface, hide everything else away
* Fix sillyness
* Tags property
Client Input Components (#747)
* Initial commit
* Documentation for ClientInput hints that it can also be used on ClientInputComponent
* Allow any component, remove ClientInputComponent
* Copy component values best we can in MimicBot