Defining MAX_PLAYERS
#2

Foreach only loops over the connected players, it doesn't use MAX_PLAYERS so on those loop you won't save anything. Normal for loops will obviously loop less as the value is lower, which would be a little faster.
Redefining MAX_PLAYERS will also reduce the amount of memory used, especially with arrays of playerdata.

But I wouldn't redefine my MAX_PLAYERS on 200 if I have 500 slots available without lowering the amount of slots.
Reply


Messages In This Thread
Defining MAX_PLAYERS - by Eyce - 15.04.2016, 13:48
Re: Defining MAX_PLAYERS - by yugecin - 15.04.2016, 13:55
Re: Defining MAX_PLAYERS - by Eyce - 15.04.2016, 14:05
Re: Defining MAX_PLAYERS - by Vince - 15.04.2016, 14:47
Re: Defining MAX_PLAYERS - by yugecin - 15.04.2016, 15:15
Re: Defining MAX_PLAYERS - by Eyce - 15.04.2016, 17:01
Re: Defining MAX_PLAYERS - by NaS - 15.04.2016, 17:07
Re: Defining MAX_PLAYERS - by AbyssMorgan - 15.04.2016, 18:05
Re: Defining MAX_PLAYERS - by Konstantinos - 15.04.2016, 18:11
Re: Defining MAX_PLAYERS - by AmigaBlizzard - 15.04.2016, 19:42

Forum Jump:


Users browsing this thread: 1 Guest(s)