Add icemaker item spawn replay event

isolation_bkp/dynres
Dominik Madarász 2021-09-08 12:04:35 +02:00
parent 8b437d53cd
commit 664aa09654
2 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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