Add icemaker item spawn replay event
parent
8b437d53cd
commit
664aa09654
|
@ -12,6 +12,7 @@ typedef enum {
|
|||
RPKIND_PLACE_ICE_RINK,
|
||||
RPKIND_PLACE_ERASE_CHANGES,
|
||||
RPKIND_SPAWN_CIRCLING_DRIVER,
|
||||
RPKIND_SPAWN_ICEMAKER_ITEM,
|
||||
} replay_kind;
|
||||
|
||||
typedef struct {
|
||||
|
@ -166,9 +167,10 @@ void debug_replay_run(void) {
|
|||
camera_set_follow(mime);
|
||||
}
|
||||
|
||||
void ActPlaceIceRink();
|
||||
void ActPlaceIceRink(void);
|
||||
void ActSpawnCirclingDriver(void);
|
||||
void ActEraseWorldChanges(void);
|
||||
void ActSpawnIcemaker(void);
|
||||
|
||||
void debug_replay_update(void) {
|
||||
if (!is_playing) return;
|
||||
|
@ -211,6 +213,9 @@ void debug_replay_update(void) {
|
|||
case RPKIND_PLACE_ERASE_CHANGES:{
|
||||
ActEraseWorldChanges();
|
||||
}break;
|
||||
case RPKIND_SPAWN_ICEMAKER_ITEM:{
|
||||
ActSpawnIcemaker();
|
||||
}break;
|
||||
default: {
|
||||
ZPL_PANIC("unreachable");
|
||||
}break;
|
||||
|
|
|
@ -27,6 +27,8 @@ ActSpawnIcemaker(void) {
|
|||
Position const* origin = ecs_get(world_ecs(), plr, Position);
|
||||
Position * dest = ecs_get_mut(world_ecs(), e, Position, NULL);
|
||||
*dest = *origin;
|
||||
|
||||
debug_replay_special_action(RPKIND_SPAWN_ICEMAKER_ITEM);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue