nzp-team / quakec

The QuakeC repository for NZ:P, all platforms.
GNU General Public License v2.0
6 stars 11 forks source link

[Server] Inadequate performance with Player revive checks. #3

Open MotoLegacy opened 2 years ago

MotoLegacy commented 2 years ago

This block in CheckPlayer() significantly increases function execution time, proven with FTE's SSQC profiler: https://github.com/nzp-team/quakec/blob/92f38d906aed00866b5743f9d550bf5556cd6962/source/server/weapons/weapon_core.qc#L2266-L2328

It's believed the cause of this is the constant findradius() check, which occurs every frame and iterates over every entity in the world.

MotoLegacy commented 2 years ago

As a temporary resolve for non-FTE platforms with high CPU usage, revive logic has been temporarily disabled, as they don't feature working co-op at the moment anyway. https://github.com/nzp-team/quakec/commit/707141ec681d3bc204bf23f28de32bc0ce61a417