1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-26 03:17:39 +00:00

ads-game:: resource expiration

This commit is contained in:
Zeno Rogue
2022-09-18 17:29:01 +02:00
parent a1a65ac612
commit 567ef8e7e6
3 changed files with 16 additions and 4 deletions

View File

@@ -85,6 +85,11 @@ void draw_game_cell(cell *c, ads_matrix V, ld plev) {
for(auto& r: ci.rocks) {
auto& rock = *r;
if(!paused) {
if(rock.type == oRock && rock.expire < pdata.score) { rock.resource = rtNone; rock.col = rock_color[rtNone]; rock.expire = 999999; }
if(rock.type == oResource && rock.expire < pdata.score) { rock.resource = rtNone; rock.col = rsrc_color[rtNone]; rock.shape = rsrc_shape[rtNone]; rock.expire = 999999; }
}
hybrid::in_actual([&]{
dynamicval<eGeometry> b(geometry, gRotSpace);