Skip to content

Optimize UTIL_CreateScaledPhysObject#1880

Open
RaphaelIT7 wants to merge 1 commit intoValveSoftware:masterfrom
RaphaelIT7:patch-2
Open

Optimize UTIL_CreateScaledPhysObject#1880
RaphaelIT7 wants to merge 1 commit intoValveSoftware:masterfrom
RaphaelIT7:patch-2

Conversation

@RaphaelIT7
Copy link
Copy Markdown

Description

I made this back in like 2024, though it should be merged upstream for everyone's benefit :)
This optimizes UTIL_CreateScaledPhysObject by switching it to use CPhysPolysoup which is way faster.
I've suggested this change for GMod around a week ago and has been working great there on the dev branch.

This is an old performance test from when I made it since I can't test it with the sdk when the engine keeps crashing :/
Though even in GMod it was confirmed to be significantly faster.
image

Test with the same 100 PhysCollide:
Old took ~880ms
New takes ~140ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant