Commit Graph

37 Commits (master)

Author SHA1 Message Date
per 5057823792 Simplify the vision code a bit. Behaviour should be exactly identical. 2013-12-14 15:58:04 +01:00
per dda1585f95 Fix various minor issues pointed out by Coverity scanner. 2013-11-07 00:17:07 +01:00
per 5625def655 Fix upgrade bugs. Not always updating after research. Was not applying
upgrades after loading savegame - closes ticket:4020. Was not applying
body hitpoint upgrades on new droids.
2013-05-21 23:11:28 +02:00
per 371ab04cda qtscript: Add new functions addSpotter() and removeSpotter() to add and remove
temporary areas of vision on the map.
2013-05-18 00:30:58 +02:00
per 545832358b Convert functions.txt to handle upgrades from within javascript and research.ini.
hackChangeMe() can no longer take -1, instead add new receiveAllEvents(bool) function
for that purpose. Campaign upgrades are not yet converted. All 'Power' settings in
ini files are changed, since they used meaningless values, to 'PowerLevel' with 0..2
values that correspond to button settings.
2013-05-05 13:34:59 +02:00
Cyp 8713039c5f Add teams mode without shared research. 2013-04-29 21:20:34 +02:00
Per Inge Mathisen 983d77d016 Clean up super sensor handling. The WSS is not a counter-battery sensor
since a while ago, so remove superfluous and bad checks.
2013-03-15 09:40:36 +01:00
Cyp c1cb8e4343 Merge branch 'bugfixes'
Conflicts:
	src/ai.cpp
	src/combat.cpp
	src/mapgrid.cpp
	src/mapgrid.h
	src/projectile.cpp
	src/qtscriptfuncs.cpp
2013-02-10 13:46:55 +01:00
Cyp 5c7788784b Change gridStartIterate interface to safely allow recursive calls.
Probably fixes ticket:3894.
2013-02-09 12:33:00 +01:00
vexed 6c6fe7c38a Merge branch 'bugfixes'
Conflicts:
	src/e3demo.cpp
	src/e3demo.h
2013-01-16 15:44:22 -05:00
vexed e34e7e4e0c Seems time don't stop, so bump the year to 2013. 2013-01-16 15:34:57 -05:00
automerge d24719344d Merge branch 'bugfixes' 2013-01-11 08:08:21 +01:00
Cyp 40cbe8067b cleanup: Remove some unused defines. 2013-01-09 12:53:03 +01:00
Per Inge Mathisen 88dc5c1b9b Got really tired of hearing the 'power resource' message repeated ad infinitum
when starting games. Now only play it once for every power resource seen.
2012-12-17 15:42:01 +01:00
automerge 7107400b2b Merge branch 'bugfixes' 2012-06-08 08:00:11 +02:00
Cyp 193eba2a9f Fix CB fire against mobile targets.
Steps to reproduce:
1) Player A builds a CB sensor.
2) Player B attacks the CB sensor with a mortar borg.
3) Player B runs away with the mortar borg where player A can't see.
4) Player A builds artillery.
5) Player B slowly kills off all the artillery with an MG viper wheels tank, while the artillery just sits there
   pointing at the mortar borg without firing.

To trigger, the artillery must be built after the last CB sensor in range of where the mortar borg attacks. Any
type of mobile artillery can trigger the bug, such as archangel leopard tracks, or MRA dragon wheels.

Workaround: Player A can build an uplink, so that the mortar borg becomes visible, and the artillery fires. If
            there's still anything left of the artillery by the time the uplink is built, that is.

Fixes ticket:3529.
2012-06-05 23:15:53 +02:00
Per Inge Mathisen 5b13c4cdc2 visibility: Centralize updates of visibility.
qtscript: Run visibility update before starting level to ensure consistency.
Add new global scavengerPlayer which is index of scavenger player. Add new
function enumRange(x, y, range[, filter]) for searching for stuff on the map.
Fix use of deprecated function. Add checks against enumerating dead objects.
2012-03-11 13:31:17 +01:00
vexed 3e15039aa6 Unfortunately, the Project can't stop time, so bump the year. 2012-02-11 16:50:52 -05:00
Cyp 8dc9d09904 Simplify orders a bit.
Droid orders are now contained in a DroidOrder structure, instead of order, orderX, orderY, orderX2, orderY2, orderDirection, psTarget, psTarStats members of DROID.
2011-12-30 22:57:50 +01:00
Cyp 829fc68ea0 Remove useless floats from visibility.cpp.
Probably couldn't break synch, since all floats always contained exactly representable integers.
2011-12-11 13:37:56 +01:00
Per Inge Mathisen 55a6259b12 Add support for ECM jammers. ECM jammers will significantly shorten the range
of vision of enemy units and buildings. Not enabled by default. This simplifies
the vision code, merging terrain discovery and object vision, fixing ticket:2917
in the process. Closes ticket:340. Radar detector changed, no longer does
targetting, but allows discovery over 5x longer range instead, and can discover
ECM emissions.
2011-10-16 15:01:58 -04:00
Per Inge Mathisen 7555473fc3 General code cleanup from sensor jammer patch to reduce size of said patch. 2011-09-28 11:35:37 -04:00
Cyp 86c9451525 Show planned structure blueprints to allies. 2011-09-02 18:35:01 +02:00
abomination a72c41aeec fix [s]BOOL[/s] bool by 4B0/\/\1|\|4710|\|
[Edit by Cyp: Removed a "typedef int bool;" when building on non-windows.]
2011-03-13 12:32:24 +01:00
Cyp f1ab1f092a Don't assert when firing lassat. 2011-03-11 21:10:17 +01:00
Cyp a7730ccd15 Change "typedef struct {...} Blah;" into "struct Blah {...};".
Removed a few structs due to disuse.
2011-02-25 21:30:13 +01:00
Cyp ae2ce18314 Bump year.
sed -i 's/\(Copyright (C) .*-201\)0\( *Warzone 2100 Project\)/\11\2/' {src,lib/*{,/*}}/*.{c,cpp,h,y,l}
2011-02-25 18:45:27 +01:00
Cyp 733ab6e911 Fix compilation with C++0x compilers.
Can't use nullptr, until switching to C++0x.
2011-02-15 14:28:08 +01:00
Cyp f1dc0f29e2 Fix VTOLs unable to bomb stuff due to a 3d instead of 2d range check.
Made the range check in lineOfFire ignore the height difference, like other range checks, so that VTOLs can drop bombs without having to land first.
2011-02-03 19:35:29 +01:00
Cyp a814b2f138 Partial cleanup of previous patch. 2011-01-18 00:39:19 +01:00
dak180 2b3f408917 Apply ground-fix-unified2-trunk by CorvusCorax.
Refs #2151.
2011-01-18 00:39:18 +01:00
Per Inge Mathisen f4ef3e6658 Various random fixes from ECM jammer work committed separately to reduce review and maintenance burden of main patch. 2011-01-17 21:23:17 +01:00
Per Inge Mathisen b8cb7aeef3 Remove some dead code in preparation for merging the ECM jammer patches. 2011-01-15 20:30:01 +01:00
littlepig 7b969f5976 (BASE_OBJECT*), (BASE_OBJECT *), (BASE_STAT*) and (BASE_STAT *) casts removed where being redundant. 2011-01-13 21:59:07 +00:00
Cyp 309398dd1d Make Vectors fun to use. Instead of Vector2f_Sub(Vector2f_Mul(myVector, myScalar), myOtherVector), write myVector*myScalar + MyOtherVector.
Reviewed by Safety0ff.
2010-12-21 22:35:37 +01:00
Cyp 80ddafd0ff Use destructors instead of releaseDroid/releaseStructure/releaseFeature.
Simplifies some stuff a bit.
2010-12-17 02:08:18 +01:00
Cyp 0646b37603 Rename *.c to *.cpp. 2010-12-16 23:28:56 +01:00