Posted 13-Jul-11 13:02 by unknown

c# dev kit question

ok by some digging I fixed this!!
wohoo
note this might crash weirdly but it seems to work for me so far!!!
this is a hack but I'm sure stephan will implement it soon better..

ok firstly goto nation.cs lines 382
add public before the servercall stuff.
so like this:
public delegate int ServerCall(int command, int nation, int subject, void* data);

public readonly ServerCall serverCall;


ok now in your empire.cs
add debugmap variable:
Int32[] debugmap;

And I've put this in newgame:

unsafe
{
debugmap = new Int32[Map.Size];
fixed (void* p = debugmap)
{
serverCall(Protocol.sSetDebugMap, Us.ID, 0, p);
}
}


now debugmap is fixed..
can do like this:
for (int i = 0; i < Map.Size; i++)
debugmap[i] = i;

to fill with tile numbers for a silly example :)

later
TJ





Answer This Posting

User Name

New user

Password

Change password

Subject

Text

Administration

Password