Game Development Community

Exec 2 sets of files?

by Shon Gale · in RTS Starter Kit · 09/20/2005 (10:13 am) · 3 replies

I came across an interesting feature in the script of the RTS. It seems that there are 2 functions that exec the same set of files.
The functions are initServer() in init.cs and onServerCreated() in game.cs
I checked the exec's line by line and the only difference is in initServer() the last exec is "./scripts/core/game.cs which loads and sets up the redundant exec's
Do I need more than 1 copy of these in memory?

#1
09/21/2005 (4:43 am)
Well I answered my own question by playing with it. I deleted all of the exec's in init.cs and left the one in for server/scripts/core/game.cs and it was a redundant entry.
Thanks for noticing me (eeyore) :)
#2
09/21/2005 (4:55 am)
Exec'ing has no memory hit, incidentally. (Except for the first time.)

If you're concerned, I suggest checking memory usage before and after the second execution to see if there's a difference.
#3
09/21/2005 (5:10 am)
Once again thanks and that was an interesting tidbit and seems logical.