Commit Graph

1238 Commits

Author SHA1 Message Date
bjarni 73c0cc5203 (svn r1741) - Fix: added IsVehicleIndex() so it's possible to protect 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
2005-01-30 20:50:06 +00:00
celestar 94f6208bde (svn r1740) -Fix: [ 1112342 ] Realistic acceleration works properly with TTDPatch non-stop handling behaviour 2005-01-30 19:51:39 +00:00
darkvater 55e1eab1a2 (svn r1739) - Fix: type checking when selling vehicles (TrueLight) 2005-01-30 18:51:08 +00:00
celestar e3287ad303 (svn r1738) -Fix: [ 1108735 ] Fixed (hopefully) an assertion that was cause by selling carriages in a MP game faster than the network can handle. (Truelight) 2005-01-30 18:40:52 +00:00
tron 7526afdae0 (svn r1737) Add DEBUG category "map" and use it to print the map size when allocating the map 2005-01-30 18:12:37 +00:00
celestar 5f05703206 (svn r1736) -Fix: Forgot to remove some unused variables in last commit :( 2005-01-30 17:53:44 +00:00
celestar 6d1ee15b9a (svn r1735) -Fix: [ 1112285 ] Fixed an assertion error with stations where stops
were deleted, the assertions were just plain wrong at that place. Used a
more graceful handling. Todo: What happens if ALL stations in a schedule
have no suitable stop?
2005-01-30 17:46:57 +00:00
darkvater 1527ef3db0 (svn r1734) - Fix: [ 1112253 ] hijacking of arrow keys, game also scrolled when it was out of focus (dominik) 2005-01-30 16:54:39 +00:00
darkvater 8580e73b65 (svn r1733) - Fix: oops "| 1" is SETBIT(x, 0), not 1 :(. Now you can remove signals again 2005-01-30 16:08:19 +00:00
darkvater f838448552 (svn r1732) - Change: [OS/2] [ 1112148 ] Project file update (orudge) 2005-01-30 16:00:37 +00:00
darkvater abf2ae3f80 (svn r1731) - Fix: [ 1106930 ] BugFix: placing signals with 2x1 drags workaround is completely rewritten. Also features checks for hacked/modified clients. Thanks a lot Hackykid! 2005-01-30 15:57:38 +00:00
bjarni 307c27892d (svn r1730) - Fix: Ships and Aircrafts have to be build in depots owned by _current_player (hacked client protection)
now all 4 types of vehicles have to be build in depots. Note: there is a wordaround for AI players since the AI handle aircraft building in a weird way
2005-01-30 14:52:04 +00:00
darkvater 961ba55e85 (svn r1729) - Fix: [ 1112469 ] Clearing land for free by reallocating HQ 2005-01-30 14:32:52 +00:00
bjarni e8f4b7cf19 (svn r1728) - Fix: now a player can only build a road vehicle in depots he owns (hacked client protection) 2005-01-30 13:42:11 +00:00
bjarni 5987455d35 (svn r1727) - Fix: now CmdBuildRailVehicle() behaves correctly if DC_EXEC is set
this commit alters ai.c a little to get rid of the workaround from r1725 so AI players could still build locomotives
2005-01-30 13:03:32 +00:00
tron cc7f7220c0 (svn r1726) Move an assert() because it could not catch all cases of incorrect input where it was placed 2005-01-30 08:25:39 +00:00
bjarni c16c7312cf (svn r1725) - Fix: now trains can only be built in depots and you have to own the depot too (hacked client protection) 2005-01-29 23:58:07 +00:00
tron b18851e0b9 (svn r1724) Set maximum number of industries and towns to 250 each 2005-01-29 20:18:01 +00:00
tron b29877e14c (svn r1723) Save the map size in tiles, not number of bits 2005-01-29 20:11:19 +00:00
tron 3a89108a55 (svn r1722) -Feature: Bigger maps - anyone? 2005-01-29 19:45:14 +00:00
celestar 752b3f0dd6 (svn r1721) -Feature: It is now possible to build multiple road stations (up to 8) on
a single station.
Thanks to: Truelight for the saveload code, Darkvater and Hackykid for
network testing and Tron for proof-reading 1500 lines of diff.
2005-01-29 19:41:44 +00:00
darkvater 885fd2b15c (svn r1720) - Fix: signed/unsigned warnings. Tile which is incremented/decremented every time until suitable ground is found is compared to the direction it is going in. If this wraps, return error. For this treat the tile itself as a TileIndexDiff 2005-01-29 18:22:07 +00:00
darkvater 2005495bfb (svn r1719) - Fix: [installer] fix some installer problems mainly for DOS files as well as beautify it a little
- Fix: corrected newlinetype of tile.c
2005-01-29 16:47:19 +00:00
tron 97ae59fe1a (svn r1718) Use the enum TileType as parameter/return type for [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.
2005-01-29 15:12:40 +00:00
darkvater 797355cb7e (svn r1717) -Fix: some compilation problems for braindead VS6 and added missing files to project (thx bociusz) 2005-01-29 14:56:25 +00:00
tron f2af1ed332 (svn r1716) Prevent zeppelins from accessing non-existent tiles when leaving the map 2005-01-29 14:53:05 +00:00
tron f08d102ac2 (svn r1715) Move [GS]etMapExtraBits to tile.[ch] 2005-01-29 13:33:48 +00:00
tron a2de96abc0 (svn r1714) Add missing include 2005-01-29 13:33:14 +00:00
tron 5885b31bb4 (svn r1713) Split off several functions which query/set information about a single tile from map.h and put them into a seperate file tile.h 2005-01-29 12:19:05 +00:00
bjarni 3b6901f7fd (svn r1712) - Fix: a hacked client can no longer send other players trains 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
2005-01-29 12:01:36 +00:00
bjarni 849ffd59ec (svn r1711) - Add: [MacOSX] Added an Xcode project file (Tobin)
This project file adds a graphical IDE to OSX, including graphical debugging, which is a bit easier than gdb (Xcode uses gdb for debugging)
       Since it uses the makefile to compile, it should (hopefully) work without updating the project file when the makefile is updated
       Tobin did most of the work, but I altered paths and settings for custom executable so it should work out of the box for everybody
2005-01-29 10:10:10 +00:00
bjarni db4721a31d (svn r1710) - Fix: [autoreplace] vehicles do no longer go to a depot all the time if the owner clicked 'stop replacing' ( ship+aircraft+road vehicles ) 2005-01-29 01:02:47 +00:00
bjarni 27cd24c316 (svn r1709) - Feature: [autoreplace] ships now automatically goes to a depot if they need to be replaced 2005-01-28 20:43:46 +00:00
bjarni 41ca1be4ff (svn r1708) - Fix: FindNearestHangar() will no longer return a hangar where a jet will crash if it is a jet, that is searching
- Codechange: Since planes move in strait lines in 8 directions, GetTileDistAdv() is used instead of manhatten distance in FindNearestHangar()
2005-01-28 18:10:12 +00:00
bjarni dce0bbad6c (svn r1707) - Feature: [autoreplace] road vehicles now tries to find a depot if they needs to be replaced 2005-01-28 17:31:42 +00:00
tron 3617d24318 (svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
These scale a number relative to the map size/circumference.
Use them to scale the amount of map objects.
Of course at the moment they return just the input, because there are no bigger/smaller maps yet.
2005-01-28 15:31:04 +00:00
dominik 4e6d6578e4 (svn r1705) Sign owner variable is a byte, not int32 of course 2005-01-28 12:21:04 +00:00
dominik 5856325e5a (svn r1704) - Fix: [newgrf] rotors of custom helicopters are displayed correctly in the hangar window 2005-01-28 12:20:06 +00:00
dominik b4b134e527 (svn r1703) - Fix: Scrolling with the arrow keys is now smooth and it now also scrolls exactly in tile direction if e.g. up and left are pressed 2005-01-28 09:30:19 +00:00
dominik c8d084a85e (svn r1702) - Fix: [ 1110407 ] Game does not crash any more when a newgrf file doesn't exist 2005-01-28 08:56:43 +00:00
tron 3e0dcfd47f (svn r1701) Style police ^^ 2005-01-27 21:18:03 +00:00
bjarni 99338d278d (svn r1700) - Fix: Hacked clients can no longer be used to build vehicles that are not available yet (Hackykid) 2005-01-27 21:00:05 +00:00
bjarni 1ae9e7b448 (svn r1699) - Feature [autoreplace] a plane will now go to the hangar right after landing if it needs to be replaced
- Fix     [autoreplace] fixed a typo that could prevent autoreplaced aircraft from automatically go to a hangar
2005-01-27 20:38:19 +00:00
bjarni 14f0cb2704 (svn r1698) - Feature [autoreplace] helicopters will now go to the nearest hangar if they are set to autoreplace and don't have any airport with a hangar in
schedule
2005-01-27 15:43:44 +00:00
tron eebb2f196d (svn r1697) Remove superflous special case for the VOID border tiles in FindLandscapeHeightByTile()
While here clean up some other stuff: uint -> TileIndex, assert() that the TileIndex is valid and remove a line which was already commented out
2005-01-27 15:30:34 +00:00
tron 63653bd6af (svn r1696) Use GetTileSlope() instead of FindLandscapeHeightByTile() where 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.
2005-01-27 12:52:20 +00:00
Celestar 6eec07257a (svn r1695) -Fix: I broke maximum speed sorting for anything but trains with the new acceleration. Sorry 2005-01-27 11:33:14 +00:00
celestar 1bdd01867a (svn r1694) -Fix: Forgot to remove a DEBUG statement :( 2005-01-27 11:25:32 +00:00
Celestar 1fd8c45c55 (svn r1693) -Fix: [ 1108618 ] A wrong error message was displayed when trying to
expand railroad stations beyond maximum spread
2005-01-27 09:43:24 +00:00
truelight 0470fe9f89 (svn r1691) -Fix: oops, forgot to bump the company-info-version 2005-01-26 19:51:29 +00:00