mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-10-19 19:52:39 +00:00
b831acd59c
The old implementation was hacky and often returned desynchronized results. This implementation gives a seed to each sync object, and synchronizes that seed. Also allows for a seed to be saved temporarily based on position and recycled for multiple calls.
18 lines
No EOL
305 B
C
18 lines
No EOL
305 B
C
#ifndef RNG_POSITION_H
|
|
#define RNG_POSITION_H
|
|
|
|
#include "types.h"
|
|
|
|
struct RngPosition {
|
|
Vec3f position;
|
|
u16 seed;
|
|
u8 life;
|
|
};
|
|
|
|
extern struct RngPosition* gOverrideRngPosition;
|
|
|
|
void rng_position_init(f32 x, f32 y, f32 z);
|
|
void rng_position_finish(void);
|
|
void rng_position_update(void);
|
|
|
|
#endif |