forked from townforge/townforge
cc: do not stop a building fire randomly just after it started
This commit is contained in:
parent
8a12d350a8
commit
b7cbde7ee3
@ -679,7 +679,12 @@ static void add_cities(const BlockchainDB &db, uint8_t version, cc_command_game_
|
||||
{
|
||||
FlagState &flag = *on_fire[i];
|
||||
uint32_t p = fire_rand_state.get() % 100;
|
||||
if (p < 3 * fire_duration || flag.fire_state >= 100)
|
||||
bool stop;
|
||||
if (version >= HF_TF_3)
|
||||
stop = (flag.fire_state > 8 && p < 3 * fire_duration) || flag.fire_state >= 100;
|
||||
else
|
||||
stop = p < 3 * fire_duration || flag.fire_state >= 100;
|
||||
if (stop)
|
||||
{
|
||||
events.add(cg, flag.owner, flag.id) << "Fire stopped after burning for " << (unsigned)flag.fire_state << " ticks";
|
||||
cg.cities.back().fire.push_back({flag.id, 128});
|
||||
|
@ -188,6 +188,7 @@
|
||||
|
||||
#define HF_TF_1 15
|
||||
#define HF_TF_2 16
|
||||
#define HF_TF_3 17
|
||||
|
||||
#define PER_KB_FEE_QUANTIZATION_DECIMALS 8
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user