small fix
authorstian853 <stian853@su15-112.ad.liu.se>
Mon, 4 Dec 2023 08:34:55 +0000 (09:34 +0100)
committerstian853 <stian853@su15-112.ad.liu.se>
Mon, 4 Dec 2023 08:34:55 +0000 (09:34 +0100)
assets/data.json
src/States.cc

index 9a1798c930f29484bba90658e9bdcde390f7b3ba..c7a2d2a19e83c629d02b68b55a9ebf73dc45038b 100644 (file)
@@ -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":
index fdfd535f35fcc914083bc41f2c67a6cc900e3192..7bd05b612937555809e60f98b35d8cbfdadddcee 100644 (file)
@@ -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<float>(data["game_constants"]["point_scale_div"]));
         player->zero_collected();
 
         player->collision(*helper);