You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Added tree particle fix
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include "config.h"
|
||||
// tree_particles.c.inc
|
||||
|
||||
void bhv_tree_snow_or_leaf_loop(void) {
|
||||
@@ -33,15 +34,23 @@ void bhv_tree_snow_or_leaf_loop(void) {
|
||||
|
||||
void bhv_snow_leaf_particle_spawn_init(void) {
|
||||
struct Object *obj; // Either snow or leaf
|
||||
#ifdef TREE_PARTICLE_FIX
|
||||
struct Object *nearestTree = NULL;
|
||||
#endif
|
||||
UNUSED s32 unused;
|
||||
s32 isSnow;
|
||||
f32 scale;
|
||||
UNUSED s32 unused2;
|
||||
gMarioObject->oActiveParticleFlags &= ~0x2000;
|
||||
#ifdef TREE_PARTICLE_FIX
|
||||
nearestTree = cur_obj_nearest_object_with_behavior(bhvTree);
|
||||
isSnow = (nearestTree->header.gfx.sharedChild == gLoadedGraphNodes[MODEL_CCM_SNOW_TREE] || nearestTree->header.gfx.sharedChild == gLoadedGraphNodes[MODEL_SL_SNOW_TREE]);
|
||||
#else
|
||||
if (gCurrLevelNum == LEVEL_CCM || gCurrLevelNum == LEVEL_SL)
|
||||
isSnow = 1;
|
||||
else
|
||||
isSnow = 0;
|
||||
#endif
|
||||
if (isSnow) {
|
||||
if (random_float() < 0.5) {
|
||||
obj = spawn_object(o, MODEL_WHITE_PARTICLE_DL, bhvTreeSnow);
|
||||
|
||||
Reference in New Issue
Block a user