From 8766621b4138baf3822a71efa96777fabacc6a44 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 1 Nov 2009 12:14:22 +0100 Subject: [PATCH] Revert "calculate money when loading statefile" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This reverts commit c15e61817a0f5c4e4d28e406d8b3761be32f1cfc. We have to wait until we can use a datatype which doesn’t overflow so easily. Currently, we have a maximum of 65535, which is, in combination with other funny bugs (256 entities of X sold) reached quite quickly. --- src/config.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/config.c b/src/config.c index 5b9a918..3ee69bd 100644 --- a/src/config.c +++ b/src/config.c @@ -96,12 +96,9 @@ void load_items() { if (items_exists) { items_sold = 0; - money = 0; cbm_load("items", (BYTE)8, &status); - for (c = 0; c < status.num_items; c++) { + for (c = 0; c < status.num_items; c++) items_sold += status.status[c].times_sold; - money += status.status[c].price * status.status[c].times_sold; - } } else memset(&status, 0, sizeof(struct status_array_t)); } -- 2.39.5