Commit Graph

647 Commits

Author SHA1 Message Date
pavanvo e7cf0a01de
fix: switch nextUnitTypeId from unitTypeId 2022-09-06 17:46:45 +04:00
pavanvo c9c1adf8d0
refactor: correct tabs 2022-09-06 02:18:18 +04:00
Banestorm 35ff02052c
Remove command priority system
This was resulting in non-intuitive and surprising behaviour when queuing
commands. Removing this system results in Megaglest behaving more like
other RTS games.

For instance, the following are now possible and weren't previously:
- Queuing multiple attack ground commands to move along a specific path
attacking all enemies on the way.
- Queuing attack ground followed by hold position, which is a sensible
  thing to do if you want a unit to guard a specific area.
- Queuing a move command followed by a produce command, if you want to
  have your summoner summon a daemon at a specific location.

The behaviour of queuing the stop command is unchanged, and commands that
must be the last in the queue, such as morphing, are still properly replaced when something
else is queued.
2022-09-06 02:11:05 +04:00
titiger 4e532db6dd Food shortage warning sound
General sound to warn about consumable resources shortage
2021-06-18 17:25:37 +02:00
titiger fb178f9c65 fix for spawn unit when projectile impacts 2021-04-16 01:56:05 +02:00
titiger b20002e7dc spawn attacks are skill based, not command based
Units have to spawn without a command too ( like buildings )
2021-02-26 01:49:31 +01:00
titiger 1d234f959c make mega AI fight smarter 2019-09-26 23:06:10 +02:00
titiger b3e0e1b462 trying to let mega CPUs fight smarter 2019-06-22 00:54:29 +02:00
SoftCoder 865a665bf0 - round 2 of cppcheck code cleanup 2017-10-09 20:21:14 -07:00
SoftCoder 26581a77d2 - first round of cleanup from cppcheck report 2017-10-09 19:09:36 -07:00
SoftCoder b1d6c73774 - attempt to fix Issue #150 2017-02-12 16:35:29 -08:00
titiger f3c436b67f force playing important sounds
see issue #144
2017-02-02 02:54:29 +01:00
titiger 9cc5a7566a revert some changes which were meant for debugging only 2017-02-01 23:58:00 +01:00
titiger d038a376ae fixing a bug with spawn attack 2017-02-01 23:44:28 +01:00
titiger 28bcf81626 Error handling 2016-11-30 22:33:41 +01:00
titiger 374634b630 spawn units on death
as requested here https://forum.megaglest.org/index.php?topic=9879.0
2016-11-20 16:19:53 +01:00
SoftCoder 102ca8f651 - Fixed issue# 135 2016-10-31 13:56:33 -07:00
SoftCoder 56494f3cd2 - finally fixing issue #102 (bad cell visible handling when fog of war turned off) 2016-05-27 16:15:27 -07:00
filux bcb8d197d3 fixed some typos [ci skip]
https://lintian.debian.org/full/pkg-games-devel@lists.alioth.debian.org.html#megaglest
2016-02-19 21:17:31 +01:00
titison b3449e59be shared Team Options in scenarios
little fix with printf which weren't used anyway
2015-01-18 19:40:30 +01:00
titison 848b84f149 shared team options in scenarios
now you can enable sharedTeamUnits and sharedTeamResources in scenarios

to do so use this two xml tags:
	<shared-team-units value="false"/>
	<shared-team-resources value="false"/>
put them in the <scenario> node
2015-01-18 19:40:30 +01:00
titiger 7006c26707 morph takes cellmaps into account ( needed for prax next ) 2015-01-14 22:58:19 +01:00
titiger e4c2683e1d fixed missing food for shared resource games on startup
To claculate limitResourcesToStore() we need to first load all factions. 
Else we get wrong results for  limitResourcesToStore(), and by this sometimes 
no food on startup, depending on the setup.
2015-01-12 01:46:12 +01:00
titiger bceb4286f8 render only resources of selected faction
When playing with shared team units but not with shared resources, only  
the resources of the selected faction is shown now. With shared resources all
resources of the team are shown like before.

Rendering ressources with two lines stays like before showing all resources  in
team mode!
2015-01-10 22:49:31 +01:00
titison 00d367b725 Resource Storage calculated on team basis
fixing a debt-bug with sharedResources:
https://forum.megaglest.org/index.php?topic=9616.0
2015-01-02 02:45:44 +01:00
SoftCoder efa7cb0346 - bugfix for shared team resources
- added some new internal feature code to test auto updates for a future release
2014-12-30 12:16:35 -08:00
SoftCoder 92a113ddfa - missed a few places where we should use total upgrade sight 2014-12-21 20:27:21 -08:00
SoftCoder e65ad1b69c - added more error checking in case segfault reproduced from: https://forum.megaglest.org/index.php?topic=9612.0;topicseen 2014-12-21 17:32:04 -08:00
SoftCoder b0f7b078f6 - apply sight upgrades when units sight is involved in cacls 2014-12-21 17:23:20 -08:00
titiger d34e58ccb6 fix for too often applied boosts 2014-12-19 22:48:07 +01:00
SoftCoder 8210485a42 - a few bugfixes related to coverity scan 2014-12-15 19:44:26 -08:00
titiger 3eb9c05b4a Particlesystems can now be positioned unit height independend
In the faction.xml you can set teh following now:
<flat-particle-positions value="true"/>
By this the positions of the particle systems ( attack and unit particles ) 
can be done based of the units centered ground position and 
by this height independend.
2014-11-26 00:38:04 +01:00
titiger 54905c0e5c rename getCurrVector() to getCurrMidHeightVector() 2014-11-25 23:40:47 +01:00
titiger 55a27b4c6b every game initialized with a frame count>1 is a somehwo loaded game
This means the Fow needs to be set like it is inside a match.
2014-11-19 23:34:18 +01:00
titiger 5791f64829 Scenarios that pause the game in the beginning get no more black screen 2014-11-19 23:29:51 +01:00
titiger 25a8f44ee1 This fixes black background for loaded games which are paused 2014-11-19 22:43:45 +01:00
titiger 71bdb1cba7 Player names of Scenarios were displayed in wrong slot.
The player names were set with wrong index and CPU players had wrong names.
2014-11-14 22:25:56 +01:00
titiger 1f5b571c9d bugfix for bad {SCENARIODIR} replacement
Done by softcoder in branch ce-gui, manually merged by me :)
https://forum.megaglest.org/index.php?topic=9553.0
2014-09-24 01:16:28 +02:00
titiger 791f42874a Bugfix for spawn attack. Too many checks were removed with last checkin. 2014-08-02 23:27:45 +02:00
titison 51c1afe4e4 Added the ability for SpawnAttacks to let the units spawn when the projectile arrives at the targetpos.
Unit will always try to attack if it has an attack command.
Unit attacks the target POS and not the target UNIT of the attacker.
2014-07-27 21:41:40 +02:00
titison 6086a33baf Added a bool spawnAtTarget to spawn attack in which you can define whether the unit spawns at the target or at the attacker.
In Addition i changed the command which is given to the spawned unit to an attack command on the target cell.
( I think this makes way more sense than giving a move command to the meeting point)
( This also works if the spawned does not have a attack command. It will move to the enemy then)
2014-07-27 12:54:25 +02:00
titiger 082f3472ee Looting 2014-07-22 23:53:45 +02:00
titiger 62b147b2ee Merge remote-tracking branch 'origin/pr/17' into pullrequest17 2014-07-22 21:28:10 +02:00
titiger 7e81728fe8 damagePercent for projectiles
all given damage percents from the projectiles must sum up to exactly 100%
2014-07-20 22:47:07 +02:00
titiger da23e4c048 multi sounds
multiple sounds timed sounds for all skills. 
By this you can now play a sound for shooting every single shot too.
2014-07-20 03:28:03 +02:00
Mike Hoffert b9eb74d916 Percentages were wrong way around 2014-07-19 19:12:34 -06:00
Mike Hoffert f0801b3c33 Converted floats to ints
As discussed with Titi, this may prevent some issues with multiplayer
getting out of sync due to different floating point calculations.
2014-07-19 19:03:33 -06:00
Mike Hoffert 191c353491 Fixing platform inconsistency
It appears that the issue is a Windows problem, with Windows providing
macros for min and max that interfere with using the proper ones defined
in the algorithm header file.
2014-07-19 18:07:24 -06:00
Mike Hoffert 3cae2559c7 No looting if you attack units in same faction 2014-07-19 16:44:11 -06:00
Mike Hoffert 68455a819f Added setting to disable going into negatives
After all, how does one loot what the other faction does not have? Still,
could be useful for some places, by forcing the opponent to go into
"debt".
2014-07-19 16:38:33 -06:00