Commit Graph

10746 Commits (e72787358112170b090efd341617ffe3743c973d)

Author SHA1 Message Date
Cyp e727873581 Make homing projectiles travel at a constant horizontal speed.
Homing projectiles previously behaved like expanding circles, where the projectile was drawn
at the closest point on the circle to the target. Which meant that if the target was fast,
moving at right angles to the direction of the projectile, the projectile would move fast,
too (and would not be travelling in the direction it was facing).

Homing projectiles now go at a constant speed towards the target, using target prediction.
To test the target prediction, set the projectile speed to something close to 700 (same as a
VTOL), and try to get the VTOL to escape.
2011-12-25 23:48:17 +01:00
Cyp 01e8e2ebd4 Split code for projectile movement models.
Penetrating projectiles should be less quirky, homing projectiles shouldn't jump when the target is destroyed.
2011-12-25 22:26:11 +01:00
Cyp b6e99061e4 Move KEY_CODE enum out of Qt/SDL ifdef. 2011-12-25 20:09:31 +01:00
Cyp c2d5cb367c Move MOUSE_KEY_CODE enum out of Qt/SDL ifdef. 2011-12-25 20:09:31 +01:00
cybersphinx 8dbc93ff49 Update ChangeLog. 2011-12-25 18:14:05 +01:00
Cyp 4edc0d77a6 Synchronise stored templates.
Fixes ticket:3013.
2011-12-25 17:29:29 +01:00
Cyp 059758dff0 Simpler render and state update scheduling.
1) If the game doesn't need to update yet (10 updates per second needed), render it. Else goto 2.
2) If the game has been rendered since it was last updated, update it. Else goto 3.
3) Either render or update the game, such that rendering takes 2/5 of the total time.

Hopefully, this means more stable framerates, while still running the game at full speed, assuming
the CPU is fast enough. And on a super-fast GPU where rendering takes only 2/3 of the time taken
to update, there should be at least one rendered frame per game-state update (same as previous
behaviour from before the render and state updates were untangled).
2011-12-25 13:45:52 +01:00
Cyp 79d8d2251e Simplify validLocation.
Check against blueprints, instead of going through all droids and checking their build
queues (but erroneously ignoring their current order). Should improve symmetry of valid
building locations next to map edges.

Fixes ticket:2999.
2011-12-25 00:37:16 +01:00
Cyp ca0c37acfd Don't forget second or second-last point when pathfinding. 2011-12-24 21:29:14 +01:00
Cyp 1cc62d6d9d Simplify rayCast parameters, remove only call to fpathTileLOS, ignore blocking tiles on destination when raycasting.
The fpathTileLOS call seemed useless, since if the path is blocked, there's not much chance
that the destination can be reached by going in a straight line, anyway.

If sending two trucks to build a cyborg factory, the second truck no longer goes in circles
just before the destination when the first truck arrives first. However, this is because it
now no longer ignores the last waypoint, but the main issue is that the second-last waypoint
seems to be missing.
2011-12-24 20:55:28 +01:00
Cyp b9200fddfb Add getStructureBounds() function to de-duplicate structure bounds calculation. 2011-12-24 20:07:31 +01:00
Per Inge Mathisen 0b86ed145b Store body size as an enum. 2011-12-22 13:25:42 +01:00
Per Inge Mathisen 2ba2ba4ad0 Slight improvement to logging 2011-12-22 13:20:19 +01:00
Cyp aeb3634720 Fix gameTimeStart and gameTimeStop being reversed.
Introduced in a5ad6ef0e9, d'oh.

Fixes ticket:3006.
2011-12-21 13:58:22 +01:00
Per Inge Mathisen 7481b39a77 Make sure we do not duplicate stored templates when loading a savegame. 2011-12-19 13:01:45 +01:00
cybersphinx c45293239a Update custom translation strings. 2011-12-19 01:11:12 +01:00
cybersphinx 39040429f5 Turkish translation update by Ayhan Görgülü.
Closes #3001.
2011-12-19 01:09:56 +01:00
cybersphinx 89a282ba9b Polish translation update by Emdek.
Closes #1347.
2011-12-19 01:09:56 +01:00
cybersphinx b287d9fb35 Update translations. 2011-12-19 01:09:55 +01:00
cybersphinx 962bb6d219 Update store/delete template tooltip. 2011-12-19 00:52:12 +01:00
cybersphinx 4f1b79d3d9 New icon for store/delete templates. 2011-12-19 00:52:12 +01:00
dak180 13885c0d07 Add template.(cpp|h) and rational.h to the xcode project. 2011-12-18 18:33:13 -05:00
Per Inge Mathisen 7b87b26716 Merge branch 'master' of github.com:Warzone2100/warzone2100 2011-12-18 23:58:16 +01:00
Per Inge Mathisen e3a981c4f8 Check number of weapons in a stored template to prevent stored template cheating. 2011-12-18 23:42:25 +01:00
Per Inge Mathisen 95bdafdffb Fix cyborg and transport production - for these only check availability of their bodies,
not anything else.
2011-12-18 23:26:44 +01:00
Per Inge Mathisen 4e66209506 Fix long-standing bug where we did not reset our default components between games.
Fix template store on removing store-ness. Do not store default values.
2011-12-18 21:56:06 +01:00
Per Inge Mathisen add866851b Fix bug in stored templates that made commanders not be saved. Also save list
to disk for every change, since Cyp prefers to close down the game by killing it.
2011-12-18 20:12:57 +01:00
Per Inge Mathisen 579e1502cb Add possibility to balance weapons against body types, not just propulsion types. 2011-12-18 19:06:34 +01:00
Cyp 281dfd0d24 Fix out-of-control effects when the graphics is running too fast or too slow. 2011-12-18 16:58:10 +01:00
Cyp ceb339939e Avoid doing extra game state updates if the game state updates are somehow slower than graphical updates. 2011-12-18 16:53:58 +01:00
Per Inge Mathisen f248a4c61d Fix crash when saving null research in wzscript. Closes ticket:2982 2011-12-18 16:00:45 +01:00
Cyp a5ad6ef0e9 Simplify game time logic. 2011-12-18 15:17:05 +01:00
Cyp 8d04e51f26 Add Rational class for rational numbers. 2011-12-18 15:16:32 +01:00
Per Inge Mathisen 5d3b2654fb Make life easier for translators by using ngettext for plurals of 'player'. Closes ticket:2988 2011-12-18 15:04:25 +01:00
Per Inge Mathisen 3e1a7a9c11 Do not distribute unused SVG files for now. Closes ticket:2986 2011-12-18 14:43:41 +01:00
Per Inge Mathisen d19681daab Update research headers. Closes ticket:2952 2011-12-18 14:17:19 +01:00
Per Inge Mathisen a6fa286dcf Implement stored templates. Button graphics is a placeholder for now. Loosely based
on original patch by EvilGuru. Closes ticket:1946.
2011-12-18 12:20:48 +01:00
Per Inge Mathisen cde2208ca5 Move template-related code to separate file. 2011-12-18 00:23:51 +01:00
cybersphinx e879fbd712 Retranslate all menu options when changing the language.
Closes #2989.
2011-12-17 23:35:01 +01:00
cybersphinx 7638364f41 Return to the challenge menu from the challenge setup. 2011-12-17 23:33:27 +01:00
cybersphinx c38ce8f039 Reload backdrop when cancelling the challenge setup.
Closes #2987.
2011-12-17 23:18:55 +01:00
cybersphinx 7d2d70d893 Update translations. 2011-12-17 23:18:55 +01:00
cybersphinx 93493f9b1d Always create both lib/qtgame and lib/sdl makefiles.
Fixes make distcheck.
2011-12-17 23:18:55 +01:00
Cyp acd0587f82 Fix 99.9% broken target prediction for direct fire.
Projectile flight time was calculated in seconds, instead of milliseconds.

Also, assume ground unit altitudes will follow the terrain.

Lancers can now hit moving targets, again.
2011-12-17 22:52:02 +01:00
Cyp 32a687fde8 Squelch compiler warning with dummy initialisation. 2011-12-17 18:21:52 +01:00
Cyp fb7245c7d2 Round displayed power up slightly.
Avoids a corner case where the power is a nice round number like 1300, but displayed as 1299.
2011-12-17 18:21:52 +01:00
Cyp e9bdbdf331 Don't push flying VTOLs out of the way when building something.
Introduced in 9534b4c0bd.
2011-12-17 18:21:52 +01:00
Cyp d6e55a2c47 Don't scale velocities by GAME_UPDATES_PER_SEC.
Movement should be slightly more precise.
2011-12-17 18:21:52 +01:00
Cyp 14234a6a07 Accelerate/decelerate at intended rate, instead of 256 times faster.
Acceleration/deceleration is no longer instant.
2011-12-17 18:21:52 +01:00
Cyp 7e3c8e4f4e Remove DROID::sMove.ebit[XY], use gameTimeAdjustedAverage instead. 2011-12-17 18:21:52 +01:00