10-02-2012, 02:53 PM
Before I did some optimizations a month ago, over 50% of the gamemode's CPU time was spend in calling the IsPlayerConnected native. Yes -- changing the way some very hot loops work has had a very significant impact on the gamemode's performance. In order to fix this, I (a) changed iterators to iterate until the highest Id, and (b) replaced the IsPlayerConnected call with "Player(playerId)->isConnected()", which directly accesses memory in Pawn instead of calling out to native.