checked 54 patch_mp/maps/mp scripts

This commit is contained in:
JezuzLizard
2020-06-13 01:37:00 -07:00
parent a46530d2fd
commit d2202281cd
55 changed files with 1781 additions and 1815 deletions

View File

@ -1,21 +1,20 @@
//checked includes matches cerberus output
#include codescripts/character;
setmodelfromarray( a )
setmodelfromarray( a ) //checked matches cerberus output
{
self setmodel( a[ randomint( a.size ) ] );
}
precachemodelarray( a )
precachemodelarray( a ) //checked changed to match cerberus output
{
i = 0;
while ( i < a.size )
for ( i = 0; i < a.size; i++ )
{
precachemodel( a[ i ] );
i++;
}
}
attachfromarray( a )
attachfromarray( a ) //checked matches cerberus output
{
self attach( codescripts/character::randomelement( a ), "", 1 );
}

View File

@ -1,16 +1,19 @@
main()
main() //checked changed to match cerberus output
{
/*
/#
assert( isDefined( self ) );
#/
*/
wait 0;
if ( isDefined( self ) )
{
/*
/#
if ( isDefined( self.classname ) )
{
if ( self.classname != "trigger_once" || self.classname == "trigger_radius" && self.classname == "trigger_multiple" )
if ( self.classname == "trigger_once" || self.classname == "trigger_radius" || self.classname == "trigger_multiple" )
{
println( "" );
println( "*** trigger debug: delete.gsc is deleting trigger with ent#: " + self getentitynumber() + " at origin: " + self.origin );
@ -18,6 +21,7 @@ main()
#/
}
}
*/
self delete();
}
}

View File

@ -1,41 +1,29 @@
initstructs()
initstructs() //checked matches cerberus output
{
level.struct = [];
}
createstruct()
createstruct() //checked matches cerberus output
{
struct = spawnstruct();
level.struct[ level.struct.size ] = struct;
return struct;
}
findstruct( position )
findstruct( position ) //checked changed to match cerberus output see info.md
{
_a20 = level.struct_class_names;
key = getFirstArrayKey( _a20 );
while ( isDefined( key ) )
foreach ( _ in level.struct_class_names )
{
_ = _a20[ key ];
_a22 = level.struct_class_names[ key ];
val = getFirstArrayKey( _a22 );
while ( isDefined( val ) )
foreach ( s_array in level.struct_class_names[ key ] )
{
s_array = _a22[ val ];
_a24 = s_array;
_k24 = getFirstArrayKey( _a24 );
while ( isDefined( _k24 ) )
foreach ( struct in s_array )
{
struct = _a24[ _k24 ];
if ( distancesquared( struct.origin, position ) < 1 )
if(distancesquared( struct.origin, position ) < 1 )
{
return struct;
}
_k24 = getNextArrayKey( _a24, _k24 );
}
val = getNextArrayKey( _a22, val );
}
key = getNextArrayKey( _a20, key );
}
}