├── .editorconfig ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .gitmodules ├── Assets ├── entity │ ├── directional_gravity.png │ ├── ent_balloon.png │ ├── ent_drone.png │ ├── ent_lamp.png │ ├── ent_light.png │ ├── flashlight.png │ └── spawnicon.png ├── materials │ ├── particles │ │ ├── electrical │ │ │ ├── electrical_arc02.vtex_c │ │ │ ├── electrical_arc02_unsharp.vtex_c │ │ │ ├── electrical_arc03.vtex_c │ │ │ ├── electrical_arc03a.vtex_c │ │ │ ├── electrical_arc03b.png │ │ │ ├── electrical_arc03c.vtex_c │ │ │ ├── electrical_arc03d.vtex_c │ │ │ ├── electrical_arc03e.vtex_c │ │ │ ├── electrical_arc03f.vtex_c │ │ │ ├── electrical_arc_looping.vtex_c │ │ │ ├── electrical_arc_looping_a.vtex_c │ │ │ ├── electrical_arc_looping_b.vtex_c │ │ │ ├── electrical_arc_looping_c.vtex_c │ │ │ ├── electrical_arc_looping_d.vtex_c │ │ │ ├── electrical_arc_looping_e.vtex_c │ │ │ ├── electrical_arc_smooth.vtex_c │ │ │ ├── electrical_cracks.vtex_c │ │ │ ├── electrical_seq.vtex_c │ │ │ ├── electrical_seq_b.vtex_c │ │ │ ├── electricity_22_a.vtex_c │ │ │ ├── electricity_22_d.vtex_c │ │ │ └── electricity_28_a.vtex_c │ │ ├── physgun_beam.vmat │ │ └── physgun_beam.vmat_c │ ├── shiny_white.vmat │ └── shiny_white.vmat_c ├── menu │ └── boxes.webm ├── models │ ├── ball │ │ ├── ball.vmdl │ │ ├── ball.vmdl_c │ │ └── ball.vmdl_c.png │ ├── citizen │ │ └── citizen.vmdl_c.png │ ├── citizen_props │ │ ├── balloonears01.vmdl_c.png │ │ ├── balloonheart01.vmdl_c.png │ │ ├── balloonregular01.vmdl_c.png │ │ ├── balloontall01.vmdl_c.png │ │ ├── bathroomsink01.vmdl_c.png │ │ ├── beachball.vmdl_c.png │ │ ├── beertankard01.vmdl_c.png │ │ ├── broom01.vmdl_c.png │ │ ├── cardboardbox01.vmdl_c.png │ │ ├── chair01.vmdl_c.png │ │ ├── chair02.vmdl_c.png │ │ ├── chair03.vmdl_c.png │ │ ├── chair04blackleather.vmdl_c.png │ │ ├── chair05bluefabric.vmdl_c.png │ │ ├── chippacket01.vmdl_c.png │ │ ├── coffeemug01.vmdl_c.png │ │ ├── coin01.vmdl_c.png │ │ ├── concreteroaddivider01.vmdl_c.png │ │ ├── crate01.vmdl_c.png │ │ ├── crowbar01.vmdl_c.png │ │ ├── foamhand.vmdl_c.png │ │ ├── gritbin01_combined.vmdl_c.png │ │ ├── hotdog01.vmdl_c.png │ │ ├── icecreamcone01.vmdl_c.png │ │ ├── newspaper01.vmdl_c.png │ │ ├── oldoven.vmdl_c.png │ │ ├── recyclingbin01.vmdl_c.png │ │ ├── roadcone01.vmdl_c.png │ │ ├── sodacan01.vmdl_c.png │ │ ├── trashbag02.vmdl_c.png │ │ ├── trashcan01.vmdl_c.png │ │ ├── trashcan02.vmdl_c.png │ │ ├── wheel01.vmdl_c.png │ │ ├── wheel02.vmdl_c.png │ │ ├── wineglass01.vmdl_c.png │ │ └── wineglass02.vmdl_c.png │ ├── light │ │ ├── light_tubular.vmat │ │ ├── light_tubular.vmat_c │ │ ├── light_tubular.vmdl │ │ ├── light_tubular.vmdl_c │ │ ├── light_tubular.vmdl_c.png │ │ ├── light_tubular_color.tga │ │ └── light_tubular_refs │ │ │ ├── mesh │ │ │ ├── light_tubular_bg_body_lod0.dmx │ │ │ ├── light_tubular_bg_body_lod1.dmx │ │ │ ├── light_tubular_bg_body_lod2.dmx │ │ │ └── meshinfo.txt │ │ │ └── phys │ │ │ └── light_tubular_phy.dmx │ ├── thruster │ │ ├── ThrusterProjector.fbx │ │ ├── ThrusterProjector.tga │ │ ├── thrusterprojector.vmat │ │ ├── thrusterprojector.vmat_c │ │ ├── thrusterprojector.vmdl │ │ ├── thrusterprojector.vmdl_c │ │ └── thrusterprojector.vmdl_c.png │ └── torch │ │ ├── torch.vmat │ │ ├── torch.vmat_c │ │ ├── torch.vmdl │ │ ├── torch.vmdl_c │ │ ├── torch.vmdl_c.png │ │ ├── torch_color.tga │ │ ├── torch_normal.tga │ │ └── torch_refs │ │ ├── anim │ │ └── _idle_0.dmx │ │ ├── mesh │ │ ├── torch_bg_torch_lod0.dmx │ │ ├── torch_bg_torch_lod1.dmx │ │ └── torch_bg_torch_lod2.dmx │ │ └── phys │ │ └── torch_phy.dmx ├── prefabs │ ├── engine │ │ ├── player.prefab │ │ ├── player.prefab_c │ │ ├── spawnpoint.prefab │ │ └── spawnpoint.prefab_c │ └── weapons │ │ ├── physgun │ │ ├── physgun.prefab │ │ ├── physgun.prefab_c │ │ ├── physgun_vm.prefab │ │ ├── physgun_vm.prefab_c │ │ ├── physgun_wm.prefab │ │ └── physgun_wm.prefab_c │ │ └── pistol │ │ ├── pistol.prefab │ │ ├── pistol.prefab_c │ │ ├── pistol_vm.prefab │ │ ├── pistol_vm.prefab_c │ │ ├── pistol_wm.prefab │ │ └── pistol_wm.prefab_c ├── scenes │ ├── engine.scene │ ├── engine.scene_c │ ├── game.scene │ ├── game.scene_c │ ├── menu.scene │ └── menu.scene_c ├── sounds │ ├── balloon_pop_cute.sound │ ├── balloon_pop_cute.sound_c │ ├── balloon_pop_cute.vsnd_c │ ├── balloon_pop_cute.wav │ ├── flashlight-off.sound │ ├── flashlight-off.sound_c │ ├── flashlight-off.vsnd_c │ ├── flashlight-off.wav │ ├── flashlight-on.sound │ ├── flashlight-on.sound_c │ ├── flashlight-on.vsnd_c │ ├── flashlight-on.wav │ ├── kersplat.sound │ ├── kersplat.sound_c │ ├── kersplat.vsnd_c │ ├── kersplat.wav │ └── weapons │ │ ├── rust_flashlight │ │ ├── flashlight-attack.vsnd_c │ │ ├── rust_flashlight.attack.sound │ │ └── rust_flashlight.attack.sound_c │ │ ├── rust_pistol │ │ ├── eject_clip.vsnd_c │ │ ├── fire-alt-distant.vsnd_c │ │ ├── fire-alt-far-distant.vsnd_c │ │ ├── fire-alt.vsnd_c │ │ ├── grab_clip.vsnd_c │ │ ├── insert_clip.vsnd_c │ │ ├── revolver-deploy.vsnd_c │ │ ├── revolver-dryfire.vsnd_c │ │ ├── rust_pistol.shoot.sound │ │ ├── rust_pistol.shoot.sound_c │ │ ├── semi-pistol-attack-silenced.vsnd_c │ │ ├── slide_back.vsnd_c │ │ └── slide_shut.vsnd_c │ │ ├── rust_pumpshotgun │ │ ├── rust_pumpshotgun-attack-distant.vsnd_c │ │ ├── rust_pumpshotgun-attack-far-distant.vsnd_c │ │ ├── rust_pumpshotgun-attack-silenced.vsnd_c │ │ ├── rust_pumpshotgun-attack.vsnd_c │ │ ├── rust_pumpshotgun-deploy-2.vsnd_c │ │ ├── rust_pumpshotgun-deploy-3p.vsnd_c │ │ ├── rust_pumpshotgun-deploy.vsnd_c │ │ ├── rust_pumpshotgun-dryfire.vsnd_c │ │ ├── rust_pumpshotgun-flip_over.vsnd_c │ │ ├── rust_pumpshotgun-insert_shell-1.vsnd_c │ │ ├── rust_pumpshotgun-insert_shell-2.vsnd_c │ │ ├── rust_pumpshotgun-pump-forward.vsnd_c │ │ ├── rust_pumpshotgun-pumpaction.vsnd_c │ │ ├── rust_pumpshotgun-reload-start.vsnd_c │ │ ├── rust_pumpshotgun.insert.sound │ │ ├── rust_pumpshotgun.insert.sound_c │ │ ├── rust_pumpshotgun.pump.sound │ │ ├── rust_pumpshotgun.pump.sound_c │ │ ├── rust_pumpshotgun.pumpslow.sound │ │ ├── rust_pumpshotgun.pumpslow.sound_c │ │ ├── rust_pumpshotgun.shoot.sound │ │ ├── rust_pumpshotgun.shoot.sound_c │ │ ├── rust_pumpshotgun.shootdouble.sound │ │ └── rust_pumpshotgun.shootdouble.sound_c │ │ └── rust_smg │ │ ├── rust_smg.boltback.sound │ │ ├── rust_smg.boltback.sound_c │ │ ├── rust_smg.boltshut.sound │ │ ├── rust_smg.boltshut.sound_c │ │ ├── rust_smg.clipin.sound │ │ ├── rust_smg.clipin.sound_c │ │ ├── rust_smg.clipout.sound │ │ ├── rust_smg.clipout.sound_c │ │ ├── rust_smg.deploy.sound │ │ ├── rust_smg.deploy.sound_c │ │ ├── rust_smg.dryfire.sound │ │ ├── rust_smg.dryfire.sound_c │ │ ├── rust_smg.reloadstart.sound │ │ ├── rust_smg.reloadstart.sound_c │ │ ├── rust_smg.shoot.sound │ │ ├── rust_smg.shoot.sound_c │ │ ├── rust_smg_attack.vsnd_c │ │ ├── rust_smg_attackdistant.vsnd_c │ │ ├── rust_smg_attackfardistant.vsnd_c │ │ ├── rust_smg_attacksilenced.vsnd_c │ │ ├── rust_smg_boltback.vsnd_c │ │ ├── rust_smg_boltshut.vsnd_c │ │ ├── rust_smg_clipin.vsnd_c │ │ ├── rust_smg_clipout.vsnd_c │ │ ├── rust_smg_deploy.vsnd_c │ │ ├── rust_smg_deploy3p.vsnd_c │ │ ├── rust_smg_dryfire.vsnd_c │ │ └── rust_smg_reloadstart.vsnd_c └── surfaces │ ├── car.surface │ └── car.surface_c ├── Code ├── Assembly.cs ├── Game │ └── Weapon │ │ ├── BaseBulletWeapon │ │ └── BaseBulletWeapon.cs │ │ ├── BaseCarriable │ │ ├── BaseCarriable.ViewModel.cs │ │ ├── BaseCarriable.WorldModel.cs │ │ └── BaseCarriable.cs │ │ ├── BaseWeapon │ │ ├── BaseWeapon.Events.cs │ │ ├── BaseWeapon.Reloading.cs │ │ └── BaseWeapon.cs │ │ └── WeaponModel │ │ ├── ViewModel.Throwables.cs │ │ ├── ViewModel.cs │ │ ├── WeaponModel.cs │ │ └── WorldModel.cs ├── GameLoop │ ├── GameManager.cs │ └── GamePreferences.cs ├── Map │ ├── BaseToggle.cs │ ├── FuncButton.cs │ ├── FuncDoor.cs │ ├── FuncMover.cs │ ├── TriggerHurt.cs │ ├── TriggerPush.cs │ └── TriggerTeleport.cs ├── Player │ ├── DeathCameraTarget.cs │ ├── DeathmatchDamageInfo.cs │ ├── NoclipMoveMode.cs │ ├── Player.ConsoleCommands.cs │ ├── Player.cs │ ├── PlayerData.cs │ ├── PlayerEvent.cs │ ├── PlayerInventory.cs │ ├── PlayerObserver.cs │ └── PlayerStats.cs ├── UI │ ├── Chat │ │ ├── Chat.razor │ │ ├── Chat.razor.cs │ │ ├── Chat.razor.scss │ │ └── ChatRow.razor │ ├── Components │ │ ├── ButtonGroup.cs │ │ ├── PackageIcon.razor │ │ ├── PackageIcon.razor.scss │ │ ├── PackageList.razor │ │ ├── PackageList.razor.scss │ │ └── PackageSortButtonGroup.razor │ ├── Crosshair.razor │ ├── Crosshair.razor.scss │ ├── GameMenu │ │ ├── Components │ │ │ ├── MapButton.razor │ │ │ └── MapButton.razor.scss │ │ ├── GameMenu.razor │ │ ├── GameMenu.razor.scss │ │ ├── GameMenuPanel.razor │ │ ├── GameMenuPanel.razor.scss │ │ ├── Modals │ │ │ ├── Components │ │ │ │ ├── FormGroup.razor │ │ │ │ ├── MapSelectButton.razor │ │ │ │ └── MapSelectButton.razor.scss │ │ │ ├── CreateGameModal.razor │ │ │ └── CreateGameModal.razor.scss │ │ └── Pages │ │ │ ├── ActivePage.razor │ │ │ ├── FrontPage.razor │ │ │ └── FrontPage.razor.scss │ ├── Health.razor │ ├── Health.razor.scss │ ├── Inventory │ │ ├── InventoryBar.razor │ │ ├── InventoryBar.razor.scss │ │ ├── InventoryIcon.razor │ │ └── InventoryIcon.razor.scss │ ├── KillFeed │ │ ├── KillFeed.razor │ │ ├── KillFeed.razor.scss │ │ └── KillFeedEntry.razor │ ├── Notice.razor │ ├── Notice.razor.scss │ ├── Scoreboard │ │ ├── Scoreboard.razor │ │ ├── Scoreboard.razor.scss │ │ └── ScoreboardEntry.razor │ ├── SpawnMenu │ │ ├── Lists │ │ │ ├── EntityList.razor │ │ │ ├── ModelList.razor │ │ │ ├── NPCList.razor │ │ │ └── SpawnList.razor │ │ ├── SpawnMenu.razor │ │ └── SpawnMenu.razor.scss │ └── VoiceChat │ │ ├── VoiceEntry.razor │ │ ├── VoiceList.razor │ │ ├── VoiceList.razor.scss │ │ ├── VoiceSpeaker.razor │ │ └── VoiceSpeaker.razor.scss ├── Utility │ ├── CameraSetup.cs │ ├── EnvironmentShake.cs │ ├── Extensions.cs │ └── LineRendererLight.cs └── Weapons │ ├── Physgun.Effects.cs │ ├── Physgun.cs │ └── Pistol.cs ├── LICENSE ├── ProjectSettings ├── Collision.config ├── Cursors.config ├── Input.config ├── Networking.config └── Physics.config ├── README.md └── sandbox.sbproj /.editorconfig: -------------------------------------------------------------------------------- 1 | # Remove the line below if you want to inherit .editorconfig settings from higher directories 2 | root = true 3 | 4 | # C# files 5 | [*.{cs,razor}] 6 | indent_style = tab 7 | indent_size = 4 8 | tab_size = 4 9 | 10 | # New line preferences 11 | end_of_line = crlf 12 | insert_final_newline = true 13 | 14 | 15 | #### C# Coding Conventions #### 16 | 17 | # Expression-bodied members 18 | csharp_style_expression_bodied_accessors = true:silent 19 | csharp_style_expression_bodied_constructors = false:silent 20 | csharp_style_expression_bodied_indexers = true:silent 21 | csharp_style_expression_bodied_lambdas = true:silent 22 | csharp_style_expression_bodied_local_functions = false:silent 23 | csharp_style_expression_bodied_methods = false:silent 24 | csharp_style_expression_bodied_operators = false:silent 25 | csharp_style_expression_bodied_properties = true:silent 26 | 27 | # Pattern matching preferences 28 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion 29 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion 30 | csharp_style_prefer_not_pattern = true:suggestion 31 | csharp_style_prefer_pattern_matching = true:silent 32 | csharp_style_prefer_switch_expression = true:suggestion 33 | 34 | # Null-checking preferences 35 | csharp_style_conditional_delegate_call = true:suggestion 36 | 37 | # Code-block preferences 38 | csharp_prefer_braces = true:silent 39 | 40 | # Expression-level preferences 41 | csharp_prefer_simple_default_expression = true:suggestion 42 | csharp_style_deconstructed_variable_declaration = true:suggestion 43 | csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion 44 | csharp_style_inlined_variable_declaration = true:suggestion 45 | csharp_style_pattern_local_over_anonymous_function = true:suggestion 46 | csharp_style_prefer_index_operator = true:suggestion 47 | csharp_style_prefer_range_operator = true:suggestion 48 | csharp_style_throw_expression = true:suggestion 49 | csharp_style_unused_value_assignment_preference = discard_variable:suggestion 50 | csharp_style_unused_value_expression_statement_preference = discard_variable:silent 51 | 52 | # 'using' directive preferences 53 | csharp_using_directive_placement = outside_namespace:silent 54 | 55 | #### C# Formatting Rules #### 56 | 57 | # New line preferences 58 | csharp_new_line_before_catch = true 59 | csharp_new_line_before_else = true 60 | csharp_new_line_before_finally = true 61 | csharp_new_line_before_members_in_anonymous_types = true 62 | csharp_new_line_before_members_in_object_initializers = true 63 | csharp_new_line_before_open_brace = all 64 | csharp_new_line_between_query_expression_clauses = true 65 | 66 | # Indentation preferences 67 | csharp_indent_block_contents = true 68 | csharp_indent_braces = false 69 | csharp_indent_case_contents = true 70 | csharp_indent_case_contents_when_block = true 71 | csharp_indent_labels = no_change 72 | csharp_indent_switch_labels = true 73 | 74 | # Space preferences 75 | csharp_space_after_cast = false 76 | csharp_space_after_colon_in_inheritance_clause = true 77 | csharp_space_after_comma = true 78 | csharp_space_after_dot = false 79 | csharp_space_after_keywords_in_control_flow_statements = true 80 | csharp_space_after_semicolon_in_for_statement = true 81 | csharp_space_around_binary_operators = before_and_after 82 | csharp_space_around_declaration_statements = false 83 | csharp_space_before_colon_in_inheritance_clause = true 84 | csharp_space_before_comma = false 85 | csharp_space_before_dot = false 86 | csharp_space_before_open_square_brackets = false 87 | csharp_space_before_semicolon_in_for_statement = false 88 | csharp_space_between_empty_square_brackets = false 89 | csharp_space_between_method_call_empty_parameter_list_parentheses = false 90 | csharp_space_between_method_call_name_and_opening_parenthesis = false 91 | csharp_space_between_method_call_parameter_list_parentheses = true 92 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false 93 | csharp_space_between_method_declaration_name_and_open_parenthesis = false 94 | csharp_space_between_method_declaration_parameter_list_parentheses = true 95 | csharp_space_between_parentheses = control_flow_statements 96 | csharp_space_between_square_brackets = false 97 | 98 | # Wrapping preferences 99 | csharp_preserve_single_line_blocks = true 100 | csharp_preserve_single_line_statements = true -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # This file describes files and paths that should not be tracked by Git version control 3 | # https://git-scm.com/docs/gitignore 4 | 5 | # Auto-generated code editor files 6 | .vs/* 7 | .vscode/* 8 | *.csproj 9 | obj 10 | bin 11 | Properties/* 12 | code/obj/* 13 | code/Properties/* 14 | 15 | # Auto-generated asset related files 16 | .sbox/* 17 | *.generated.* 18 | *.los 19 | *.vpk 20 | *launchSettings.json 21 | *.sln 22 | 23 | *idea 24 | 25 | # Exported / standalone games 26 | Exports/ 27 | 28 | # Libraries 29 | Libraries/ 30 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Localization"] 2 | path = Localization 3 | url = https://github.com/Softsplit/sandbox-localizations 4 | -------------------------------------------------------------------------------- /Assets/entity/directional_gravity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/entity/directional_gravity.png -------------------------------------------------------------------------------- /Assets/entity/ent_balloon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/entity/ent_balloon.png -------------------------------------------------------------------------------- /Assets/entity/ent_drone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/entity/ent_drone.png -------------------------------------------------------------------------------- /Assets/entity/ent_lamp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/entity/ent_lamp.png -------------------------------------------------------------------------------- /Assets/entity/ent_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/entity/ent_light.png -------------------------------------------------------------------------------- /Assets/entity/flashlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/entity/flashlight.png -------------------------------------------------------------------------------- /Assets/entity/spawnicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/entity/spawnicon.png -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc02.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc02.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc02_unsharp.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc02_unsharp.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc03.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc03.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc03a.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc03a.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc03b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc03b.png -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc03c.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc03c.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc03d.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc03d.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc03e.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc03e.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc03f.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc03f.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc_looping.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc_looping.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc_looping_a.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc_looping_a.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc_looping_b.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc_looping_b.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc_looping_c.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc_looping_c.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc_looping_d.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc_looping_d.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc_looping_e.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc_looping_e.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_arc_smooth.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_arc_smooth.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_cracks.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_cracks.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_seq.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_seq.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electrical_seq_b.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electrical_seq_b.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electricity_22_a.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electricity_22_a.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electricity_22_d.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electricity_22_d.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/electrical/electricity_28_a.vtex_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/electrical/electricity_28_a.vtex_c -------------------------------------------------------------------------------- /Assets/materials/particles/physgun_beam.vmat: -------------------------------------------------------------------------------- 1 | // THIS FILE IS AUTO-GENERATED 2 | 3 | Layer0 4 | { 5 | shader "shaders/line.shader" 6 | 7 | //---- Fog ---- 8 | g_bFogEnabled "1" 9 | 10 | //---- Material ---- 11 | TextureAmbientOcclusion "materials/default/default_ao.tga" 12 | TextureColor "materials/particles/electrical/electrical_arc03b.png" 13 | TextureMetalness "materials/default/default_metal.tga" 14 | TextureNormal "materials/default/default_normal.tga" 15 | TextureRoughness "materials/default/default_rough.tga" 16 | } -------------------------------------------------------------------------------- /Assets/materials/particles/physgun_beam.vmat_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/particles/physgun_beam.vmat_c -------------------------------------------------------------------------------- /Assets/materials/shiny_white.vmat: -------------------------------------------------------------------------------- 1 | "Layer0" 2 | { 3 | "shader" "shaders/generic.shader_c" 4 | "F_SPECULAR" "1" 5 | "g_vColorTint" "[1.000000 1.000000 1.000000 0.000000]" 6 | "TextureColor" "materials/default/default_color.tga" 7 | "g_bFogEnabled" "1" 8 | "g_flDirectionalLightmapMinZ" "0.050000" 9 | "g_flDirectionalLightmapStrength" "1.000000" 10 | "g_vGlossinessRange" "[0.500 1.000]" 11 | "g_vMetalnessRange" "[0.500 1.000]" 12 | "TextureGlossiness" "materials/default/default_gloss.tga" 13 | "TextureMetalness" "materials/default/default_metal.tga" 14 | "TextureReflectance" "[1.000000 1.000000 1.000000 0.000000]" 15 | "TextureNormal" "materials/default/default_normal.tga" 16 | "g_flBumpStrength" "1.000000" 17 | } 18 | -------------------------------------------------------------------------------- /Assets/materials/shiny_white.vmat_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/materials/shiny_white.vmat_c -------------------------------------------------------------------------------- /Assets/menu/boxes.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/menu/boxes.webm -------------------------------------------------------------------------------- /Assets/models/ball/ball.vmdl: -------------------------------------------------------------------------------- 1 | 2 | { 3 | rootNode = 4 | { 5 | _class = "RootNode" 6 | children = 7 | [ 8 | { 9 | _class = "GameDataList" 10 | children = 11 | [ 12 | { 13 | _class = "GenericGameData" 14 | game_class = "ao_proxy_capsule" 15 | game_keys = 16 | { 17 | bonename = "" 18 | radius = 10.0 19 | point0 = [ 0.0, 0.0, 0.0 ] 20 | point1 = [ 0.0, 0.0, 0.0 ] 21 | } 22 | }, 23 | ] 24 | }, 25 | { 26 | _class = "PhysicsShapeList" 27 | children = 28 | [ 29 | { 30 | _class = "PhysicsShapeSphere" 31 | parent_bone = "" 32 | surface_prop = "rubber" 33 | collision_prop = "default" 34 | radius = 10.0 35 | center = [ 0.0, 0.0, 0.0 ] 36 | }, 37 | ] 38 | }, 39 | { 40 | _class = "RenderMeshList" 41 | children = 42 | [ 43 | { 44 | _class = "RenderPrimitiveSphere" 45 | name = "ball" 46 | parent_bone = "" 47 | material_name = "materials/shiny_white.vmat" 48 | origin = [ 0.0, 0.0, 0.0 ] 49 | angles = [ 0.0, 0.0, 0.0 ] 50 | max_u = 1.0 51 | max_v = 1.0 52 | radius = 10.0 53 | segments_u = 32 54 | segments_v = 32 55 | }, 56 | ] 57 | }, 58 | ] 59 | model_archetype = "" 60 | primary_associated_entity = "" 61 | anim_graph_name = "" 62 | } 63 | } -------------------------------------------------------------------------------- /Assets/models/ball/ball.vmdl_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/ball/ball.vmdl_c -------------------------------------------------------------------------------- /Assets/models/ball/ball.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/ball/ball.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen/citizen.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen/citizen.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/balloonears01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/balloonears01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/balloonheart01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/balloonheart01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/balloonregular01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/balloonregular01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/balloontall01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/balloontall01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/bathroomsink01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/bathroomsink01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/beachball.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/beachball.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/beertankard01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/beertankard01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/broom01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/broom01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/cardboardbox01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/cardboardbox01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/chair01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/chair01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/chair02.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/chair02.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/chair03.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/chair03.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/chair04blackleather.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/chair04blackleather.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/chair05bluefabric.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/chair05bluefabric.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/chippacket01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/chippacket01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/coffeemug01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/coffeemug01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/coin01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/coin01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/concreteroaddivider01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/concreteroaddivider01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/crate01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/crate01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/crowbar01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/crowbar01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/foamhand.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/foamhand.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/gritbin01_combined.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/gritbin01_combined.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/hotdog01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/hotdog01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/icecreamcone01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/icecreamcone01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/newspaper01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/newspaper01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/oldoven.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/oldoven.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/recyclingbin01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/recyclingbin01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/roadcone01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/roadcone01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/sodacan01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/sodacan01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/trashbag02.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/trashbag02.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/trashcan01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/trashcan01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/trashcan02.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/trashcan02.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/wheel01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/wheel01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/wheel02.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/wheel02.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/wineglass01.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/wineglass01.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/citizen_props/wineglass02.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/citizen_props/wineglass02.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/light/light_tubular.vmat: -------------------------------------------------------------------------------- 1 | "Layer0" 2 | { 3 | "shader" "shaders/simple.shader_c" 4 | "g_flModelTintAmount" "1.000000" 5 | "g_vColorTint" "[1.000000 1.000000 1.000000 0.000000]" 6 | "TextureColor" "models/light/light_tubular_color.tga" 7 | "g_flFadeExponent" "1.000000" 8 | "g_bFogEnabled" "1" 9 | "g_flDirectionalLightmapMinZ" "0.050000" 10 | "g_flDirectionalLightmapStrength" "1.000000" 11 | "g_flMetalness" "0.000000" 12 | "TextureNormal" "materials/default/default_normal.tga" 13 | "TextureRoughness" "materials/default/default_rough.tga" 14 | "g_nScaleTexCoordUByModelScaleAxis" "0" 15 | "g_nScaleTexCoordVByModelScaleAxis" "0" 16 | "g_vTexCoordOffset" "[0.000 0.000]" 17 | "g_vTexCoordScale" "[1.000 1.000]" 18 | "g_vTexCoordScrollSpeed" "[0.000 0.000]" 19 | } 20 | -------------------------------------------------------------------------------- /Assets/models/light/light_tubular.vmat_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/light/light_tubular.vmat_c -------------------------------------------------------------------------------- /Assets/models/light/light_tubular.vmdl: -------------------------------------------------------------------------------- 1 | 2 | { 3 | rootNode = 4 | { 5 | _class = "RootNode" 6 | children = 7 | [ 8 | { 9 | _class = "LODGroupList" 10 | children = 11 | [ 12 | { 13 | _class = "LODGroup" 14 | switch_threshold = 0.0 15 | meshes = 16 | [ 17 | "light_tubular_bg_body_lod0", 18 | ] 19 | }, 20 | { 21 | _class = "LODGroup" 22 | switch_threshold = 12.0 23 | meshes = 24 | [ 25 | "light_tubular_bg_body_lod1", 26 | ] 27 | }, 28 | { 29 | _class = "LODGroup" 30 | switch_threshold = 28.0 31 | meshes = 32 | [ 33 | "light_tubular_bg_body_lod2", 34 | ] 35 | }, 36 | ] 37 | }, 38 | { 39 | _class = "MaterialGroupList" 40 | children = 41 | [ 42 | { 43 | _class = "DefaultMaterialGroup" 44 | remaps = [ ] 45 | use_global_default = true 46 | global_default_material = "models/light/light_tubular.vmat" 47 | }, 48 | ] 49 | }, 50 | { 51 | _class = "PhysicsBodyMarkupList" 52 | children = 53 | [ 54 | { 55 | _class = "PhysicsBodyMarkup" 56 | target_body = "" 57 | mass_override = 1.0 58 | inertia_scale = 1.0 59 | linear_damping = 0.0 60 | angular_damping = 0.0 61 | use_mass_center_override = false 62 | mass_center_override = [ 0.0, 0.0, 0.0 ] 63 | }, 64 | ] 65 | }, 66 | { 67 | _class = "PhysicsShapeList" 68 | children = 69 | [ 70 | { 71 | _class = "PhysicsHullFile" 72 | name = "light_tubular_phy_0_mesh" 73 | parent_bone = "" 74 | surface_prop = "default" 75 | collision_prop = "default" 76 | recenter_on_parent_bone = true 77 | offset_origin = [ 0.0, 0.0, 0.0 ] 78 | offset_angles = [ 180.0, 0.0, 0.0 ] 79 | filename = "models/light/light_tubular_refs/phys/light_tubular_phy.dmx" 80 | import_scale = 1.0 81 | faceMergeAngle = 10.0 82 | maxHullVertices = 0 83 | import_mode = "SingleHull" 84 | optimization_algorithm = "QEM" 85 | import_filter = 86 | { 87 | exclude_by_default = true 88 | exception_list = 89 | [ 90 | "light_tubular_phy_0_mesh", 91 | ] 92 | } 93 | }, 94 | ] 95 | }, 96 | { 97 | _class = "RenderMeshList" 98 | children = 99 | [ 100 | { 101 | _class = "RenderMeshFile" 102 | name = "light_tubular_bg_body_lod0" 103 | filename = "models/light/light_tubular_refs/mesh/light_tubular_bg_body_lod0.dmx" 104 | import_translation = [ 0.0, 0.0, 0.0 ] 105 | import_rotation = [ 180.0, 0.0, 0.0 ] 106 | import_scale = 1.0 107 | align_origin_x_type = "None" 108 | align_origin_y_type = "None" 109 | align_origin_z_type = "None" 110 | parent_bone = "" 111 | import_filter = 112 | { 113 | exclude_by_default = false 114 | exception_list = [ ] 115 | } 116 | }, 117 | { 118 | _class = "RenderMeshFile" 119 | name = "light_tubular_bg_body_lod1" 120 | filename = "models/light/light_tubular_refs/mesh/light_tubular_bg_body_lod1.dmx" 121 | import_translation = [ 0.0, 0.0, 0.0 ] 122 | import_rotation = [ 180.0, 0.0, 0.0 ] 123 | import_scale = 1.0 124 | align_origin_x_type = "None" 125 | align_origin_y_type = "None" 126 | align_origin_z_type = "None" 127 | parent_bone = "" 128 | import_filter = 129 | { 130 | exclude_by_default = false 131 | exception_list = [ ] 132 | } 133 | }, 134 | { 135 | _class = "RenderMeshFile" 136 | name = "light_tubular_bg_body_lod2" 137 | filename = "models/light/light_tubular_refs/mesh/light_tubular_bg_body_lod2.dmx" 138 | import_translation = [ 0.0, 0.0, 0.0 ] 139 | import_rotation = [ 180.0, 0.0, 0.0 ] 140 | import_scale = 1.0 141 | align_origin_x_type = "None" 142 | align_origin_y_type = "None" 143 | align_origin_z_type = "None" 144 | parent_bone = "" 145 | import_filter = 146 | { 147 | exclude_by_default = false 148 | exception_list = [ ] 149 | } 150 | }, 151 | ] 152 | }, 153 | ] 154 | model_archetype = "" 155 | primary_associated_entity = "" 156 | anim_graph_name = "" 157 | } 158 | } -------------------------------------------------------------------------------- /Assets/models/light/light_tubular.vmdl_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/light/light_tubular.vmdl_c -------------------------------------------------------------------------------- /Assets/models/light/light_tubular.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/light/light_tubular.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/light/light_tubular_color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/light/light_tubular_color.tga -------------------------------------------------------------------------------- /Assets/models/light/light_tubular_refs/mesh/light_tubular_bg_body_lod0.dmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/light/light_tubular_refs/mesh/light_tubular_bg_body_lod0.dmx -------------------------------------------------------------------------------- /Assets/models/light/light_tubular_refs/mesh/light_tubular_bg_body_lod1.dmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/light/light_tubular_refs/mesh/light_tubular_bg_body_lod1.dmx -------------------------------------------------------------------------------- /Assets/models/light/light_tubular_refs/mesh/light_tubular_bg_body_lod2.dmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/light/light_tubular_refs/mesh/light_tubular_bg_body_lod2.dmx -------------------------------------------------------------------------------- /Assets/models/light/light_tubular_refs/mesh/meshinfo.txt: -------------------------------------------------------------------------------- 1 | { 2 | "staticprop": 1, 3 | "numuvs": 1 4 | } 5 | -------------------------------------------------------------------------------- /Assets/models/light/light_tubular_refs/phys/light_tubular_phy.dmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/light/light_tubular_refs/phys/light_tubular_phy.dmx -------------------------------------------------------------------------------- /Assets/models/thruster/ThrusterProjector.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/thruster/ThrusterProjector.fbx -------------------------------------------------------------------------------- /Assets/models/thruster/ThrusterProjector.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/thruster/ThrusterProjector.tga -------------------------------------------------------------------------------- /Assets/models/thruster/thrusterprojector.vmat: -------------------------------------------------------------------------------- 1 | "Layer0" 2 | { 3 | "shader" "shaders/simple.shader_c" 4 | "g_flModelTintAmount" "1.000000" 5 | "g_vColorTint" "[1.000000 1.000000 1.000000 0.000000]" 6 | "TextureColor" "models/thruster/thrusterprojector.tga" 7 | "g_flFadeExponent" "1.000000" 8 | "g_bFogEnabled" "1" 9 | "g_flDirectionalLightmapMinZ" "0.050000" 10 | "g_flDirectionalLightmapStrength" "1.000000" 11 | "g_flMetalness" "0.700000" 12 | "TextureNormal" "materials/default/default_normal.tga" 13 | "TextureRoughness" "materials/default/default_rough.tga" 14 | "g_nScaleTexCoordUByModelScaleAxis" "0" 15 | "g_nScaleTexCoordVByModelScaleAxis" "0" 16 | "g_vTexCoordOffset" "[0.000 0.000]" 17 | "g_vTexCoordScale" "[1.000 1.000]" 18 | "g_vTexCoordScrollSpeed" "[0.000 0.000]" 19 | } 20 | -------------------------------------------------------------------------------- /Assets/models/thruster/thrusterprojector.vmat_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/thruster/thrusterprojector.vmat_c -------------------------------------------------------------------------------- /Assets/models/thruster/thrusterprojector.vmdl: -------------------------------------------------------------------------------- 1 | 2 | { 3 | rootNode = 4 | { 5 | _class = "RootNode" 6 | children = 7 | [ 8 | { 9 | _class = "MaterialGroupList" 10 | children = 11 | [ 12 | { 13 | _class = "DefaultMaterialGroup" 14 | remaps = 15 | [ 16 | { 17 | from = "thruster_projector.vmat" 18 | to = "models/thruster/thrusterprojector.vmat" 19 | }, 20 | ] 21 | use_global_default = false 22 | global_default_material = "" 23 | }, 24 | ] 25 | }, 26 | { 27 | _class = "PhysicsShapeList" 28 | children = 29 | [ 30 | { 31 | _class = "PhysicsHullFile" 32 | name = "ThrusterProjector" 33 | parent_bone = "" 34 | surface_prop = "metal" 35 | collision_prop = "default" 36 | recenter_on_parent_bone = false 37 | offset_origin = [ 0.0, 0.0, 0.0 ] 38 | offset_angles = [ 0.0, 0.0, 0.0 ] 39 | filename = "models/thruster/ThrusterProjector.fbx" 40 | import_scale = 0.5 41 | faceMergeAngle = 10.0 42 | maxHullVertices = 0 43 | import_mode = "SingleHull" 44 | optimization_algorithm = "QEM" 45 | import_filter = 46 | { 47 | exclude_by_default = false 48 | exception_list = [ ] 49 | } 50 | }, 51 | ] 52 | }, 53 | { 54 | _class = "RenderMeshList" 55 | children = 56 | [ 57 | { 58 | _class = "RenderMeshFile" 59 | filename = "models/thruster/ThrusterProjector.fbx" 60 | import_translation = [ 0.0, 0.0, 0.0 ] 61 | import_rotation = [ 0.0, 0.0, 0.0 ] 62 | import_scale = 0.5 63 | align_origin_x_type = "None" 64 | align_origin_y_type = "None" 65 | align_origin_z_type = "None" 66 | parent_bone = "" 67 | import_filter = 68 | { 69 | exclude_by_default = false 70 | exception_list = [ ] 71 | } 72 | }, 73 | ] 74 | }, 75 | ] 76 | model_archetype = "" 77 | primary_associated_entity = "" 78 | anim_graph_name = "" 79 | } 80 | } -------------------------------------------------------------------------------- /Assets/models/thruster/thrusterprojector.vmdl_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/thruster/thrusterprojector.vmdl_c -------------------------------------------------------------------------------- /Assets/models/thruster/thrusterprojector.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/thruster/thrusterprojector.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/torch/torch.vmat: -------------------------------------------------------------------------------- 1 | "Layer0" 2 | { 3 | "shader" "shaders/simple.shader_c" 4 | "g_flModelTintAmount" "1.000000" 5 | "g_vColorTint" "[1.000000 1.000000 1.000000 0.000000]" 6 | "TextureColor" "models/torch/torch_color.tga" 7 | "g_flFadeExponent" "1.000000" 8 | "g_bFogEnabled" "1" 9 | "g_flDirectionalLightmapMinZ" "0.050000" 10 | "g_flDirectionalLightmapStrength" "1.000000" 11 | "g_flMetalness" "0.000000" 12 | "TextureNormal" "models/torch/torch_normal.tga" 13 | "TextureRoughness" "materials/default/default_rough.tga" 14 | "g_nScaleTexCoordUByModelScaleAxis" "0" 15 | "g_nScaleTexCoordVByModelScaleAxis" "0" 16 | "g_vTexCoordOffset" "[0.000 0.000]" 17 | "g_vTexCoordScale" "[1.000 1.000]" 18 | "g_vTexCoordScrollSpeed" "[0.000 0.000]" 19 | } 20 | -------------------------------------------------------------------------------- /Assets/models/torch/torch.vmat_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/torch/torch.vmat_c -------------------------------------------------------------------------------- /Assets/models/torch/torch.vmdl: -------------------------------------------------------------------------------- 1 | 2 | { 3 | rootNode = 4 | { 5 | _class = "RootNode" 6 | children = 7 | [ 8 | { 9 | _class = "BoneMarkupList" 10 | bone_cull_type = "None" 11 | }, 12 | { 13 | _class = "LODGroupList" 14 | children = 15 | [ 16 | { 17 | _class = "LODGroup" 18 | switch_threshold = 0.0 19 | meshes = 20 | [ 21 | "torch_bg_torch_lod0", 22 | ] 23 | }, 24 | { 25 | _class = "LODGroup" 26 | switch_threshold = 10.0 27 | meshes = 28 | [ 29 | "torch_bg_torch_lod1", 30 | ] 31 | }, 32 | { 33 | _class = "LODGroup" 34 | switch_threshold = 20.0 35 | meshes = 36 | [ 37 | "torch_bg_torch_lod2", 38 | ] 39 | }, 40 | ] 41 | }, 42 | { 43 | _class = "MaterialGroupList" 44 | children = 45 | [ 46 | { 47 | _class = "DefaultMaterialGroup" 48 | remaps = [ ] 49 | use_global_default = true 50 | global_default_material = "models/torch/torch.vmat" 51 | }, 52 | ] 53 | }, 54 | { 55 | _class = "PhysicsShapeList" 56 | children = 57 | [ 58 | { 59 | _class = "PhysicsHullFromRender" 60 | parent_bone = "" 61 | surface_prop = "default" 62 | collision_tags = "solid" 63 | faceMergeAngle = 10.0 64 | maxHullVertices = 0 65 | }, 66 | ] 67 | }, 68 | { 69 | _class = "RenderMeshList" 70 | children = 71 | [ 72 | { 73 | _class = "RenderMeshFile" 74 | name = "torch_bg_torch_lod0" 75 | filename = "models/torch/torch_refs/mesh/torch_bg_torch_lod0.dmx" 76 | import_translation = [ 0.0, 0.0, 0.0 ] 77 | import_rotation = [ 0.0, 90.0, 0.0 ] 78 | import_scale = 1.0 79 | align_origin_x_type = "None" 80 | align_origin_y_type = "None" 81 | align_origin_z_type = "None" 82 | parent_bone = "" 83 | import_filter = 84 | { 85 | exclude_by_default = false 86 | exception_list = [ ] 87 | } 88 | }, 89 | { 90 | _class = "RenderMeshFile" 91 | name = "torch_bg_torch_lod1" 92 | filename = "models/torch/torch_refs/mesh/torch_bg_torch_lod1.dmx" 93 | import_translation = [ 0.0, 0.0, 0.0 ] 94 | import_rotation = [ 0.0, 90.0, 0.0 ] 95 | import_scale = 1.0 96 | align_origin_x_type = "None" 97 | align_origin_y_type = "None" 98 | align_origin_z_type = "None" 99 | parent_bone = "" 100 | import_filter = 101 | { 102 | exclude_by_default = false 103 | exception_list = [ ] 104 | } 105 | }, 106 | { 107 | _class = "RenderMeshFile" 108 | name = "torch_bg_torch_lod2" 109 | filename = "models/torch/torch_refs/mesh/torch_bg_torch_lod2.dmx" 110 | import_translation = [ 0.0, 0.0, 0.0 ] 111 | import_rotation = [ 0.0, 90.0, 0.0 ] 112 | import_scale = 1.0 113 | align_origin_x_type = "None" 114 | align_origin_y_type = "None" 115 | align_origin_z_type = "None" 116 | parent_bone = "" 117 | import_filter = 118 | { 119 | exclude_by_default = false 120 | exception_list = [ ] 121 | } 122 | }, 123 | ] 124 | }, 125 | ] 126 | model_archetype = "" 127 | primary_associated_entity = "" 128 | anim_graph_name = "" 129 | base_model_name = "" 130 | } 131 | } -------------------------------------------------------------------------------- /Assets/models/torch/torch.vmdl_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/torch/torch.vmdl_c -------------------------------------------------------------------------------- /Assets/models/torch/torch.vmdl_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/torch/torch.vmdl_c.png -------------------------------------------------------------------------------- /Assets/models/torch/torch_color.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/torch/torch_color.tga -------------------------------------------------------------------------------- /Assets/models/torch/torch_normal.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/torch/torch_normal.tga -------------------------------------------------------------------------------- /Assets/models/torch/torch_refs/anim/_idle_0.dmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/torch/torch_refs/anim/_idle_0.dmx -------------------------------------------------------------------------------- /Assets/models/torch/torch_refs/mesh/torch_bg_torch_lod0.dmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/torch/torch_refs/mesh/torch_bg_torch_lod0.dmx -------------------------------------------------------------------------------- /Assets/models/torch/torch_refs/mesh/torch_bg_torch_lod1.dmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/torch/torch_refs/mesh/torch_bg_torch_lod1.dmx -------------------------------------------------------------------------------- /Assets/models/torch/torch_refs/mesh/torch_bg_torch_lod2.dmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/torch/torch_refs/mesh/torch_bg_torch_lod2.dmx -------------------------------------------------------------------------------- /Assets/models/torch/torch_refs/phys/torch_phy.dmx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/models/torch/torch_refs/phys/torch_phy.dmx -------------------------------------------------------------------------------- /Assets/prefabs/engine/player.prefab_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/prefabs/engine/player.prefab_c -------------------------------------------------------------------------------- /Assets/prefabs/engine/spawnpoint.prefab: -------------------------------------------------------------------------------- 1 | { 2 | "RootObject": { 3 | "__guid": "0094355f-70a9-4fa8-b9c5-863f6215fe5a", 4 | "Flags": 0, 5 | "Name": "spawnpoint", 6 | "Enabled": true, 7 | "Components": [ 8 | { 9 | "__type": "Sandbox.SpawnPoint", 10 | "__guid": "915d052f-cb2b-4187-b743-f4a329210e23", 11 | "Color": "0.8902,0.31765,0.05098,1", 12 | "OnComponentDestroy": null, 13 | "OnComponentDisabled": null, 14 | "OnComponentEnabled": null, 15 | "OnComponentFixedUpdate": null, 16 | "OnComponentStart": null, 17 | "OnComponentUpdate": null 18 | } 19 | ], 20 | "Children": [], 21 | "__variables": [], 22 | "__properties": { 23 | "FixedUpdateFrequency": 50, 24 | "MaxFixedUpdates": 5, 25 | "NetworkFrequency": 30, 26 | "NetworkInterpolation": true, 27 | "PhysicsSubSteps": 1, 28 | "ThreadedAnimation": true, 29 | "TimeScale": 1, 30 | "UseFixedUpdate": true, 31 | "Metadata": {}, 32 | "NavMesh": { 33 | "Enabled": false, 34 | "IncludeStaticBodies": true, 35 | "IncludeKeyframedBodies": true, 36 | "EditorAutoUpdate": true, 37 | "AgentHeight": 64, 38 | "AgentRadius": 16, 39 | "AgentStepSize": 18, 40 | "AgentMaxSlope": 40, 41 | "ExcludedBodies": "", 42 | "IncludedBodies": "" 43 | } 44 | } 45 | }, 46 | "ShowInMenu": true, 47 | "MenuPath": "Deathmatch/Spawn Point", 48 | "MenuIcon": null, 49 | "DontBreakAsTemplate": false, 50 | "ResourceVersion": 1, 51 | "__references": [], 52 | "__version": 1 53 | } -------------------------------------------------------------------------------- /Assets/prefabs/engine/spawnpoint.prefab_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/prefabs/engine/spawnpoint.prefab_c -------------------------------------------------------------------------------- /Assets/prefabs/weapons/physgun/physgun.prefab_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/prefabs/weapons/physgun/physgun.prefab_c -------------------------------------------------------------------------------- /Assets/prefabs/weapons/physgun/physgun_vm.prefab_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/prefabs/weapons/physgun/physgun_vm.prefab_c -------------------------------------------------------------------------------- /Assets/prefabs/weapons/physgun/physgun_wm.prefab_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/prefabs/weapons/physgun/physgun_wm.prefab_c -------------------------------------------------------------------------------- /Assets/prefabs/weapons/pistol/pistol.prefab: -------------------------------------------------------------------------------- 1 | { 2 | "RootObject": { 3 | "__guid": "3c948bf4-5353-443a-bb65-8f28584fed1b", 4 | "__version": 1, 5 | "Flags": 0, 6 | "Name": "pistol", 7 | "Position": "0,0,0", 8 | "Rotation": "0,0,0,1", 9 | "Scale": "1,1,1", 10 | "Tags": "", 11 | "Enabled": true, 12 | "NetworkMode": 1, 13 | "NetworkInterpolation": true, 14 | "NetworkOrphaned": 1, 15 | "OwnerTransfer": 1, 16 | "Components": [ 17 | { 18 | "__type": "Pistol", 19 | "__guid": "eec77653-ee7e-42ab-8ff6-54ac3c9159cb", 20 | "__enabled": true, 21 | "CanCancelReload": true, 22 | "Damage": 12, 23 | "DeployTime": 0.5, 24 | "DisplayIcon": null, 25 | "DisplayName": "Pistol", 26 | "HoldType": "Pistol", 27 | "IncrementalReloading": false, 28 | "InventoryOrder": 0, 29 | "InventorySlot": 0, 30 | "OnComponentDestroy": null, 31 | "OnComponentDisabled": null, 32 | "OnComponentEnabled": null, 33 | "OnComponentFixedUpdate": null, 34 | "OnComponentStart": null, 35 | "OnComponentUpdate": null, 36 | "ParentBone": "hold_r", 37 | "PrimaryFireRate": 0.15, 38 | "ShootSound": "sounds/weapons/rust_pistol/rust_pistol.shoot.sound", 39 | "Value": 0, 40 | "ViewModelPrefab": { 41 | "_type": "gameobject", 42 | "prefab": "prefabs/weapons/pistol/pistol_vm.prefab" 43 | }, 44 | "WorldModelPrefab": { 45 | "_type": "gameobject", 46 | "prefab": "prefabs/weapons/pistol/pistol_wm.prefab" 47 | } 48 | } 49 | ], 50 | "Children": [], 51 | "__properties": { 52 | "NetworkInterpolation": true, 53 | "TimeScale": 1, 54 | "WantsSystemScene": true, 55 | "Metadata": {}, 56 | "NavMesh": { 57 | "Enabled": false, 58 | "IncludeStaticBodies": true, 59 | "IncludeKeyframedBodies": true, 60 | "EditorAutoUpdate": true, 61 | "AgentHeight": 64, 62 | "AgentRadius": 16, 63 | "AgentStepSize": 18, 64 | "AgentMaxSlope": 40, 65 | "ExcludedBodies": "", 66 | "IncludedBodies": "" 67 | } 68 | }, 69 | "__variables": [] 70 | }, 71 | "ResourceVersion": 2, 72 | "ShowInMenu": false, 73 | "MenuPath": null, 74 | "MenuIcon": null, 75 | "DontBreakAsTemplate": false, 76 | "__references": [], 77 | "__version": 2 78 | } -------------------------------------------------------------------------------- /Assets/prefabs/weapons/pistol/pistol.prefab_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/prefabs/weapons/pistol/pistol.prefab_c -------------------------------------------------------------------------------- /Assets/prefabs/weapons/pistol/pistol_vm.prefab_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/prefabs/weapons/pistol/pistol_vm.prefab_c -------------------------------------------------------------------------------- /Assets/prefabs/weapons/pistol/pistol_wm.prefab_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/prefabs/weapons/pistol/pistol_wm.prefab_c -------------------------------------------------------------------------------- /Assets/scenes/engine.scene_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/scenes/engine.scene_c -------------------------------------------------------------------------------- /Assets/scenes/game.scene: -------------------------------------------------------------------------------- 1 | { 2 | "__guid": "325a4042-0696-43dd-a79d-dcc314299ba3", 3 | "GameObjects": [ 4 | { 5 | "__guid": "7fb737f4-2c96-435c-858f-d70e2e78e0f0", 6 | "__version": 1, 7 | "Flags": 0, 8 | "Name": "Scene Information", 9 | "Position": "0,0,0", 10 | "Rotation": "0,0,0,1", 11 | "Scale": "1,1,1", 12 | "Tags": "", 13 | "Enabled": true, 14 | "NetworkMode": 2, 15 | "NetworkInterpolation": true, 16 | "NetworkOrphaned": 0, 17 | "OwnerTransfer": 1, 18 | "Components": [ 19 | { 20 | "__type": "Sandbox.SceneInformation", 21 | "__guid": "59649f2d-7b25-4d13-bcdc-00585be999cd", 22 | "__enabled": true, 23 | "Author": null, 24 | "Changes": null, 25 | "Description": null, 26 | "Group": null, 27 | "OnComponentDestroy": null, 28 | "OnComponentDisabled": null, 29 | "OnComponentEnabled": null, 30 | "OnComponentFixedUpdate": null, 31 | "OnComponentStart": null, 32 | "OnComponentUpdate": null, 33 | "SceneTags": null, 34 | "Title": "game", 35 | "Version": null 36 | } 37 | ], 38 | "Children": [] 39 | }, 40 | { 41 | "__guid": "f7192e2f-1093-4cca-a93c-40cb86e20686", 42 | "__version": 1, 43 | "Flags": 0, 44 | "Name": "Map Loader", 45 | "Position": "0,0,0", 46 | "Rotation": "0,0,0,1", 47 | "Scale": "1,1,1", 48 | "Tags": "", 49 | "Enabled": true, 50 | "NetworkMode": 2, 51 | "NetworkInterpolation": true, 52 | "NetworkOrphaned": 0, 53 | "OwnerTransfer": 1, 54 | "Components": [ 55 | { 56 | "__type": "Sandbox.MapInstance", 57 | "__guid": "50042ecd-9dd2-457a-837c-0cda534d9eb8", 58 | "__enabled": true, 59 | "__version": 1, 60 | "EnableCollision": true, 61 | "MapName": "softsplit.gm_bigcity", 62 | "NoOrigin": false, 63 | "OnComponentDestroy": null, 64 | "OnComponentDisabled": null, 65 | "OnComponentEnabled": null, 66 | "OnComponentFixedUpdate": null, 67 | "OnComponentStart": null, 68 | "OnComponentUpdate": null, 69 | "OnMapLoaded": null, 70 | "OnMapUnloaded": null, 71 | "UseMapFromLaunch": true 72 | } 73 | ], 74 | "Children": [] 75 | } 76 | ], 77 | "SceneProperties": { 78 | "NetworkInterpolation": true, 79 | "TimeScale": 1, 80 | "WantsSystemScene": true, 81 | "Metadata": { 82 | "Title": "game" 83 | }, 84 | "NavMesh": { 85 | "Enabled": true, 86 | "IncludeStaticBodies": true, 87 | "IncludeKeyframedBodies": true, 88 | "EditorAutoUpdate": true, 89 | "AgentHeight": 64, 90 | "AgentRadius": 16, 91 | "AgentStepSize": 18, 92 | "AgentMaxSlope": 40, 93 | "ExcludedBodies": "", 94 | "IncludedBodies": "" 95 | } 96 | }, 97 | "ResourceVersion": 3, 98 | "Title": "game", 99 | "Description": null, 100 | "__references": [], 101 | "__version": 3 102 | } -------------------------------------------------------------------------------- /Assets/scenes/game.scene_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/scenes/game.scene_c -------------------------------------------------------------------------------- /Assets/scenes/menu.scene_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/scenes/menu.scene_c -------------------------------------------------------------------------------- /Assets/sounds/balloon_pop_cute.sound: -------------------------------------------------------------------------------- 1 | { 2 | "sounds": 3 | [ 4 | "sounds/balloon_pop_cute.vsnd" 5 | ], 6 | "UI": false, 7 | "Volume": 1.000000, 8 | "VolumeRandom": 0.000000, 9 | "Pitch": 1.000000, 10 | "PitchRandom": 0.000000, 11 | "DistanceMax": 500.000000 12 | } -------------------------------------------------------------------------------- /Assets/sounds/balloon_pop_cute.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/balloon_pop_cute.sound_c -------------------------------------------------------------------------------- /Assets/sounds/balloon_pop_cute.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/balloon_pop_cute.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/balloon_pop_cute.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/balloon_pop_cute.wav -------------------------------------------------------------------------------- /Assets/sounds/flashlight-off.sound: -------------------------------------------------------------------------------- 1 | { 2 | "sounds": 3 | [ 4 | "sounds/flashlight-off.vsnd" 5 | ], 6 | "UI": false, 7 | "Volume": 1.000000, 8 | "VolumeRandom": 0.000000, 9 | "Pitch": 1.000000, 10 | "PitchRandom": 0.000000, 11 | "DistanceMax": 500.000000 12 | } -------------------------------------------------------------------------------- /Assets/sounds/flashlight-off.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/flashlight-off.sound_c -------------------------------------------------------------------------------- /Assets/sounds/flashlight-off.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/flashlight-off.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/flashlight-off.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/flashlight-off.wav -------------------------------------------------------------------------------- /Assets/sounds/flashlight-on.sound: -------------------------------------------------------------------------------- 1 | { 2 | "sounds": 3 | [ 4 | "sounds/flashlight-on.vsnd" 5 | ], 6 | "UI": false, 7 | "Volume": 1.000000, 8 | "VolumeRandom": 0.000000, 9 | "Pitch": 1.000000, 10 | "PitchRandom": 0.000000, 11 | "DistanceMax": 1000.000000 12 | } -------------------------------------------------------------------------------- /Assets/sounds/flashlight-on.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/flashlight-on.sound_c -------------------------------------------------------------------------------- /Assets/sounds/flashlight-on.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/flashlight-on.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/flashlight-on.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/flashlight-on.wav -------------------------------------------------------------------------------- /Assets/sounds/kersplat.sound: -------------------------------------------------------------------------------- 1 | { 2 | "sounds": 3 | [ 4 | "sounds/kersplat.vsnd" 5 | ], 6 | "UI": false, 7 | "Volume": 1.000000, 8 | "VolumeRandom": 0.000000, 9 | "Pitch": 1.000000, 10 | "PitchRandom": 0.050000, 11 | "DistanceMax": 1000.000000 12 | } -------------------------------------------------------------------------------- /Assets/sounds/kersplat.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/kersplat.sound_c -------------------------------------------------------------------------------- /Assets/sounds/kersplat.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/kersplat.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/kersplat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/kersplat.wav -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_flashlight/flashlight-attack.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_flashlight/flashlight-attack.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_flashlight/rust_flashlight.attack.sound: -------------------------------------------------------------------------------- 1 | { 2 | "UI": false, 3 | "Volume": "0.2", 4 | "Pitch": "1", 5 | "Decibels": 80, 6 | "SelectionMode": "Random", 7 | "Sounds": [ 8 | "sounds/weapons/rust_flashlight/flashlight-attack.vsnd" 9 | ], 10 | "Occlusion": true, 11 | "AirAbsorption": true, 12 | "Transmission": true, 13 | "OcclusionRadius": 64, 14 | "DistanceAttenuation": true, 15 | "Distance": 15000, 16 | "Falloff": [ 17 | { 18 | "x": 0, 19 | "y": 1, 20 | "in": 0, 21 | "out": -1.8, 22 | "mode": "Mirrored" 23 | }, 24 | { 25 | "x": 0.05, 26 | "y": 0.22, 27 | "in": 3.5, 28 | "out": -3.5, 29 | "mode": "Mirrored" 30 | }, 31 | { 32 | "x": 0.2, 33 | "y": 0.04, 34 | "in": 0.16, 35 | "out": -0.16, 36 | "mode": "Mirrored" 37 | }, 38 | { 39 | "x": 1, 40 | "y": 0, 41 | "in": 0, 42 | "out": 0, 43 | "mode": "Mirrored" 44 | } 45 | ], 46 | "DefaultMixer": { 47 | "Name": "unknown", 48 | "Id": "00000000-0000-0000-0000-000000000000" 49 | }, 50 | "__references": [], 51 | "__version": 1 52 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_flashlight/rust_flashlight.attack.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_flashlight/rust_flashlight.attack.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/eject_clip.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/eject_clip.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/fire-alt-distant.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/fire-alt-distant.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/fire-alt-far-distant.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/fire-alt-far-distant.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/fire-alt.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/fire-alt.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/grab_clip.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/grab_clip.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/insert_clip.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/insert_clip.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/revolver-deploy.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/revolver-deploy.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/revolver-dryfire.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/revolver-dryfire.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/rust_pistol.shoot.sound: -------------------------------------------------------------------------------- 1 | { 2 | "UI": false, 3 | "Volume": "0.31", 4 | "Pitch": "1.1", 5 | "Decibels": 140, 6 | "SelectionMode": "Random", 7 | "Sounds": [ 8 | "sounds/weapons/rust_pistol/fire-alt.vsnd" 9 | ], 10 | "Occlusion": true, 11 | "AirAbsorption": true, 12 | "Transmission": true, 13 | "OcclusionRadius": 64, 14 | "DistanceAttenuation": true, 15 | "Distance": 15000, 16 | "Falloff": [ 17 | { 18 | "x": 0, 19 | "y": 1, 20 | "in": 0, 21 | "out": -1.8, 22 | "mode": "Mirrored" 23 | }, 24 | { 25 | "x": 0.05, 26 | "y": 0.22, 27 | "in": 3.5, 28 | "out": -3.5, 29 | "mode": "Mirrored" 30 | }, 31 | { 32 | "x": 0.2, 33 | "y": 0.04, 34 | "in": 0.16, 35 | "out": -0.16, 36 | "mode": "Mirrored" 37 | }, 38 | { 39 | "x": 1, 40 | "y": 0, 41 | "in": 0, 42 | "out": 0, 43 | "mode": "Mirrored" 44 | } 45 | ], 46 | "DefaultMixer": { 47 | "Name": "unknown", 48 | "Id": "00000000-0000-0000-0000-000000000000" 49 | }, 50 | "__references": [], 51 | "__version": 1 52 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/rust_pistol.shoot.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/rust_pistol.shoot.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/semi-pistol-attack-silenced.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/semi-pistol-attack-silenced.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/slide_back.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/slide_back.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pistol/slide_shut.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pistol/slide_shut.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-attack-distant.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-attack-distant.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-attack-far-distant.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-attack-far-distant.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-attack-silenced.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-attack-silenced.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-attack.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-attack.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-deploy-2.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-deploy-2.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-deploy-3p.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-deploy-3p.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-deploy.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-deploy.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-dryfire.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-dryfire.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-flip_over.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-flip_over.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-insert_shell-1.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-insert_shell-1.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-insert_shell-2.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-insert_shell-2.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-pump-forward.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-pump-forward.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-pumpaction.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-pumpaction.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-reload-start.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun-reload-start.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.insert.sound: -------------------------------------------------------------------------------- 1 | { 2 | "volume": 0.300000, 3 | "sounds": 4 | [ 5 | "weapons/rust_pumpshotgun/sounds/rust_pumpshotgun-insert_shell-1.vsnd" 6 | ], 7 | "VolumeRandom": 0.000000, 8 | "Pitch": 0.800000, 9 | "PitchRandom": 0.000000, 10 | "DistanceMax": 10000.000000 11 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.insert.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.insert.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.pump.sound: -------------------------------------------------------------------------------- 1 | { 2 | "volume": 0.300000, 3 | "sounds": 4 | [ 5 | "weapons/rust_pumpshotgun/sounds/rust_pumpshotgun-pumpaction.vsnd" 6 | ], 7 | "VolumeRandom": 0.000000, 8 | "Pitch": 0.900000, 9 | "PitchRandom": 0.100000, 10 | "DistanceMax": 10000.000000 11 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.pump.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.pump.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.pumpslow.sound: -------------------------------------------------------------------------------- 1 | { 2 | "volume": 0.400000, 3 | "sounds": 4 | [ 5 | "weapons/rust_pumpshotgun/sounds/rust_pumpshotgun-pumpaction.vsnd" 6 | ], 7 | "VolumeRandom": 0.000000, 8 | "Pitch": 0.700000, 9 | "PitchRandom": 0.000000, 10 | "DistanceMax": 10000.000000 11 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.pumpslow.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.pumpslow.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.shoot.sound: -------------------------------------------------------------------------------- 1 | { 2 | "UI": false, 3 | "Volume": 0.400000, 4 | "VolumeRandom": 0, 5 | "Pitch": 2, 6 | "PitchRandom": 0, 7 | "Decibels": 160, 8 | "Sounds": 9 | [ 10 | "weapons/rust_pumpshotgun/sounds/rust_pumpshotgun-attack.vsnd" 11 | ], 12 | "SelectionMode": 3, 13 | "MaximumDistance": 5841.285600, 14 | "MinimumDistance": 292.064300 15 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.shoot.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.shoot.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.shootdouble.sound: -------------------------------------------------------------------------------- 1 | { 2 | "UI": false, 3 | "Volume": 0.500000, 4 | "VolumeRandom": 0, 5 | "Pitch": 1, 6 | "PitchRandom": 0, 7 | "Decibels": 160, 8 | "Sounds": 9 | [ 10 | "weapons/rust_pumpshotgun/sounds/rust_pumpshotgun-attack.vsnd" 11 | ], 12 | "SelectionMode": 3, 13 | "MaximumDistance": 5841.285600, 14 | "MinimumDistance": 292.064300 15 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.shootdouble.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_pumpshotgun/rust_pumpshotgun.shootdouble.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.boltback.sound: -------------------------------------------------------------------------------- 1 | { 2 | "volume": 0.200000, 3 | "sounds": 4 | [ 5 | "weapons/rust_smg/sounds/rust_smg_boltback.vsnd" 6 | ], 7 | "VolumeRandom": 0.000000, 8 | "Pitch": 0.900000, 9 | "PitchRandom": 0.000000, 10 | "DistanceMax": 10000.000000 11 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.boltback.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg.boltback.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.boltshut.sound: -------------------------------------------------------------------------------- 1 | { 2 | "volume": 0.300000, 3 | "sounds": 4 | [ 5 | "weapons/rust_smg/sounds/rust_smg_boltshut.vsnd" 6 | ], 7 | "VolumeRandom": 0.000000, 8 | "Pitch": 0.800000, 9 | "PitchRandom": 0.000000, 10 | "DistanceMax": 10000.000000 11 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.boltshut.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg.boltshut.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.clipin.sound: -------------------------------------------------------------------------------- 1 | { 2 | "volume": 0.300000, 3 | "sounds": 4 | [ 5 | "weapons/rust_smg/sounds/rust_smg_clipin.vsnd" 6 | ], 7 | "VolumeRandom": 0.000000, 8 | "Pitch": 0.800000, 9 | "PitchRandom": 0.000000, 10 | "DistanceMax": 10000.000000 11 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.clipin.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg.clipin.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.clipout.sound: -------------------------------------------------------------------------------- 1 | { 2 | "volume": 0.300000, 3 | "sounds": 4 | [ 5 | "weapons/rust_smg/sounds/rust_smg_clipout.vsnd" 6 | ], 7 | "VolumeRandom": 0.000000, 8 | "Pitch": 0.800000, 9 | "PitchRandom": 0.000000, 10 | "DistanceMax": 10000.000000 11 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.clipout.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg.clipout.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.deploy.sound: -------------------------------------------------------------------------------- 1 | { 2 | "volume": 0.100000, 3 | "sounds": 4 | [ 5 | "weapons/rust_smg/sounds/rust_smg_deploy.vsnd" 6 | ], 7 | "VolumeRandom": 0.000000, 8 | "Pitch": 1.100000, 9 | "PitchRandom": 0.000000, 10 | "DistanceMax": 10000.000000 11 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.deploy.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg.deploy.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.dryfire.sound: -------------------------------------------------------------------------------- 1 | { 2 | "volume": 0.400000, 3 | "sounds": 4 | [ 5 | "weapons/rust_pistol/sound/fire-alt.vsnd" 6 | ], 7 | "VolumeRandom": 0.000000, 8 | "Pitch": 1.100000, 9 | "PitchRandom": 0.000000, 10 | "DistanceMax": 10000.000000 11 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.dryfire.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg.dryfire.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.reloadstart.sound: -------------------------------------------------------------------------------- 1 | { 2 | "volume": 0.400000, 3 | "sounds": 4 | [ 5 | "weapons/rust_smg/sounds/rust_smg_reloadstart.vsnd" 6 | ], 7 | "VolumeRandom": 0.000000, 8 | "Pitch": 1.100000, 9 | "PitchRandom": 0.000000, 10 | "DistanceMax": 10000.000000 11 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.reloadstart.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg.reloadstart.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.shoot.sound: -------------------------------------------------------------------------------- 1 | { 2 | "UI": false, 3 | "Volume": 0.400000, 4 | "VolumeRandom": 0, 5 | "Pitch": 1.100000, 6 | "PitchRandom": 0, 7 | "Decibels": 135, 8 | "Sounds": 9 | [ 10 | "weapons/rust_smg/sounds/rust_smg_attack.vsnd" 11 | ], 12 | "SelectionMode": 3, 13 | "MaximumDistance": 4167.711400, 14 | "MinimumDistance": 208.385570 15 | } -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg.shoot.sound_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg.shoot.sound_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_attack.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_attack.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_attackdistant.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_attackdistant.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_attackfardistant.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_attackfardistant.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_attacksilenced.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_attacksilenced.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_boltback.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_boltback.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_boltshut.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_boltshut.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_clipin.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_clipin.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_clipout.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_clipout.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_deploy.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_deploy.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_deploy3p.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_deploy3p.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_dryfire.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_dryfire.vsnd_c -------------------------------------------------------------------------------- /Assets/sounds/weapons/rust_smg/rust_smg_reloadstart.vsnd_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/sounds/weapons/rust_smg/rust_smg_reloadstart.vsnd_c -------------------------------------------------------------------------------- /Assets/surfaces/car.surface: -------------------------------------------------------------------------------- 1 | { 2 | "BaseSurface": "surfaces/metal.surface", 3 | "AudioMaterial": null, 4 | "Description": "", 5 | "Friction": 0.075000, 6 | "Elasticity": 0, 7 | "Density": 2000, 8 | "Thickness": -1, 9 | "Dampening": 0, 10 | "BounceThreshold": 0, 11 | "ImpactEffects": 12 | { 13 | "Regular": 14 | [ 15 | ], 16 | "Bullet": 17 | [ 18 | ], 19 | "BulletDecal": 20 | [ 21 | ] 22 | }, 23 | "Sounds": 24 | { 25 | "RoughScrape": "" 26 | }, 27 | "Breakables": 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Assets/surfaces/car.surface_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Softsplit/sandbox-classic/29d9410c68c1600d86dff8e34db874aa60b04789/Assets/surfaces/car.surface_c -------------------------------------------------------------------------------- /Code/Assembly.cs: -------------------------------------------------------------------------------- 1 | global using Sandbox; 2 | global using Sandbox.Diagnostics; 3 | global using System; 4 | global using System.Collections.Generic; 5 | global using System.Linq; 6 | global using System.Threading.Tasks; 7 | -------------------------------------------------------------------------------- /Code/Game/Weapon/BaseBulletWeapon/BaseBulletWeapon.cs: -------------------------------------------------------------------------------- 1 | public partial class BaseBulletWeapon : BaseWeapon 2 | { 3 | [Property] 4 | public SoundEvent ShootSound { get; set; } 5 | 6 | protected TimeSince TimeSinceShoot = 0f; 7 | private bool queuedShot = false; 8 | 9 | /// 10 | /// Useful utility method that queues an input, for guns like pistols if you shoot too infrequently it'll feel like the fire rate is inconsistent. 11 | /// 12 | /// 13 | /// 14 | /// 15 | protected bool IsInputQueued( Func inputCheck, float fireRate ) 16 | { 17 | if ( inputCheck.Invoke() ) 18 | { 19 | if ( TimeSinceShoot >= fireRate ) 20 | { 21 | return true; 22 | } 23 | else 24 | { 25 | queuedShot = true; 26 | } 27 | } 28 | 29 | if ( queuedShot && TimeSinceShoot >= fireRate ) 30 | { 31 | TimeSinceShoot = 0f; 32 | queuedShot = false; 33 | return true; 34 | } 35 | 36 | return false; 37 | } 38 | 39 | [Rpc.Broadcast] 40 | public void ShootEffects( Vector3 hitpoint, bool hit, Vector3 normal, GameObject hitObject, Surface hitSurface, Vector3? origin = null, bool noEvents = false ) 41 | { 42 | if ( Application.IsDedicatedServer ) return; 43 | 44 | if ( !Owner.IsValid() ) 45 | return; 46 | 47 | Owner.Controller.Renderer.Set( "b_attack", true ); 48 | 49 | if ( !noEvents ) 50 | { 51 | var ev = new IWeaponEvent.AttackEvent( ViewModel.IsValid() ); 52 | IWeaponEvent.PostToGameObject( GameObject.Root, x => x.OnAttack( ev ) ); 53 | IWeaponEvent.PostToGameObject( GameObject.Root, x => x.CreateRangedEffects( this, hitpoint, origin ) ); 54 | 55 | if ( ShootSound.IsValid() ) 56 | { 57 | var snd = GameObject.PlaySound( ShootSound ); 58 | // If we're shooting, the sound should not be spatialized 59 | if ( Owner.IsLocalPlayer && snd.IsValid() ) 60 | { 61 | snd.SpacialBlend = 0; 62 | } 63 | } 64 | } 65 | 66 | if ( hit ) 67 | { 68 | var prefab = hitSurface.PrefabCollection.BulletImpact; 69 | prefab ??= hitSurface.GetBaseSurface()?.PrefabCollection.BulletImpact; 70 | 71 | if ( prefab is not null ) 72 | { 73 | var fwd = Rotation.LookAt( normal * -1.0f, Vector3.Random ); 74 | 75 | var impact = prefab.Clone(); 76 | impact.WorldPosition = hitpoint; 77 | impact.WorldRotation = fwd; 78 | impact.SetParent( hitObject, true ); 79 | 80 | Sound.Play( hitSurface.SoundCollection.Bullet, impact.WorldPosition ); 81 | } 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Code/Game/Weapon/BaseCarriable/BaseCarriable.ViewModel.cs: -------------------------------------------------------------------------------- 1 | public partial class BaseCarriable : Component 2 | { 3 | [Property, Feature( "ViewModel" )] public GameObject ViewModelPrefab { get; set; } 4 | 5 | protected void CreateViewModel() 6 | { 7 | if ( ViewModel.IsValid() ) 8 | return; 9 | 10 | DestroyViewModel(); 11 | 12 | if ( ViewModelPrefab is null ) 13 | return; 14 | 15 | var player = Owner; 16 | if ( player is null || player.Controller is null || player.Controller.Renderer is null || !player.IsLocalPlayer ) return; 17 | 18 | ViewModel = ViewModelPrefab.Clone( new CloneConfig { Parent = GameObject, StartEnabled = false, Transform = global::Transform.Zero } ); 19 | ViewModel.Flags |= GameObjectFlags.NotSaved | GameObjectFlags.NotNetworked | GameObjectFlags.Absolute; 20 | ViewModel.Enabled = true; 21 | ViewModel.Tags.Add( "firstperson", "viewmodel" ); 22 | 23 | var vm = ViewModel.GetComponent(); 24 | 25 | if ( vm.IsValid() ) 26 | vm.Deploy(); 27 | } 28 | 29 | protected void DestroyViewModel() 30 | { 31 | if ( !ViewModel.IsValid() ) 32 | return; 33 | 34 | ViewModel?.Destroy(); 35 | ViewModel = default; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Code/Game/Weapon/BaseCarriable/BaseCarriable.WorldModel.cs: -------------------------------------------------------------------------------- 1 | using Sandbox.Citizen; 2 | 3 | public partial class BaseCarriable : Component 4 | { 5 | public interface IEvent : ISceneEvent 6 | { 7 | public void OnCreateWorldModel() { } 8 | public void OnDestroyWorldModel() { } 9 | } 10 | 11 | [Property, Feature( "WorldModel" )] public GameObject WorldModelPrefab { get; set; } 12 | [Property, Feature( "WorldModel" )] public CitizenAnimationHelper.HoldTypes HoldType { get; set; } = CitizenAnimationHelper.HoldTypes.HoldItem; 13 | [Property, Feature( "WorldModel" )] public string ParentBone { get; set; } = "hold_r"; 14 | 15 | protected void CreateWorldModel() 16 | { 17 | DestroyWorldModel(); 18 | 19 | if ( WorldModelPrefab is null ) 20 | return; 21 | 22 | var player = GetComponentInParent(); 23 | if ( player is null || player.Renderer is null ) return; 24 | 25 | var parentBone = player.Renderer.GetBoneObject( ParentBone ); 26 | 27 | WorldModel = WorldModelPrefab.Clone( new CloneConfig { Parent = parentBone, StartEnabled = false, Transform = global::Transform.Zero } ); 28 | WorldModel.Flags |= GameObjectFlags.NotSaved | GameObjectFlags.NotNetworked; 29 | WorldModel.Enabled = true; 30 | 31 | IEvent.PostToGameObject( WorldModel, x => x.OnCreateWorldModel() ); 32 | } 33 | 34 | protected void DestroyWorldModel() 35 | { 36 | if ( WorldModel.IsValid() ) 37 | { 38 | IEvent.PostToGameObject( WorldModel, x => x.OnDestroyWorldModel() ); 39 | } 40 | 41 | WorldModel?.Destroy(); 42 | WorldModel = default; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Code/Game/Weapon/BaseWeapon/BaseWeapon.Events.cs: -------------------------------------------------------------------------------- 1 | public partial class BaseWeapon 2 | { 3 | [Rpc.Broadcast] 4 | protected virtual void StartAttack() 5 | { 6 | var ev = new IWeaponEvent.AttackEvent( ViewModel.IsValid() ); 7 | IWeaponEvent.PostToGameObject( GameObject.Root, x => x.OnAttackStart( ev ) ); 8 | } 9 | 10 | [Rpc.Broadcast] 11 | protected virtual void StopAttack() 12 | { 13 | IWeaponEvent.PostToGameObject( GameObject.Root, x => x.OnAttackStop() ); 14 | } 15 | 16 | /// 17 | /// Events related to weapons 18 | /// 19 | public interface IWeaponEvent : ISceneEvent 20 | { 21 | /// 22 | /// Data structure that holds simple information when we shoot 23 | /// 24 | public record struct AttackEvent( bool IsFirstPerson ); 25 | 26 | /// 27 | /// Called when we start firing (if we're firing automatic, it should only call when we press the attack key) 28 | /// 29 | /// 30 | void OnAttackStart( AttackEvent e ) { } 31 | 32 | /// 33 | /// Called when we stop firing (release the attack key) 34 | /// 35 | void OnAttackStop() { } 36 | 37 | /// 38 | /// Called for every attack (NOT including each pellet for something like a shotgun - so once per shot) 39 | /// 40 | /// 41 | void OnAttack( AttackEvent e ) { } 42 | 43 | /// 44 | /// Called for every ranged attack to create effects for the shot (eg tracers) 45 | /// 46 | void CreateRangedEffects( BaseWeapon weapon, Vector3 hitpoint, Vector3? origin = null ) { } 47 | 48 | /// 49 | /// Called when we start reloading a weapon 50 | /// 51 | void OnReloadStart() { } 52 | 53 | /// 54 | /// Called when we successfully finish reloading a weapon 55 | /// 56 | void OnReloadFinish() { } 57 | 58 | /// 59 | /// Called when we reload incrementally 60 | /// 61 | void OnIncrementalReload() { } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Code/Game/Weapon/BaseWeapon/BaseWeapon.Reloading.cs: -------------------------------------------------------------------------------- 1 | public partial class BaseWeapon 2 | { 3 | private bool isReloading; 4 | 5 | public bool CanReload() 6 | { 7 | if ( isReloading ) return false; 8 | 9 | var owner = Owner; 10 | if ( !owner.IsValid() ) 11 | return false; 12 | 13 | return true; 14 | } 15 | 16 | public bool IsReloading() => isReloading; 17 | 18 | public virtual async void OnReloadStart() 19 | { 20 | if ( !CanReload() ) 21 | return; 22 | 23 | if ( isReloading ) 24 | return; 25 | 26 | isReloading = true; 27 | await ReloadAsync(); 28 | } 29 | 30 | [Rpc.Broadcast] 31 | private void BroadcastReload() 32 | { 33 | if ( !Owner.IsValid() ) return; 34 | 35 | Assert.True( Owner.Controller.IsValid(), "BaseWeapon::BroadcastReload - Player Controller is invalid!" ); 36 | Assert.True( Owner.Controller.Renderer.IsValid(), "BaseWeapon::BroadcastReload - Renderer is invalid!" ); 37 | 38 | Owner.Controller.Renderer.Set( "b_reload", true ); 39 | } 40 | 41 | protected virtual async Task ReloadAsync() 42 | { 43 | try 44 | { 45 | IWeaponEvent.PostToGameObject( ViewModel, x => x.OnReloadStart() ); 46 | 47 | BroadcastReload(); 48 | 49 | await Task.Delay( (int)(ReloadTime * 1000) ); 50 | } 51 | finally 52 | { 53 | isReloading = false; 54 | 55 | IWeaponEvent.PostToGameObject( ViewModel, x => x.OnReloadFinish() ); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Code/Game/Weapon/BaseWeapon/BaseWeapon.cs: -------------------------------------------------------------------------------- 1 | public partial class BaseWeapon : BaseCarriable 2 | { 3 | /// 4 | /// How long after deploying a weapon can you not shoot a gun? 5 | /// 6 | [Property] public float DeployTime { get; set; } = 0.5f; 7 | 8 | /// 9 | /// How long the reload takes in seconds 10 | /// 11 | [Property] public float ReloadTime { get; set; } = 2.0f; 12 | 13 | /// 14 | /// How long until we can shoot again 15 | /// 16 | protected TimeUntil TimeUntilNextShotAllowed; 17 | 18 | /// 19 | /// Adds a delay, making it so we can't shoot for the specified time 20 | /// 21 | /// 22 | public void AddShootDelay( float seconds ) 23 | { 24 | TimeUntilNextShotAllowed = seconds; 25 | } 26 | 27 | protected override void OnEnabled() 28 | { 29 | base.OnEnabled(); 30 | 31 | AddShootDelay( DeployTime ); 32 | } 33 | 34 | public override void OnAdded( Player player ) 35 | { 36 | base.OnAdded( player ); 37 | } 38 | 39 | /// 40 | /// Are we allowed to shoot this weapon? Can be overriden per-weapon 41 | /// 42 | /// 43 | public virtual bool CanShoot() 44 | { 45 | if ( IsReloading() ) return false; 46 | if ( TimeUntilNextShotAllowed > 0 ) return false; 47 | 48 | return true; 49 | } 50 | 51 | public override void OnPlayerUpdate( Player player ) 52 | { 53 | if ( player is null ) return; 54 | 55 | if ( !player.Controller.ThirdPerson ) 56 | { 57 | CreateViewModel(); 58 | } 59 | else 60 | { 61 | DestroyViewModel(); 62 | } 63 | 64 | GameObject.NetworkInterpolation = false; 65 | 66 | if ( !player.IsLocalPlayer ) 67 | return; 68 | 69 | OnControl( player ); 70 | } 71 | 72 | public override void OnControl( Player player ) 73 | { 74 | if ( CanReload() && Input.Pressed( "reload" ) ) 75 | { 76 | OnReloadStart(); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Code/Game/Weapon/WeaponModel/ViewModel.Throwables.cs: -------------------------------------------------------------------------------- 1 | using static BaseWeapon; 2 | 3 | public partial class ViewModel 4 | { 5 | /// 6 | /// Throwable type 7 | /// 8 | public enum Throwable 9 | { 10 | HEGrenade, 11 | SmokeGrenade, 12 | StunGrenade, 13 | Molotov, 14 | Flashbang 15 | } 16 | 17 | /// 18 | /// Is this a throwable? 19 | /// 20 | [Property, FeatureEnabled( "Throwables" )] public bool IsThrowable { get; set; } 21 | 22 | /// 23 | /// The throwable type 24 | /// 25 | [Property, Feature( "Throwables" )] public Throwable ThrowableType { get; set; } 26 | 27 | protected override void OnEnabled() 28 | { 29 | if ( IsThrowable ) 30 | { 31 | Renderer?.Set( "throwable_type", (int)ThrowableType ); 32 | } 33 | } 34 | 35 | void IWeaponEvent.OnAttackStart( IWeaponEvent.AttackEvent ev ) 36 | { 37 | if ( IsThrowable ) 38 | { 39 | Renderer?.Set( "b_pull", true ); 40 | } 41 | else 42 | { 43 | Renderer?.Set( "b_attack", true ); 44 | } 45 | 46 | IsAttacking = true; 47 | AttackDuration = 0; 48 | } 49 | 50 | void IWeaponEvent.OnAttackStop() 51 | { 52 | IsAttacking = false; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Code/Game/Weapon/WeaponModel/WeaponModel.cs: -------------------------------------------------------------------------------- 1 | public abstract class WeaponModel : Component 2 | { 3 | [Property] public SkinnedModelRenderer Renderer { get; set; } 4 | [Property] public GameObject MuzzleTransform { get; set; } 5 | [Property] public GameObject EjectTransform { get; set; } 6 | [Property] public GameObject MuzzleEffect { get; set; } 7 | [Property] public GameObject EjectBrass { get; set; } 8 | [Property] public GameObject TracerEffect { get; set; } 9 | 10 | public void Deploy() 11 | { 12 | Renderer?.Set( "b_deploy", true ); 13 | } 14 | 15 | public Transform GetTracerOrigin() 16 | { 17 | if ( MuzzleTransform.IsValid() ) 18 | return MuzzleTransform.WorldTransform; 19 | 20 | return WorldTransform; 21 | } 22 | 23 | public void DoEjectBrass() 24 | { 25 | if ( !EjectBrass.IsValid() ) return; 26 | if ( !EjectTransform.IsValid() ) return; 27 | 28 | var effect = EjectBrass.Clone( new CloneConfig { Transform = EjectTransform.WorldTransform.WithScale( 1 ), StartEnabled = true } ); 29 | effect.WorldRotation *= new Angles( 90, 0, 0 ); 30 | 31 | var ejectDirection = (EjectTransform.WorldRotation.Forward * 250 + (EjectTransform.WorldRotation.Right + Vector3.Random * -0.35f) * 250); 32 | 33 | var rb = effect.GetComponentInChildren(); 34 | rb.Velocity = ejectDirection; 35 | rb.AngularVelocity = EjectTransform.WorldRotation.Right * 50f; 36 | } 37 | 38 | public void DoMuzzleEffect() 39 | { 40 | if ( !MuzzleEffect.IsValid() ) return; 41 | if ( !MuzzleTransform.IsValid() ) return; 42 | 43 | MuzzleEffect.Clone( new CloneConfig { Parent = MuzzleTransform, Transform = global::Transform.Zero, StartEnabled = true } ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Code/Game/Weapon/WeaponModel/WorldModel.cs: -------------------------------------------------------------------------------- 1 | using static BaseWeapon; 2 | 3 | public sealed class WorldModel : WeaponModel, IWeaponEvent 4 | { 5 | void IWeaponEvent.OnAttack( IWeaponEvent.AttackEvent e ) 6 | { 7 | Renderer?.Set( "b_attack", true ); 8 | 9 | if ( e.IsFirstPerson ) 10 | return; 11 | 12 | DoMuzzleEffect(); 13 | DoEjectBrass(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Code/GameLoop/GamePreferences.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// The local user's preferences in Deathmatch 3 | /// 4 | public static class GamePreferences 5 | { 6 | /// 7 | /// Enables automatic switching to better weapons on item pickup 8 | /// 9 | [ConVar( "autoswitch", ConVarFlags.UserInfo | ConVarFlags.Saved )] 10 | public static bool AutoSwitch { get; set; } = true; 11 | 12 | /// 13 | /// Enables fast switching between inventory weapons 14 | /// 15 | [ConVar( "fastswitch", ConVarFlags.Saved )] 16 | public static bool FastSwitch { get; set; } = false; 17 | 18 | /// 19 | /// Intensity of your camera's screenshake 20 | /// 21 | [ConVar( "viewbob", ConVarFlags.Saved )] 22 | [Group( "Camera" )] 23 | public static bool ViewBobbing { get; set; } = true; 24 | 25 | /// 26 | /// Intensity of your camera's screenshake 27 | /// 28 | [ConVar( "screenshake", ConVarFlags.Saved )] 29 | [Range( 0.1f, 2f ), Step( 0.1f ), Group( "Camera" )] 30 | public static float Screenshake { get; set; } = 0.3f; 31 | } 32 | -------------------------------------------------------------------------------- /Code/Map/BaseToggle.cs: -------------------------------------------------------------------------------- 1 | public abstract class BaseToggle : Component 2 | { 3 | public delegate Task StateChangedDelegate( bool state ); 4 | 5 | /// 6 | /// The toggle state has changed 7 | /// 8 | [Property] public StateChangedDelegate OnStateChanged { get; set; } 9 | 10 | bool _state; 11 | 12 | [Property, Sync] 13 | public bool State 14 | { 15 | get => _state; 16 | set 17 | { 18 | if ( _state == value ) return; 19 | 20 | _state = value; 21 | StateHasChanged( _state ); 22 | 23 | } 24 | } 25 | 26 | /// 27 | /// The toggle state has changed 28 | /// 29 | protected virtual void StateHasChanged( bool newState ) 30 | { 31 | OnStateChanged?.Invoke( _state ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Code/Map/FuncMover.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | 3 | /// 4 | /// Moves and Rotates an Object. 5 | /// 6 | [Category( "Gameplay" ), Icon( "open_with" ), EditorHandle( Icon = "🚚" ), Tint( EditorTint.Green )] 7 | public sealed class FuncMover : Component 8 | { 9 | [Property] bool StartOn { get; set; } = true; 10 | 11 | // Linear Move 12 | [Property, FeatureEnabled( "LinearMove", Icon = "🚀" )] public bool LinearMove { get; set; } = true; 13 | [Property, Feature( "LinearMove" )] public Vector3 LinearDistance { get; set; } = Vector3.Up; 14 | [Property, Feature( "LinearMove" )][Sync( SyncFlags.FromHost )] public float LinearSpeed { get; set; } = 10.0f; 15 | [Property, Feature( "LinearMove" )] public bool LinearLoop { get; set; } = true; 16 | [Property, Feature( "LinearMove" ), ShowIf( nameof( LinearLoop ), true )] public float LinearPauseDuration { get; set; } = 0.0f; 17 | 18 | // Rotate Move 19 | [Property, FeatureEnabled( "RotateMove", Icon = "🔄" )] public bool RotateMove { get; set; } = false; 20 | [Property, Feature( "RotateMove" )] public Angles RotationDirection { get; set; } = Angles.Zero; 21 | [Property, Feature( "RotateMove" )][Sync( SyncFlags.FromHost )] public float RotationSpeed { get; set; } = 10.0f; 22 | 23 | [Property, ReadOnly, Sync( SyncFlags.FromHost ), Group( "Debug" )] 24 | bool IsOn { get; set; } 25 | 26 | Transform startPos; 27 | Vector3 targetPos; 28 | private bool movingToTarget = true; 29 | 30 | TimeSince pauseTimer = 0f; 31 | bool isPaused = false; 32 | 33 | protected override void OnStart() 34 | { 35 | base.OnStart(); 36 | 37 | IsOn = StartOn; 38 | startPos = LocalTransform; 39 | targetPos = startPos.Position + LinearDistance; 40 | } 41 | 42 | protected override void OnFixedUpdate() 43 | { 44 | if ( LinearMove ) 45 | { 46 | if ( isPaused && pauseTimer > LinearPauseDuration ) 47 | { 48 | isPaused = false; 49 | } 50 | 51 | Vector3 moveDirection = (startPos.Position - WorldPosition).Normal; 52 | 53 | if ( LinearLoop ) 54 | { 55 | moveDirection = movingToTarget ? (targetPos - WorldPosition).Normal : (startPos.Position - WorldPosition).Normal; 56 | } 57 | else 58 | { 59 | moveDirection = IsOn ? (targetPos - WorldPosition).Normal : (startPos.Position - WorldPosition).Normal; 60 | } 61 | 62 | if ( !isPaused && LinearLoop ) 63 | { 64 | WorldPosition += moveDirection * LinearSpeed * Time.Delta; 65 | } 66 | else if ( !LinearLoop ) 67 | { 68 | WorldPosition += moveDirection * LinearSpeed * Time.Delta; 69 | } 70 | 71 | if ( movingToTarget && Vector3.DistanceBetween( WorldPosition, targetPos ) <= 1 ) 72 | { 73 | movingToTarget = false; 74 | WorldPosition = targetPos; 75 | isPaused = true; 76 | pauseTimer = 0f; 77 | } 78 | else if ( !movingToTarget && Vector3.DistanceBetween( WorldPosition, startPos.Position ) <= 1 ) 79 | { 80 | movingToTarget = true; 81 | WorldPosition = startPos.Position; 82 | isPaused = true; 83 | pauseTimer = 0f; 84 | } 85 | } 86 | 87 | if ( RotateMove ) 88 | { 89 | if ( !IsOn ) return; 90 | var delta = Time.Delta * RotationSpeed; 91 | var rot = Rotation.From( RotationDirection ) * delta; 92 | WorldRotation *= rot; 93 | } 94 | } 95 | 96 | protected override void DrawGizmos() 97 | { 98 | base.DrawGizmos(); 99 | 100 | if ( LinearMove ) 101 | { 102 | Gizmo.Draw.Color = Color.Green; 103 | Gizmo.Draw.LineSphere( 0, 10f ); 104 | Gizmo.Draw.Color = Color.Red; 105 | Gizmo.Draw.LineSphere( LinearDistance, 10f ); 106 | Gizmo.Draw.Color = Color.White; 107 | Gizmo.Draw.Line( 0, LinearDistance ); 108 | Gizmo.Draw.Color = Color.Cyan; 109 | Gizmo.Draw.SolidSphere( 0 + (LinearDistance * (MathF.Sin( Time.Now * (LinearSpeed / 100) ).Remap( -1, 1 ))), 10 ); 110 | } 111 | } 112 | 113 | public void Toggle() { ToggleInternal(); } 114 | 115 | [Rpc.Host] 116 | void ToggleInternal() 117 | { 118 | IsOn = !IsOn; 119 | } 120 | 121 | [Rpc.Host, Button( "TurnOn", "radio_button_checked" ), Group( "Debug" )] 122 | public void TurnOn() 123 | { 124 | IsOn = true; 125 | } 126 | 127 | [Rpc.Host, Button( "TurnOff", "radio_button_unchecked" ), Group( "Debug" )] 128 | public void TurnOff() 129 | { 130 | IsOn = false; 131 | } 132 | 133 | [Rpc.Host] 134 | public void SetLinearSpeed( float speed ) 135 | { 136 | LinearSpeed = speed; 137 | } 138 | 139 | [Rpc.Host] 140 | public void SetRotationSpeed( float speed ) 141 | { 142 | RotationSpeed = speed; 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /Code/Map/TriggerHurt.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Deals damage to objects inside 3 | /// 4 | [Category( "Gameplay" ), Icon( "medical_services" ), EditorHandle( Icon = "🤕" )] 5 | public sealed class TriggerHurt : Component 6 | { 7 | /// 8 | /// If not empty, the target must have one of these tags 9 | /// 10 | [Property, Group( "Damage" )] public TagSet DamageTags { get; set; } = new(); 11 | 12 | /// 13 | /// How much damage to apply 14 | /// 15 | [Property, Group( "Damage" )] public float Damage { get; set; } = 10.0f; 16 | 17 | /// 18 | /// The delay between applying the damage 19 | /// 20 | [Property, Group( "Damage" )] public float Rate { get; set; } = 1.0f; 21 | 22 | /// 23 | /// If not empty, the target must have one of these tags 24 | /// 25 | [Property, Group( "Target" )] public TagSet Include { get; set; } = new(); 26 | 27 | /// 28 | /// If not empty, the target must not have one of these tags 29 | /// 30 | [Property, Group( "Target" )] public TagSet Exclude { get; set; } = new(); 31 | 32 | TimeSince timeSinceDamage = 0.0f; 33 | Collider Collider => GetComponent(); 34 | 35 | protected override void OnFixedUpdate() 36 | { 37 | if ( !Networking.IsHost ) return; 38 | if ( timeSinceDamage < Rate ) return; 39 | if ( !Collider.IsValid() ) return; 40 | 41 | timeSinceDamage = 0; 42 | 43 | foreach ( var touching in Collider.Touching.SelectMany( x => x.GetComponentsInParent().Distinct() ) ) 44 | { 45 | if ( touching is not Component target ) continue; 46 | 47 | if ( !Exclude.IsEmpty && target.GameObject.Tags.HasAny( Exclude ) ) continue; 48 | if ( !Include.IsEmpty && !target.GameObject.Tags.HasAny( Include ) ) continue; 49 | 50 | DeathmatchDamageInfo damageInfo; 51 | if ( target is Player player ) 52 | { 53 | damageInfo = new DeathmatchDamageInfo( Damage, target as Player, GameObject ); 54 | } 55 | else 56 | { 57 | damageInfo = new DeathmatchDamageInfo( Damage, GameObject, GameObject ); 58 | } 59 | 60 | damageInfo.Tags.Add( DamageTags ); 61 | touching.Damage( damageInfo ); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Code/Map/TriggerPush.cs: -------------------------------------------------------------------------------- 1 | [Category( "Gameplay" ), Icon( "compare_arrows" ), EditorHandle( Icon = "🌠" )] 2 | public sealed class TriggerPush : Component, Component.ITriggerListener 3 | { 4 | [Property] Vector3 Direction { get; set; } = Vector3.Up; 5 | [Property] float Power { get; set; } = 20.0f; 6 | [Property] List Objects = []; 7 | 8 | protected override void DrawGizmos() 9 | { 10 | Gizmo.Draw.Arrow( 0, Direction * 50 ); 11 | } 12 | 13 | protected override void OnFixedUpdate() 14 | { 15 | if ( Objects is null ) 16 | return; 17 | 18 | foreach ( var obj in Objects ) 19 | { 20 | var plycomp = obj.Components.Get(); 21 | var cc = obj.Components.Get( FindMode.EverythingInSelfAndParent ); 22 | 23 | if ( plycomp.IsValid() ) 24 | plycomp.Controller.PreventGrounding( 0.1f ); 25 | 26 | if ( !cc.IsValid() ) 27 | { 28 | Objects.Remove( obj ); 29 | return; 30 | } 31 | 32 | cc.Velocity += Direction * Power; 33 | } 34 | } 35 | 36 | void ITriggerListener.OnTriggerEnter( Collider other ) 37 | { 38 | if ( other.GameObject.Components.Get( FindMode.EverythingInSelfAndParent ).IsValid() ) 39 | { 40 | var obj = other.GameObject.Root; 41 | Objects.Add( obj ); 42 | } 43 | } 44 | 45 | void ITriggerListener.OnTriggerExit( Collider other ) 46 | { 47 | if ( other.GameObject.Components.Get( FindMode.EverythingInSelfAndParent ).IsValid() ) 48 | { 49 | var obj = other.GameObject.Root; 50 | Objects.Remove( obj ); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Code/Map/TriggerTeleport.cs: -------------------------------------------------------------------------------- 1 | public sealed class TriggerTeleport : Component, Component.ITriggerListener 2 | { 3 | /// 4 | /// If not empty, the target must have one of these tags 5 | /// 6 | [Property, Group( "Target" )] public TagSet Include { get; set; } = new(); 7 | 8 | /// 9 | /// If not empty, the target must not have one of these tags 10 | /// 11 | [Property, Group( "Target" )] public TagSet Exclude { get; set; } = new(); 12 | 13 | [Property] public GameObject Target { get; set; } 14 | [Property] public Action OnTeleported { get; set; } 15 | 16 | protected override void DrawGizmos() 17 | { 18 | if ( !Target.IsValid() ) 19 | return; 20 | 21 | Gizmo.Draw.Arrow( 0, WorldTransform.PointToLocal( Target.WorldPosition ) ); 22 | } 23 | 24 | void ITriggerListener.OnTriggerEnter( Collider other ) 25 | { 26 | var go = other.GameObject; 27 | 28 | if ( !IsValidTarget( ref go ) ) return; 29 | 30 | go.WorldPosition = Target.WorldPosition; 31 | go.Transform.ClearInterpolation(); 32 | 33 | DoTeleportedEvent( go ); 34 | } 35 | 36 | bool IsValidTarget( ref GameObject go ) 37 | { 38 | go = go.Root; 39 | if ( go.IsProxy ) return false; 40 | 41 | if ( !Exclude.IsEmpty && go.Tags.HasAny( Exclude ) ) 42 | return false; 43 | 44 | if ( !Include.IsEmpty && !go.Tags.HasAny( Include ) ) 45 | return false; 46 | 47 | return true; 48 | } 49 | 50 | [Rpc.Broadcast] 51 | void DoTeleportedEvent( GameObject obj ) 52 | { 53 | OnTeleported?.Invoke( obj ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Code/Player/DeathCameraTarget.cs: -------------------------------------------------------------------------------- 1 | public partial class DeathCameraTarget : Component 2 | { 3 | public Connection Connection { get; set; } 4 | public DateTime Created { get; set; } 5 | 6 | protected override void OnEnabled() 7 | { 8 | Invoke( 60.0f, GameObject.Destroy ); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Code/Player/DeathmatchDamageInfo.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// An extension of which has extra properties, and utilities for networking. 3 | /// 4 | /// 5 | /// Create damage info, inflicted from an object 6 | /// 7 | public sealed class DeathmatchDamageInfo( float damage, GameObject attacker = default, GameObject weapon = default ) : DamageInfo( damage, attacker, weapon ) 8 | { 9 | /// 10 | /// The player that caused this 11 | /// 12 | public Guid InstigatorId { get; set; } 13 | 14 | /// 15 | /// Where did this damage originate from? 16 | /// 17 | public Vector3 Origin { get; set; } 18 | 19 | /// 20 | /// Create damage info, inflicted by a player (or bot) 21 | /// 22 | public DeathmatchDamageInfo( float damage, Player attacker, GameObject weapon = default ) 23 | : this( damage, attacker.IsValid() ? attacker.GameObject : null, weapon ) 24 | { 25 | InstigatorId = attacker?.PlayerId ?? Guid.Empty; 26 | } 27 | 28 | public bool IsGibType() 29 | { 30 | return Tags.HasAny( DamageTags.Crush, DamageTags.Explosion, DamageTags.GibAlways ); 31 | } 32 | } 33 | 34 | public static class DamageTags 35 | { 36 | public const string Headshot = "head"; 37 | public const string Crush = "crush"; 38 | public const string Explosion = "explosion"; 39 | public const string Shock = "shock"; 40 | public const string Fall = "fall"; 41 | public const string GibAlways = "gib_always"; 42 | public const string FullSelfDamage = "full_self_damage"; 43 | } 44 | 45 | public static class DamageExtensions 46 | { 47 | public static void Damage( this Component.IDamageable damageable, DeathmatchDamageInfo damageInfo ) 48 | { 49 | Assert.True( Networking.IsHost, "Only the host can deal damage!" ); 50 | if ( !Networking.IsHost ) return; 51 | 52 | Assert.NotNull( damageInfo, "Null damageInfo!" ); 53 | if ( damageInfo is null ) return; 54 | 55 | if ( damageable is Component comp ) 56 | { 57 | if ( comp.GameObject.IsDestroyed ) return; 58 | } 59 | 60 | damageable.OnDamage( damageInfo ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Code/Player/NoclipMoveMode.cs: -------------------------------------------------------------------------------- 1 | using Sandbox.Movement; 2 | 3 | public sealed class NoclipMoveMode : MoveMode 4 | { 5 | [Property] 6 | public float RunSpeed { get; set; } = 10000; 7 | 8 | [Property] 9 | public float WalkSpeed { get; set; } = 2000; 10 | 11 | protected override void OnUpdateAnimatorState( SkinnedModelRenderer renderer ) 12 | { 13 | renderer.Set( "b_noclip", true ); 14 | } 15 | 16 | public override int Score( PlayerController controller ) 17 | { 18 | return 1000; 19 | } 20 | 21 | public override void UpdateRigidBody( Rigidbody body ) 22 | { 23 | body.Gravity = false; 24 | body.LinearDamping = 5.0f; 25 | body.AngularDamping = 1f; 26 | 27 | body.Tags.Set( "noclip", true ); 28 | } 29 | 30 | public override void OnModeBegin() 31 | { 32 | Controller.IsClimbing = true; 33 | Controller.Body.Gravity = false; 34 | } 35 | 36 | public override void OnModeEnd( MoveMode next ) 37 | { 38 | Controller.IsClimbing = false; 39 | Controller.Body.Tags.Set( "noclip", false ); 40 | Controller.Renderer.Set( "b_noclip", false ); 41 | } 42 | 43 | public override Vector3 UpdateMove( Rotation eyes, Vector3 input ) 44 | { 45 | // don't normalize, because analog input might want to go slow 46 | input = input.ClampLength( 1 ); 47 | 48 | var direction = eyes * input; 49 | 50 | // Run if we're holding down alt move button 51 | bool run = Input.Down( "run" ); 52 | 53 | // if we're running, use run speed, if not use walk speed 54 | var velocity = run ? RunSpeed : WalkSpeed; 55 | 56 | if ( Input.Down( "duck" ) ) 57 | direction *= 0.2f; 58 | 59 | if ( Input.Down( "jump" ) ) 60 | direction += Vector3.Up; 61 | 62 | return direction * velocity; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Code/Player/Player.ConsoleCommands.cs: -------------------------------------------------------------------------------- 1 | public sealed partial class Player 2 | { 3 | /// 4 | /// Find a player for this connection 5 | /// 6 | public static Player FindForConnection( Connection c ) 7 | { 8 | return Game.ActiveScene.GetAll().Where( x => x.Network.Owner == c ).FirstOrDefault(); 9 | } 10 | 11 | /// 12 | /// Get player from a connecction id 13 | /// 14 | /// 15 | /// 16 | public static Player For( Guid playerId ) 17 | { 18 | return Game.ActiveScene.GetAll().FirstOrDefault( x => x.PlayerId.Equals( playerId ) ); 19 | } 20 | 21 | /// 22 | /// Kill yourself 23 | /// 24 | [ConCmd( "kill", ConVarFlags.Server )] 25 | public static void KillSelf( Connection source ) 26 | { 27 | var player = FindForConnection( source ); 28 | if ( player is null ) return; 29 | 30 | player.KillSelf(); 31 | } 32 | 33 | [Rpc.Host] 34 | internal void KillSelf() 35 | { 36 | if ( Rpc.Caller != Network.Owner ) return; 37 | 38 | this.Damage( new DeathmatchDamageInfo( 5000 ) ); 39 | } 40 | 41 | /// 42 | /// Give all items (sv_cheats should be 1) 43 | /// 44 | [ConCmd( "giveall", ConVarFlags.Server )] 45 | public static void GiveAll( Connection source ) 46 | { 47 | if ( !Application.CheatsEnabled ) 48 | { 49 | source.SendLog( LogLevel.Warn, "Cheats aren't enabled!" ); 50 | return; 51 | } 52 | 53 | var player = FindForConnection( source ); 54 | if ( !player.IsValid() ) 55 | return; 56 | 57 | var inventory = player.GetComponent(); 58 | if ( !inventory.IsValid() ) 59 | return; 60 | 61 | // inventory.GiveAll(); 62 | } 63 | 64 | [ConCmd( "god", ConVarFlags.Server, Help = "Toggle invulnerability" )] 65 | public static void God( Connection source ) 66 | { 67 | if ( !Application.CheatsEnabled ) return; 68 | 69 | var player = PlayerData.For( source ); 70 | if ( !player.IsValid() ) 71 | return; 72 | 73 | player.IsGodMode = !player.IsGodMode; 74 | source.SendLog( LogLevel.Info, player.IsGodMode ? "Godmode enabled" : "Godmode disabled" ); 75 | } 76 | 77 | /// 78 | /// Switch to another map 79 | /// 80 | [ConCmd( "map", ConVarFlags.Admin )] 81 | public static void ChangeMap( string mapName ) 82 | { 83 | LaunchArguments.Map = mapName; 84 | 85 | Game.Load( Game.Ident, true ); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Code/Player/PlayerData.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Holds persistent player information like deaths, kills 3 | /// 4 | public sealed partial class PlayerData : Component 5 | { 6 | /// 7 | /// Unique Id per each player and bot, equal to owning Player connection Id if it's a real player. 8 | /// 9 | [Property] public Guid PlayerId { get; set; } 10 | [Property] public long SteamId { get; set; } = -1L; 11 | [Property] public string DisplayName { get; set; } 12 | 13 | [Sync] public int Kills { get; set; } 14 | [Sync] public int Deaths { get; set; } 15 | 16 | [Sync] public bool IsGodMode { get; set; } 17 | 18 | public Connection Connection => Connection.Find( PlayerId ); 19 | 20 | /// 21 | /// Is this player data me? 22 | /// 23 | public bool IsMe => PlayerId == Connection.Local.Id; 24 | 25 | /// 26 | public float Ping => Connection?.Ping ?? 0; 27 | 28 | /// 29 | /// Data for all players 30 | /// 31 | public static IEnumerable All => Game.ActiveScene.GetAll(); 32 | 33 | /// 34 | /// Get player data for a player 35 | /// 36 | /// 37 | /// 38 | public static PlayerData For( Connection connection ) => For( connection.Id ); 39 | 40 | /// 41 | /// Get player data for a player's id 42 | /// 43 | /// 44 | /// 45 | public static PlayerData For( Guid playerId ) 46 | { 47 | return All.FirstOrDefault( x => x.PlayerId == playerId ); 48 | } 49 | 50 | [Rpc.Broadcast] 51 | private void RpcAddStat( string identifier, int amount = 1 ) 52 | { 53 | Sandbox.Services.Stats.Increment( identifier, amount ); 54 | } 55 | 56 | /// 57 | /// Called on the host, calls a RPC on the player and adds a stat 58 | /// 59 | /// 60 | /// 61 | public void AddStat( string identifier, int amount = 1 ) 62 | { 63 | if ( Application.CheatsEnabled ) return; 64 | 65 | Assert.True( Networking.IsHost, "PlayerData.AddStat is host-only!" ); 66 | 67 | using ( Rpc.FilterInclude( Connection ) ) 68 | { 69 | RpcAddStat( identifier, amount ); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Code/Player/PlayerEvent.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Called only on the Player's GameObject for their actions or events 3 | /// 4 | public interface IPlayerEvent : ISceneEvent 5 | { 6 | void OnSpawned() { } 7 | 8 | public struct DamageParams 9 | { 10 | public float Damage { get; set; } 11 | public Guid InstigatorId { get; set; } 12 | public GameObject Attacker { get; set; } 13 | public GameObject Weapon { get; set; } 14 | public TagSet Tags { get; set; } 15 | public Vector3 Position { get; set; } 16 | public Vector3 Origin { get; set; } 17 | } 18 | void OnDamage( DamageParams args ) { } 19 | 20 | public struct DiedParams 21 | { 22 | public Guid InstigatorId { get; set; } 23 | public GameObject Attacker { get; set; } 24 | } 25 | void OnDied( DiedParams args ) { } 26 | 27 | void OnJump() { } 28 | void OnLand( float distance, Vector3 velocity ) { } 29 | void OnSuicide() { } 30 | void OnPickup( BaseCarriable item ) { } 31 | void OnCameraMove( ref Angles angles ) { } 32 | void OnCameraSetup( CameraComponent camera ) { } 33 | void OnCameraPostSetup( CameraComponent camera ) { } 34 | } 35 | 36 | /// 37 | /// Broadcasted to the entire scene on the local player's actions or events 38 | /// 39 | public interface ILocalPlayerEvent : ISceneEvent 40 | { 41 | void OnJump() { } 42 | void OnLand( float distance, Vector3 velocity ) { } 43 | void OnPickup( BaseCarriable weapon ) { } 44 | } 45 | -------------------------------------------------------------------------------- /Code/Player/PlayerObserver.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Dead players become these. They try to observe their last corpse. 3 | /// 4 | public sealed class PlayerObserver : Component 5 | { 6 | Angles EyeAngles; 7 | TimeSince timeSinceStarted; 8 | 9 | protected override void OnEnabled() 10 | { 11 | base.OnEnabled(); 12 | 13 | EyeAngles = Scene.Camera.WorldRotation; 14 | timeSinceStarted = 0; 15 | } 16 | 17 | protected override void OnUpdate() 18 | { 19 | if ( IsProxy ) return; 20 | 21 | var corpse = Scene.GetAllComponents() 22 | .Where( x => x.Connection == Network.Owner ) 23 | .OrderByDescending( x => x.Created ) 24 | .FirstOrDefault(); 25 | 26 | if ( corpse.IsValid() ) 27 | { 28 | RotateAround( corpse ); 29 | } 30 | 31 | // Don't allow immediate respawn 32 | if ( timeSinceStarted < 1 ) 33 | return; 34 | 35 | if ( timeSinceStarted > 3f ) 36 | { 37 | Respawn(); 38 | GameObject.Destroy(); 39 | } 40 | } 41 | 42 | [Rpc.Host( NetFlags.OwnerOnly | NetFlags.Reliable )] 43 | public void Respawn() 44 | { 45 | GameManager.Current.SpawnPlayer( Network.Owner ); 46 | GameObject.Destroy(); 47 | } 48 | 49 | private void RotateAround( Component target ) 50 | { 51 | // Find the corpse eyes 52 | if ( !target.Components.Get().TryGetBoneTransform( "head", out var tx ) ) 53 | { 54 | tx.Position = target.GameObject.GetBounds().Center + Vector3.Up * 25f; 55 | } 56 | 57 | var e = EyeAngles; 58 | e += Input.AnalogLook; 59 | e.pitch = e.pitch.Clamp( -90, 90 ); 60 | e.roll = 0.0f; 61 | EyeAngles = e; 62 | 63 | var center = tx.Position; 64 | var targetPos = center - EyeAngles.Forward * 150f; 65 | 66 | var tr = Scene.Trace.FromTo( center, targetPos ).Radius( 1.0f ).WithoutTags( "ragdoll", "effect" ).Run(); 67 | 68 | Scene.Camera.WorldPosition = Vector3.Lerp( Scene.Camera.WorldPosition, tr.EndPosition, timeSinceStarted, true ); 69 | Scene.Camera.WorldRotation = EyeAngles; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Code/Player/PlayerStats.cs: -------------------------------------------------------------------------------- 1 | /// 2 | /// Record stats for the local player 3 | /// 4 | public sealed class PlayerStats : Component, IPlayerEvent 5 | { 6 | [RequireComponent] public Player Player { get; set; } 7 | 8 | float metersTravelled; 9 | Vector3 lastPosition; 10 | 11 | protected override void OnFixedUpdate() 12 | { 13 | if ( IsProxy ) return; 14 | 15 | var delta = WorldPosition - lastPosition; 16 | lastPosition = WorldPosition; 17 | 18 | if ( !Player.Controller.IsOnGround ) 19 | { 20 | return; 21 | } 22 | 23 | var groundDelta = delta.WithZ( 0 ).Length.InchToMeter(); 24 | if ( groundDelta > 10 ) groundDelta = 0; 25 | 26 | metersTravelled += groundDelta; 27 | 28 | if ( metersTravelled > 10 ) 29 | { 30 | Sandbox.Services.Stats.Increment( "meters_walked", metersTravelled ); 31 | metersTravelled = 0; 32 | } 33 | } 34 | 35 | void IPlayerEvent.OnJump() 36 | { 37 | if ( IsProxy ) return; 38 | 39 | Sandbox.Services.Stats.Increment( "jump", 1 ); 40 | } 41 | 42 | void IPlayerEvent.OnDamage( IPlayerEvent.DamageParams args ) 43 | { 44 | if ( IsProxy ) return; 45 | 46 | Sandbox.Services.Stats.Increment( "damage_taken", args.Damage ); 47 | } 48 | 49 | void IPlayerEvent.OnDied( IPlayerEvent.DiedParams args ) 50 | { 51 | if ( IsProxy ) return; 52 | 53 | Sandbox.Services.Stats.Increment( "deaths", 1 ); 54 | } 55 | 56 | void IPlayerEvent.OnSuicide() 57 | { 58 | if ( IsProxy ) return; 59 | 60 | Sandbox.Services.Stats.Increment( "suicides", 1 ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Code/UI/Chat/Chat.razor: -------------------------------------------------------------------------------- 1 | @using Sandbox.UI 2 | 3 | @inherits PanelComponent 4 | 5 | 6 |
7 | 8 | 9 | 10 | @code 11 | { 12 | public static Chat Current; 13 | 14 | public Panel Canvas { get; protected set; } 15 | public TextEntry Input { get; protected set; } 16 | 17 | Queue Rows = new(); 18 | 19 | protected int MaxItems => 100; 20 | protected float MessageLifetime => 10f; 21 | 22 | public bool IsOpen 23 | { 24 | get => HasClass("open"); 25 | set 26 | { 27 | SetClass("open", value); 28 | if (value) 29 | { 30 | Input.Focus(); 31 | Input.Text = string.Empty; 32 | Input.Label.SetCaretPosition(0); 33 | } 34 | } 35 | } 36 | 37 | protected override void OnTreeBuilt() 38 | { 39 | Canvas.PreferScrollToBottom = true; 40 | Input.AcceptsFocus = true; 41 | Input.AllowEmojiReplace = true; 42 | 43 | Current = this; 44 | } 45 | 46 | protected override void OnUpdate() 47 | { 48 | if (!Input.IsValid() || !Canvas.IsValid()) 49 | return; 50 | 51 | if (Sandbox.Input.Pressed("chat")) 52 | Open(); 53 | 54 | Input.Placeholder = string.IsNullOrEmpty(Input.Text) ? "Enter your message..." : string.Empty; 55 | } 56 | 57 | void Open() 58 | { 59 | AddClass("open"); 60 | Input.Focus(); 61 | Canvas.TryScrollToBottom(); 62 | } 63 | 64 | void Close() 65 | { 66 | RemoveClass("open"); 67 | Input.Blur(); 68 | Input.Text = string.Empty; 69 | Input.Label.SetCaretPosition(0); 70 | } 71 | 72 | void Submit() 73 | { 74 | var msg = Input.Text.Trim(); 75 | Input.Text = ""; 76 | 77 | Close(); 78 | 79 | if (string.IsNullOrWhiteSpace(msg)) return; 80 | 81 | Say(Connection.Local, msg); 82 | } 83 | 84 | public void AddEntry(string name, string message, long playerId = 0, bool isInfo = false) 85 | { 86 | var e = Canvas.AddChild(); 87 | 88 | var player = Player.FindLocalPlayer(); 89 | if (!player.IsValid()) return; 90 | 91 | if (playerId > 0) 92 | e.PlayerId = playerId; 93 | 94 | e.Message = message; 95 | e.Name = $"{name}"; 96 | 97 | e.SetClass("noname", string.IsNullOrEmpty(name)); 98 | e.SetClass("info", isInfo); 99 | e.BindClass("stale", () => e.Lifetime > MessageLifetime); 100 | 101 | var cl = Connection.All.FirstOrDefault(x => x.SteamId == playerId); 102 | if (cl != null) 103 | e.SetClass("friend", new Friend(cl.SteamId).IsFriend || Game.SteamId == playerId); 104 | 105 | Canvas.TryScrollToBottom(); 106 | 107 | Rows.Enqueue(e); 108 | 109 | // Kill an item if we need to 110 | if (Rows.Count > MaxItems) 111 | Rows.Dequeue().Delete(); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /Code/UI/Chat/Chat.razor.cs: -------------------------------------------------------------------------------- 1 | public partial class Chat 2 | { 3 | [Rpc.Broadcast] 4 | public static void AddChatEntry( string name, string message, long playerId = 0, bool isInfo = false ) 5 | { 6 | Current?.AddEntry( name, message, playerId, isInfo ); 7 | 8 | // Only log clientside if we're not the listen server host 9 | if ( !Networking.IsHost ) 10 | { 11 | Log.Info( $"{name}: {message}" ); 12 | } 13 | } 14 | 15 | [ConCmd( "sandbox_say", ConVarFlags.Server )] 16 | public static void Say( Connection caller, string message ) 17 | { 18 | if ( caller == null ) return; 19 | 20 | // todo - reject more stuff 21 | if ( message.Contains( '\n' ) || message.Contains( '\r' ) ) 22 | return; 23 | 24 | Log.Info( $"{caller}: {message}" ); 25 | AddChatEntry( caller.DisplayName, message, caller.SteamId ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Code/UI/Chat/Chat.razor.scss: -------------------------------------------------------------------------------- 1 | iconpanel { 2 | font-family: "Material Icons"; 3 | } 4 | 5 | $rounding: 4px; 6 | $blue: #3273eb; 7 | 8 | Chat { 9 | position: absolute; 10 | bottom: -16px; 11 | left: 32px; 12 | z-index: 1; 13 | flex-direction: column; 14 | width: 505px; 15 | max-height: 435px; 16 | font-family: Poppins; 17 | font-size: 16px; 18 | pointer-events: none; 19 | transition: all 0.1s ease, border 0s ease; 20 | padding: 18px; 21 | 22 | textentry { 23 | transition: opacity 0.1s ease; 24 | flex-shrink: 0; 25 | min-height: 44px; 26 | opacity: 0; 27 | background-color: rgba( #090d10, 0.9 ); 28 | border-radius: $rounding; 29 | margin-bottom: 28px; 30 | } 31 | 32 | .placeholder { 33 | color: #c0cee7; 34 | } 35 | 36 | .content-label { 37 | margin-left: 16px; 38 | } 39 | 40 | .placeholder, .content-label { 41 | color: darken( #c0cee7, 20% ); 42 | font-size: 14px; 43 | font-family: Poppins; 44 | font-weight: 400; 45 | text-shadow: 2px 2px 1px rgba( black, 0.1 ); 46 | margin-top: 11px; 47 | } 48 | 49 | .canvas { 50 | flex-direction: column; 51 | align-items: flex-start; 52 | overflow: scroll; 53 | 54 | ChatRow { 55 | max-width: 100%; 56 | color: white; 57 | opacity: 1; 58 | flex-shrink: 0; 59 | background-color: rgba( #090d10, 0.9 ); 60 | padding: 4px 10px; 61 | border-radius: $rounding; 62 | transition: opacity 0.15s ease; 63 | margin-bottom: 6px; 64 | 65 | .header { 66 | flex-shrink: 0; 67 | flex-grow: 0; 68 | padding-left: 4px; 69 | margin-top: 3px; 70 | font-weight: 700; 71 | font-size: 16px; 72 | color: $blue; 73 | padding-right: 8px; 74 | text-shadow: 2px 2px 1px rgba( black, 0.3 ); 75 | } 76 | 77 | .msg { 78 | margin-top: 3px; 79 | color: #c0cee7; 80 | font-size: 16px; 81 | text-shadow: 2px 2px 1px rgba( black, 0.1 ); 82 | } 83 | 84 | &.info { 85 | .header, .msg { 86 | color: darken( #c0cee7, 20% ); 87 | } 88 | } 89 | 90 | img { 91 | flex-shrink: 0; 92 | height: 30px; 93 | width: 30px; 94 | border-radius: 100px; 95 | } 96 | 97 | &.noname { 98 | .name { 99 | display: none; 100 | } 101 | } 102 | 103 | &.is-lobby, &.friend { 104 | .name { 105 | color: #849a74; 106 | } 107 | } 108 | 109 | &.stale { 110 | transition: opacity 1s ease; 111 | opacity: 0; 112 | } 113 | } 114 | } 115 | 116 | &.open { 117 | pointer-events: all; 118 | backdrop-filter-blur: 20px; 119 | background-image: linear-gradient( to top, rgba( #1b1b35, 0.9 ), rgba( #1c1c38, 0.85 ), rgba( #1c1c38, 0.8 ) 80%, rgba( #1c1c38, 0.5 ) ); 120 | bottom: 0; 121 | border-radius: $rounding $rounding 0 0; 122 | 123 | textentry { 124 | opacity: 1; 125 | width: 100%; 126 | cursor: text; 127 | } 128 | 129 | .canvas { 130 | ChatRow { 131 | transition: opacity 0.1s ease; 132 | opacity: 1; 133 | } 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /Code/UI/Chat/ChatRow.razor: -------------------------------------------------------------------------------- 1 | @using Sandbox.UI 2 | @using Sandbox.UI.Construct 3 | 4 | 5 | @if ( PlayerId > 0 ) 6 | { 7 |
8 | 9 |
10 | } 11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 | 19 | @code 20 | { 21 | public string Name { get; set; } 22 | public string Message { get; set; } 23 | public long PlayerId { get; set; } 24 | public TimeSince Lifetime { get; init; } = 0; 25 | } 26 | -------------------------------------------------------------------------------- /Code/UI/Components/ButtonGroup.cs: -------------------------------------------------------------------------------- 1 | using Sandbox.UI.Construct; 2 | 3 | namespace Sandbox.UI; 4 | 5 | /// 6 | /// A group of side-by-side buttons one of which can be selected. 7 | /// 8 | [Library( "ButtonGroup" )] 9 | public class ButtonGroup : Panel 10 | { 11 | // TODO - allow multi select 12 | // TODO - allow toggle off 13 | 14 | private object _value; 15 | 16 | /// 17 | /// Called when the value has been changed. 18 | /// 19 | public System.Action ValueChanged { get; set; } 20 | 21 | /// 22 | /// The selected option value. 23 | /// 24 | public object Value 25 | { 26 | get => _value; 27 | set 28 | { 29 | if ( _value == value ) 30 | return; 31 | 32 | _value = value; 33 | 34 | ValueChanged?.Invoke( $"{Value}" ); 35 | CreateEvent( "onchange" ); 36 | CreateValueEvent( "value", value ); 37 | SetSelectedButton(); 38 | } 39 | } 40 | 41 | /// 42 | /// Options to show in this button group. 43 | /// 44 | public List