garrysmod-issues icon indicating copy to clipboard operation
garrysmod-issues copied to clipboard

Entity:SetModelScale is not supported clientside

Open RaphaelIT7 opened this issue 9 months ago • 0 comments

Details

Currently, only CBaseAnimating::TestCollision has an Implementation to support SetModelScale while the client is missing this.
This check would need to be implemented clientside which fixes this issue.

I made a check which seems to fix it here (Tested on a custom HL2 Build): https://github.com/RaphaelIT7/obsolete-source-engine/commit/1c894dc7cad5690d65e2374e4314415f5b4897ba

Edit: I made a few changes in this commit to reduce the time it takes to generate a CPhysCollide and also to cache already generated CPhysCollides.
The new way to generate CPhysCollide seems to work fine, but it should also be tested in Gmod.
Maybe this could also be implemented Serverside so that it also benefits from this improvement. https://github.com/RaphaelIT7/obsolete-source-engine/commit/61c5aa63f6a141eb9c3b9d3292fbb14ec91fe150

Edit 2:

To give a better overview to all changes that were made the last few days I added them all into one commit:
https://github.com/RaphaelIT7/obsolete-source-engine/commit/a3431933649b67b2a25430bc2d7fae6971ba0278

Steps to reproduce

  1. Start a multiplayer game. (Singleplayer doesn't have this issue)
  2. Spawn a prop
  3. Look at the Prop
  4. Run this lua_run local ent = Entity(1):GetEyeTrace().Entity ent:SetModelScale(2, 0) ent:Activate()
  5. Stand on the prop and see with cl_showerror 3 all the prediction errors, or notice how all traces fail to hit the new hitbox.

RaphaelIT7 avatar May 18 '24 05:05 RaphaelIT7