From: stian853 Date: Mon, 4 Dec 2023 08:34:55 +0000 (+0100) Subject: small fix X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=45a031abdedd13e5046a4175769d71722e8968a9;p=TDDC76_proj.git small fix --- diff --git a/assets/data.json b/assets/data.json index 9a1798c..c7a2d2a 100644 --- a/assets/data.json +++ b/assets/data.json @@ -32,7 +32,8 @@ "game_time" : 60, "yf_per_second": 0.125, "bikes_per_second": 0.25, - "scoreboard" : 5 + "scoreboard" : 5, + "point_scale_div": 3.0 }, "map": diff --git a/src/States.cc b/src/States.cc index fdfd535..7bd05b6 100644 --- a/src/States.cc +++ b/src/States.cc @@ -121,7 +121,7 @@ void Game_state::update(Context &context) if (player->collides(*helper)) { - points += player->get_collected() + floor(player->get_collected() / 3.0f); + points += player->get_collected() + floor(player->get_collected() / static_cast(data["game_constants"]["point_scale_div"])); player->zero_collected(); player->collision(*helper);