mirror of
https://github.com/reaaLx/nx1-gsc-dump.git
synced 2026-04-14 23:48:43 +00:00
Init
This commit is contained in:
23
codescripts/struct.gsc
Normal file
23
codescripts/struct.gsc
Normal file
@@ -0,0 +1,23 @@
|
||||
InitStructs()
|
||||
{
|
||||
level._struct = [];
|
||||
}
|
||||
|
||||
CreateStruct()
|
||||
{
|
||||
struct = spawnstruct();
|
||||
level._struct[level._struct.size] = struct;
|
||||
return struct;
|
||||
}
|
||||
|
||||
FindStruct( position )
|
||||
{
|
||||
for( i = 0; i < level._struct.size; i++ )
|
||||
{
|
||||
if( DistanceSquared( level._struct[i].origin, position ) < 1 )
|
||||
{
|
||||
return level._struct[i];
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user