pixeltailgames / cinema

:movie_camera: Gamemode for Garry's Mod featuring multiplayer video streaming
http://www.pixeltailgames.com/cinema/
87 stars 63 forks source link

Optimize Location System #100

Closed WinterPhoenix closed 9 years ago

WinterPhoenix commented 9 years ago

I've replaced the extremely intensive PlayerThink Timer with a system that will spawn brushes upon InitPostEntity/OnReloaded. These brushes are spawned with the collision bounds of the Location's Min and Max Vectors, and then use StartTouch and EndTouch for when players are exiting or entering locations to handle Changing of Location.

This means a lot quicker location changing using a lot less CPU Power, with the added bonus of being totally compatible with the rest of the original Location System.

WinterPhoenix commented 9 years ago

This requires further testing, as it rather unexpectedly broke a lot of things with entering and exiting theaters.