Project

General

Profile

Bug #763881

Pollution is placed 1% more than pollution value of city

Added by Akechi . almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Server
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Pollution is placed 1% more than pollution value of city.

From http://freeciv.wikia.com/wiki/Forum:Some_tiny_issues (10):

server\cityturn.c
check_pollution
if (pcity->pollution != 0 && fc_rand(100) <= pcity->pollution) {

city_pollution.patch (665 Bytes) city_pollution.patch Anonymous, 2018-07-31 01:29 AM
city_pollution-s25.patch (669 Bytes) city_pollution-s25.patch Anonymous, 2018-07-31 01:32 AM

Related issues

Blocks Freeciv - Task #656706: Handle http://freeciv.wikia.com/wiki/Forum:Some_tiny_issuesNew

History

#1 Updated by Jacob Nevins almost 2 years ago

  • Blocks Task #656706: Handle http://freeciv.wikia.com/wiki/Forum:Some_tiny_issues added

#2 Updated by Anonymous almost 2 years ago

Patches attached.
I removed also check for pcity->pollution != 0, but maybe it could stay to some give few cpu cycles , bc compiler doesnt need to check second statement after seeing first fails ( I'm not sure how expensive operation is rand())

#3 Updated by Anonymous almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF