ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
658 stars 76 forks source link

[TF2] [VScript] Expose `engine->GetEntityCount()` #6400

Open Marioiscool246 opened 1 month ago

Marioiscool246 commented 1 month ago

Since TF2 has a low edict count compared to other modern source games, having access to this to function is useful when creating entities with vscript. For example, spawning non essential entities through vscript for the purpose of effects such as sparks, decals, or something like trigger_particle can be skipped if there's already too many edicts that are active, preventing a server crash.

worMatty commented 1 month ago

Great idea.