Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

building on burning oil #1100

Closed
wzdev-ci opened this issue Nov 22, 2009 · 24 comments
Closed

building on burning oil #1100

wzdev-ci opened this issue Nov 22, 2009 · 24 comments

Comments

@wzdev-ci
Copy link
Contributor

keyword_burning_oil resolution_fixed type_bug | by Terminator


Not only I can build on burning oil and AI can do it too.


Issue migrated from trac:1100 at 2022-04-15 20:06:40 -0700

@wzdev-ci
Copy link
Contributor Author

Terminator uploaded file wz2100_shot_002.png (61.4 KiB)

wz2100_shot_002.png

@wzdev-ci
Copy link
Contributor Author

Zarel changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Zarel set resolution to fixed

@wzdev-ci
Copy link
Contributor Author

Zarel commented


Hopefully fixed in [8493]/[8494].

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 4, 2010

Safety0ff changed priority from major to minor

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 4, 2010

Safety0ff changed status from closed to reopened

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 4, 2010

Safety0ff changed operating_system which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 4, 2010

Safety0ff changed resolution from fixed to ``

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 4, 2010

Safety0ff commented


Still present.

Steps to reproduce:

  • have a fire weapon kill a derrick,

  • when the fire from the flamer goes out you can build on the resource.

If you look that the above screen shot you'll see a flamer (which likely killed the derrick.)
I've attached a very inefficient hack / patch to show where the problem occurs.

I'll leave it up to someone with better knowledge of the code base to choose the best solution.

This happens in 2.3 and trunk, the patch was made from trunk.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 4, 2010

Safety0ff uploaded file firehack.diff (0.7 KiB)

Made from trunk

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Feb 5, 2010

Safety0ff commented


It is be possible to increase the efficiency of the patch by using a separate list for fire (or just partitioning the list with the fire at the front.)
Also it should be possible to compare the positions directly without using mapTile().

The alternative is to have each tile have a variable to count the number of burning effects. Incremented when fire is created on a tile, decremented when fire is killed.

@wzdev-ci
Copy link
Contributor Author

Safety0ff changed milestone from 2.3 to 2.3.1

@wzdev-ci
Copy link
Contributor Author

cybersphinx changed milestone from 2.3.1 to unspecified

@wzdev-ci
Copy link
Contributor Author

Per changed status from reopened to closed

@wzdev-ci
Copy link
Contributor Author

Per changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

cybersphinx changed status from closed to reopened

@wzdev-ci
Copy link
Contributor Author

cybersphinx changed resolution from fixed to ``

@wzdev-ci
Copy link
Contributor Author

cybersphinx commented


At least in 2.3 this still happens, see #2473.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 1, 2011

cybersphinx uploaded file 0001-Prevent-building-on-burning-oil.patch (1.6 KiB)

Simple solution, not sure if that breaks anything though.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 1, 2011

cybersphinx uploaded file burning oil.tar.gz (184.5 KiB)

2.3 test savegame

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 1, 2011

Per commented


uint8_t firecount; please

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 1, 2011

cybersphinx changed status from reopened to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 1, 2011

cybersphinx changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 1, 2011

cybersphinx commented


Prevent building on burning oil.

Add a counter per map tile for fire effects, only clear the "is burning" bit
when it is 0.

This works only because the part that actually loaded effects from savegames
vanished in 695cd8edf538c800d8819b7080eb8fb5c84bc8a4, so we start with a clean
slate after loading.

Closes #1100.
Changeset: 2745ac27f84301c05b678892d798a93fd4e7f813

@wzdev-ci wzdev-ci closed this as completed May 1, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant