-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ped Randomizer: Randomize Ambient Model Sets for more variety
- Loading branch information
Showing
8 changed files
with
79 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
470 | ||
471 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "CAmbientModelSets.hh" | ||
#include "Utils.hh" | ||
|
||
void | ||
CAmbientModelSetsManager::InitialisePatterns () | ||
{ | ||
sm_Instance = GetRelativeReference<CAmbientModelSetsManager *> ( | ||
"? 8b 0d ? ? ? ? ? 8b c3 8b d0 e8 ? ? ? ?", 3, 7); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <rage.hh> | ||
|
||
enum AmbientModelSetType | ||
{ | ||
AMBIENT_PED_MODEL_SET = 0, | ||
AMBIENT_PROP_MODEL_SET, | ||
AMBIENT_VEHICLE_MODEL_SET | ||
}; | ||
|
||
struct CAmbientModel | ||
{ | ||
uint32_t Name; | ||
uint32_t field_0x4; | ||
void * Variations; | ||
float Probability; | ||
uint32_t field_0x14; | ||
}; | ||
|
||
struct CAmbientModelSet | ||
{ | ||
void * vft; | ||
uint32_t Name; | ||
uint32_t field_0xc; | ||
struct atArray<CAmbientModel> Models; | ||
uint32_t field_0x1c; | ||
}; | ||
|
||
struct CAmbientModelSets | ||
{ | ||
atArray<CAmbientModelSet *> ModelSets; | ||
uint8_t field_0xc[28]; | ||
}; | ||
|
||
struct CAmbientModelSetsManager | ||
{ | ||
uint8_t field_0x0[16]; | ||
struct CAmbientModelSets aSets[3]; | ||
|
||
inline static CAmbientModelSetsManager **sm_Instance; | ||
|
||
static CAmbientModelSetsManager * | ||
Get () | ||
{ | ||
return *sm_Instance; | ||
} | ||
|
||
static void InitialisePatterns (); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters