mirror of
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer.git
synced 2025-06-10 18:57:58 -05:00
Added all the remaining scripts not previously included.
This commit is contained in:
41
common_zm/codescripts/struct.gsc
Normal file
41
common_zm/codescripts/struct.gsc
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
initstructs()
|
||||
{
|
||||
level.struct = [];
|
||||
}
|
||||
|
||||
createstruct()
|
||||
{
|
||||
struct = spawnstruct();
|
||||
level.struct[ level.struct.size ] = struct;
|
||||
return struct;
|
||||
}
|
||||
|
||||
findstruct( position )
|
||||
{
|
||||
_a20 = level.struct_class_names;
|
||||
key = getFirstArrayKey( _a20 );
|
||||
while ( isDefined( key ) )
|
||||
{
|
||||
_ = _a20[ key ];
|
||||
_a22 = level.struct_class_names[ key ];
|
||||
val = getFirstArrayKey( _a22 );
|
||||
while ( isDefined( val ) )
|
||||
{
|
||||
s_array = _a22[ val ];
|
||||
_a24 = s_array;
|
||||
_k24 = getFirstArrayKey( _a24 );
|
||||
while ( isDefined( _k24 ) )
|
||||
{
|
||||
struct = _a24[ _k24 ];
|
||||
if ( distancesquared( struct.origin, position ) < 1 )
|
||||
{
|
||||
return struct;
|
||||
}
|
||||
_k24 = getNextArrayKey( _a24, _k24 );
|
||||
}
|
||||
val = getNextArrayKey( _a22, val );
|
||||
}
|
||||
key = getNextArrayKey( _a20, key );
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user