Garry's Mod

Garry's Mod

833 vurderinger
Clientside Ragdoll Collision
2
2
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Content Type: Addon
Addon Type: Effects
Addon Tags: Fun, Realism
Filstørrelse:
Offentliggjort:
Opdateret:
54.243 KB
9. aug. 2024 kl. 10:03
10. sep. kl. 21:18
5 ændringsbemærkninger ( vis )

Abonner for at downloade
Clientside Ragdoll Collision

Beskrivelse
Are you tired of ragdolls not colliding within the corridors of your buildings, and yet are you unwilling to resort to server ragdolls for the lag they may impose? Well this is what you've been waiting for!

This addon makes it so your clientside ragdolls, player/npc death ragdolls, can collide with serversided entities. This is not like Rag Mod where a server-sided ragdoll is used instead.

This was all made possible due to the fact that you can have client-side ragdolls collide with client-side entities, which we utilize to produce the seamless illusion that your ragdolls are colliding with the very server-sided entities.

For those that want to distribute this addon to their servers, I would like if I were credited, but Im not gonna enforce it. I'm honestly more surprised that I did not run into another addon that features this.



Features

- I've so far verified that most vphysics point and brush entities work with this addon. (prop_physics, prop_dynamic. func_physbox, func_brush, func_door, etc). These are all whitelisted by default.

- Everything is client-sided, there is no server impact on anything whatsoever. It would not impact other players.

- Tons of con-commands and con-vars to play around with, all of which are manipulated on the client's end. Much of them change how performance is handled, making the addon good for both low-end and high-end computing. default settings are low-end.

- The addon can be disabled and enabled in realtime via console

- Entity classes can be manually added and removed to support ragdoll collision via console per user. (THESE SETTINGS NOW ARE SAVED TO DISK AND RELOAD FOR EVERY SESSION)

- A blacklist for server owners that want to implement this addon with a safe boundary.

Unfortunately, it is not possible to have it work via multiplayer clientside on servers that don't have the addon, and by default it will not run.
- but for the hell of it, this addon also features an injectable lua file "csrd_ragcollide_injectable.lua" for servers that have sv_allowcslua 1.

This means in some sandbox servers or other servers, you can enable the addon here without conflict. This addon is simply eyecandy, it hardly enables cheating/gaining competitive advantage in anyway. It would not impact anyone, hardly anybody could even know that you have it.

I am a bit of a rookie at lua and this is my first addon comprising of it. So if there are issues, feel free to report them, as well as add suggestions :)

CLIENT CONVARS

csrd_enable - Enables/Disables the addon
csrd_maxcollides - Specifies how many client collides may exist at once.
csrd_scanradius - how far the game should look to summon ghost collisions for a single clientside ragdoll
csrd_relevancedist - How far a clientside ragdoll can be to create ghost collisions
csrd_rawteleportdist - If CSC (Compute Shadow Control) is disabled, this will be the error correction for the collision.
csrd_collidemass - How much mass client collision entities should have, helpful to compete against the ragdoll's inertia, but not very stable with high values (I don't think I have to explain why lol).
csrd_scancooldown - Adds a slight delay before another scan can be ran for another clientside entity.
csrd_priority - The method in which entities are prioritized to have collision over others. Values can be (none, distance, or bounds)
[NEW!] csrd_method - The method of scanning that is used to scan for collision.
csrd_debugdraw - Displays the client collisions to the user. You might not want to use this at gameplay, but its good for testing settings as well as awareness for it's memory usage.

Compute Shadow Control Convars

csrd_csc - enables the Compute Shadow Control method. Enabled by default.
csrd_csc_errorcorrect - A client collision will be teleported if they are this far away from their serversided entity
csrd_csc_secondstoarrive - A client collision will take this much time to get to it's server entity. Do not set to zero.
csrd_csc_maxspeed - A client collision can move this fast physically.
csrd_csc_damping - How precise the Compute Shadow Control may control the entity. high values allow for precision, while low values enable springy like behavior.

CONCOMMANDS

csrd_flushcollides - removes all existing collides from the game. helpful incase processes fail and memory builds up.
csrd_whitelist - prints all entity classes that are whitelisted for collision creation.
csrd_whitelist_add - Adds an inputed entity class into the collision whitelist. (BE CAREFUL WHEN USING.)
csrd_whitelist_remove - Removes an inputed entity class from the collision whitelist.
csrd_blacklist - displays all blacklisted entites and why they are blacklisted.
103 kommentarer
Palexite  [ophavsmand] 25. sep. kl. 17:58 
@Skeletondude will look into
Skeletondude 22. sep. kl. 10:09 
[Clientside Ragdoll Collision] lua/autorun/csrd_ragcollide.lua:258: attempt to index local 'phys' (a nil value)
1. ScanForCollision - lua/autorun/csrd_ragcollide.lua:258
2. RagdollCreate - lua/autorun/csrd_ragcollide.lua:143
3. v - lua/autorun/csrd_ragcollide.lua:241
4. unknown - lua/includes/modules/hook.lua:102
5. BecomeRagdollOnClient - [C]:-1
6. func - lua/lambdaplayers/autorun_includes/client/netmessages.lua:65
7. unknown - lua/includes/extensions/net.lua:34
Daniel Betjko 19. sep. kl. 11:25 
Oh never mind it works now
Palexite  [ophavsmand] 12. sep. kl. 14:48 
to check if the mod is really loading, you should csrd_* console commands showing
Palexite  [ophavsmand] 12. sep. kl. 14:48 
@Daniel Betjko what's the issue for him? This should work for Multiplayer, hell, its the reason why this was made.
Daniel Betjko 12. sep. kl. 7:20 
Can you make it so that it works on multiplayer because me and my cousin are trying to install the same exact mod and its keep failing for him
Palexite  [ophavsmand] 11. sep. kl. 8:37 
It appears the clientcollides are phasing in and out of existence on my end which appears to be causing sliding issues, so weird.
Palexite  [ophavsmand] 11. sep. kl. 8:33 
@Kregg im having an issue too and I have no clue why. Sometime im going to check it out on my other PC to see if the problem persists and its some form of software issue.
Kregg 11. sep. kl. 7:07 
This seems to not work for me on default settings
Palexite  [ophavsmand] 10. sep. kl. 21:08 
Addon is now updated and potentially 45% more optimized (my estimate).

-> your whitelist settings for entities are now saved to the disk and are reloaded per session. You can find these in your garry's mod data/csragdollcollision called "settings.txt".

-> a new concommand was added! "csrd_method" allows you to control the function in which server entities are scanned in 3D space for. your options are "sphere", "box", or "directionalcone". directionalcone is the new default. It uses your ragdoll's velocity to find server entities that might be in the way of it's physical trajectory, meaning FAR LESS clientside entities are created, even none if none are truly in the way.