Page 1 of 1
Cluster system
Posted: 16 Mar 2012, 01:31
by aubergine
Anyone know what clusters are used for elsewhere in the codebase?
https://github.com/Warzone2100/warzone2 ... luster.cpp
Re: Cluster system
Posted: 16 Mar 2012, 02:07
by i-NoD
Aren't those for sp remote missions?
Keeps your droid/buildings aside from homebase forces.
Re: Cluster system
Posted: 16 Mar 2012, 02:24
by aubergine
Not sure - it looks like it's used in skirmish and mp too, but I'm not exactly sure what for.
Re: Cluster system
Posted: 16 Mar 2012, 03:20
by i-NoD
What makes you think its in mp?
Re: Cluster system
Posted: 16 Mar 2012, 03:53
by aubergine
I've just seen it used in several cpp files so far, and there doesn't seem to be any checks regarding campaign mode to filter out its use.
From what I can see the cluster code is actually finding clusters of droids/structures on the current map/level and then it's used in a bunch of other source files throughout WZ. If you grep to find files that include it and then look for cluster related stuff in them you'll see what I mean.
Note: I'm still struggling to understand the C code fully, so I could be totally wrong.
Re: Cluster system
Posted: 16 Mar 2012, 14:09
by i-NoD
No one told that one may only use that code in sp, simply put this code just idling when called from mp or skirmish.
Here is the entry point for droid: void clustNewDroid(DROID *psDroid)
Look into it, the only way for droid to be added is when current apsDroidLists has non-default cluster. Now you have to check when apsDroidLists assigned a non-default cluster. I haven't checked, but if memory serves me well its done when you go into remote missions...