Core_functions.h
Code: Select all
char* UObject::GetFullName_()
{
if ( this->Class && this->Outer )
{
static char cOutBuffer[ 256 ];
if ( this->Outer->Outer )
{
strcpy_s ( cOutBuffer, this->Class->GetName() );
strcat_s ( cOutBuffer, " " );
strcat_s ( cOutBuffer, this->Outer->Outer->GetName() );
strcat_s ( cOutBuffer, "." );
strcat_s ( cOutBuffer, this->Outer->GetName() );
strcat_s ( cOutBuffer, "." );
strcat_s ( cOutBuffer, this->GetName() );
}
else
{
strcpy_s ( cOutBuffer, this->Class->GetName() );
strcat_s ( cOutBuffer, " " );
strcat_s ( cOutBuffer, this->Outer->GetName() );
strcat_s ( cOutBuffer, "." );
strcat_s ( cOutBuffer, this->GetName() );
}
int id = *(int*)(this->Name.unknownData00) - 1;
if (id != -1)
{
char strID[10];
sprintf_s (strID, "_%i", id);
strcat_s (cOutBuffer, strID);
}
return cOutBuffer;
}
return "(null)";
}
template< class T > T* UObject::FindObject_ ( char* ObjectFullName )
{
while ( ! UObject::GObjObjects() )
Sleep ( 100 );
for ( int i = 0; i < UObject::GObjObjects()->Count; ++i )
{
UObject* Object = UObject::GObjObjects()->Data[ i ];
// skip no T class objects
if
(
! Object
|| ! Object->IsA ( T::StaticClass() )
)
continue;
// check
if ( ! _stricmp ( Object->GetFullName_(), ObjectFullName ) )
return (T*) Object;
}
return NULL;
}
Core_classes.h
As I suspected, each wave has a separate instance of SFXWave_Horde.
With the new code, I'm able to retrieve individual waves like this:
Code: Select all
wavehordereaper = (USFXWave_Horde_Reaper2*)UObject::FindObject_<UObject>("SFXWave_Horde_Reaper2 Transient.SFXWave_Horde_Reaper2_0");
For example, that would be wave 1.
The only problem is that the wave name id doesn't stay the same for all matches, so if I create another match, I can no longer retrieve wave 1 with "SFXWave_Horde_Reaper2_0" (in the dump I have right now, the "lowest" wave is "SFXWave_Horde_Reaper2_14").
Now I'm trying to find where this wave id is stored.
Obviously those examples are valid
only for a Reaper match. I'm also trying to find where enemy, map and difficulty are stored.
Edit: SFXGRIMP has difficulty, map and enemy.
To those who don't know: PRI = player replication info. GRI = game replication info.