diff --git a/w/w.c b/w/w.c index 819e06b..2a3e753 100644 --- a/w/w.c +++ b/w/w.c @@ -368,6 +368,7 @@ void updatepov() pov[2 - frontoffset][1 + rtoloffset] = charatpos(newX, newY); } } + update3dpov(); } void forward() @@ -451,6 +452,7 @@ void clearscreen() void init() { printf("Démarrage...\n"); + map[0] = 0; srand(time(NULL)); FILE* file = fopen(statepath, "r"); if (file) @@ -838,8 +840,11 @@ void update(char* command) state.position.x = 1; state.position.y = 13; state.position.orientation = NORTH; - - initmap(); + + if (map[0] == 0) + { + initmap(); + } updatepov(); } else if (c == CMD_GOTOMARKET) @@ -966,7 +971,6 @@ void draw() } else if (state.screen == SC_MAP) { - update3dpov(); drawpov3d(); // todo: would need a compass?