Jump to content

Recommended Posts

Posted (edited)

source


int instance_create{
...
	// Searching a Free Instance
	// 0 is ignored as this mean "no instance" on maps
	ARR_FIND(1, MAX_INSTANCE_DB, i, instance_data[i].state == INSTANCE_FREE);
	if( i >= MAX_INSTANCE_DB )
		return -4;
...
}

 

I think the MAX_INSTANCE_DB should be replaced by MAX_INSTANCE_DATA

because size of instance_data can be found in instance.h.

extern struct instance_data instance_data[MAX_INSTANCE_DATA];

 

 

 

Edited by cwgxcqwr
Posted

It's using MAX_INSTANCE_DB because only X amount of instances can be created. Also, it cycles through, instance_db.txt to check to see if the name given in the instance_create command, actually exists. Hence the reason for using it.

  • 3 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...