Age | Commit message (Collapse) | Author |
|
|
|
|
|
-Codechange: rewrote some functions while moving waypoint-stuff
-Add: added support for 64k waypoints
-Fix: made the waypoint struct a bit more logic (no bit-fucking)
|
|
- Use TileOffsByDir() instead of home brewed table
|
|
flags for depots by something more meaningful
|
|
v->set_for_replacement as they caused desyncs.
The bad sideeffect of this is that now no vehicle will automatically go to a depot anymore just
because it is set to be autoreplaced. We will have to find a better way to solve this problem.
Revisions reverted: 1640, 1707, 1709, 1710, 1712(but not the cheat prevention in this one)
|
|
|
|
|
|
|
|
have been used two commits ago.
Message for last commit should have been:
- Add: [NPF] Added penalty for curves, straighter paths are now preferred when the length is the same. (HackyKid)
|
|
the path.
- Add: [NPF] NPFGetFlag() and NPFSetFlag() to wrap NPF node flag handling
|
|
|
|
that it works for the ai_new. It is de iure not a bug yet but let's be safe against future annoying headaches. Signed-Off-By: TrueLight
|
|
|
|
|
|
where a TileIndex was only 24bit wide (on 32bit architectures)
|
|
|
|
similar stuff)
|
|
checked properly.
|
|
more appropriate headers
|
|
|
|
use the enum as parameter type for CreateEffectVehicle*()
-Fix: [1116619] Generate the correct smoke type for diesel trains
|
|
|
|
enter other players' depots. TODO
- Add: asserts to find the v->u.rail.track == 0 problem.
- Add: IsValidDepot(), IsValidTown(), IsValidSign(), IsValidVehicle(), IsValidStation()
- Add: GetTileOwner(), IsTileOwner()
- Codechange: Replaced IsShipDepotTile(), IsTrainDepotTile(), IsRoadDepotTile() by IsTileDepotType().
- Codechange: typedeffed the MAP_OWNERS as Owner. Should be used as variable type.
- Codechange: Replaced a few uint by TileIndex.
|
|
-Codechange: Added wrappers around depot-access (GetDepot no exists)
-Codechange: Made depot-functions a bit more logic (no longer
GetDepotByTile crashes your game when you request it on a non-depot tile)
-Add: made depots dynamic (yes, 64k depots are possible now)
|
|
to 5000
trains in one game (instead of the 240 which was the current value).
Default max allowed vehicles per type is changed:
Trains: 500 (old 80)
Road: 500 (old 80)
Ships: 200 (old 40)
Aicraft: 300 (old 50)
(Tnx to Celestar and Darkvater for checking the patch)
|
|
(and should be an uint16, not uint8)
|
|
- Supports trains, road vehicles and ships.
- Uses A* pathfinding (same codebase as the new ai).
- Currently unlimited search depth, so might perform badly on large maps/networks (especially ships).
- Will always find a route if there is one.
- Allows custom penalties for obstacles to be set in openttd.cfg (npf_ values).
- With NPF enabled, ships can have orders that are very far apart. Be careful, this will break (ships get lost) when the old pathfinder is used again.
- Feature: Disabling 90 degree turns for trains and ships.
- Requires NPF to be enabled.
- Ships and trains can no longer make weird 90 degree turns on tile borders.
- Codechange: Removed table/directions.h.
- table/directions.h contained ugly static tables but was included more than once. The tables, along with a few new ones are in npf.[ch] now. Better suggestions for a location?
- Fix: Binary heap in queue.c did not allocate enough space, resulting in a segfault.
- Codechange: Rewritten FindFirstBit2x64, added KillFirstBit2x64.
- Codechange: Introduced constant INVALID_TILE, to replace the usage of 0 as an invalid tile. Also replaces TILE_WRAPPED.
- Codechange: Moved TileAddWrap() to map.[ch]
- Add TileIndexDiffCByDir(), TileIndexDiffCByDir().
- Codechange: Moved IsTrainStationTile() to station.h
- Add: IsRoadStationTile() and GetRoadStationDir().
|
|
give the more meaningful names
|
|
GetVehicle() from reading an invalid vehicle index
- Fix: added check for v->type in some commands, which expects v to be a specific type
Checks like this is needed to protect network servers from people, who hack their clients to either cheat or crash the server
NOTE: if I made a mistake here it can make a function unreachable when it should be used. Here is one place to look if something weird happens
|
|
TTDPatch non-stop handling behaviour
|
|
|
|
by selling carriages in a MP game faster than the network can handle. (Truelight)
|
|
this commit alters ai.c a little to get rid of the workaround from r1725 so AI players could still build locomotives
|
|
own the depot too (hacked client protection)
|
|
[GS]etTileType() instead of plain int.
This makes it necessary to rename TileType() to GetTileType() because a type and a function may not share the same name.
|
|
single tile from map.h and put them into a seperate file tile.h
|
|
to a depot
- Feature: [autoreplace] trains now tries to find a depot if they needs to be replaced
Now all 4 types of vehicles goes to a depot if they needs to be replaced
|
|
|
|
that are not available yet (Hackykid)
|
|
it is sufficient. FindLandscapeHeightByTile() uses GetTileSlope() internally and adds some more info, which is discarded in these cases.
While touching the code make a bit more clear how GetBridgeHeight() works.
|
|
This will make things more difficult as narrow curves
and depots impose rather strict speed limits. Feedback welcome
For those who don't like low-speed curves: Switch it off
|
|
adapt the save/load data and some other parts of the code to that change
WARNING: If i made any mistake here it WILL lead to corrupted savegames!
|
|
enters/leaves a depot (Hackykid)
fix: the ship status bar was not updated properly after a breakdown if show_speed was off (Hackykid)
|
|
more of a
workaround, as somewhere there might be some InteractiveRandom() abuse
in the code.
|
|
|
|
to the autoreplace vehicle windows and made them show only the vehicles you actually have in the left list.
this also fixes some window updates issues when autoreplacing
|
|
|
|
|
|
|