static void monster_spawn(struct entity *self, void *data)
{
- (void) data;
-
self->meta = malloc(sizeof(struct monster_data));
((struct monster_data *) self->meta)->timer = 0.5;
}
};
-static void spawn_monster(int x, int y)
+static void spawn_monster(int x, int y, enum mg_context ctx)
{
spawn(monster_entity, x, y, NULL);
}
__attribute__((constructor)) static void init()
{
register_air_function((struct generator_function) {
- .chance = 50,
+ .corridor_chance = 50,
+ .room_chance = 200,
.callback = &spawn_monster,
});
}