Fixed with a timeout of 2 minutes plus orders on units outside los are invisible (thanks trepan!).
(fixes another related exploit I discovered yesterday)
So don't look at whether the gui still draws the commands to see whether this bug is still present.
As soon as a unit leaves LOS, the command is not shown anymore. 2 minutes later the command is canceled (so you can't do gonio with 2 MTs for the entire game to follow e.g. the enemy com).
*MAJOR* issue that needs to be fixed before release
Moderator: Moderators
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
Imagine a Big Bertha which can cover most of the field. It means that the BB will keep firing acurate shots for 2 whole mins after the units has dispeared on radar (magically knowing where the unit is)...
Ok, it's not that bad, the sistem now is infinite, not 2 mins, which is even worst, and we ain't dead yet. But still...
Ok, it's not that bad, the sistem now is infinite, not 2 mins, which is even worst, and we ain't dead yet. But still...
At first I thought this was simply genius, but I quickly realized it's just another half-fix causing more side effects than improvements. Paulo gives one example, but there are tons of other ones. You need to know what your units are attacking.Fixed with a timeout of 2 minutes plus orders on units outside los are invisible
I'd like to suggest a simple solution. It's similar to how it worked in OTA.
#1 Attack orders on units which are no longer in LoS and radar continue indefinitely at the last known location - This fixes the current problem completely for structures.
#2When the unit is sighted elsewhere, the attack order is immediately shifted to the new location. - This partially fixes the current problem with units.
When units are no longer in LoS, it's not unrealistic to say that you can accurately predict their trajectory for several seconds. You see a car driving in front of you, you can guess accurately where it'll be in 5 seconds, for instance. In the future, with infinitely powerful computers, a best-fit guess about where a unit most likely is would be a real possibility. SO:
#3 When a unit leaves LoS, your units continue to know where the enemy is for 10(*) seconds. At that point, targetting no longer follows the enemy, and behaviour like #1 happens. - This, in combination with #2 eliminates all possible exploitation yet doesn't hurt gameplay. *if the value could be determined in modrules, it would be even better.
#4 Units magically know when a unit they're attacking comes back on radar, and end their "#1" attack and begin attacking it normally. - This just helps gameplay and reduces needless micromanagement.
Obviously a total rewrite of the CCommandAI would be the best solution yes but I didn't feel like doing that.
E: also, the goal wasn't to fix all other ways that units internally know about units outside los, the goal was the fix the exploit where it was uber easy to track e.g. the com in com ends games with a cheap MT.
E2: without making the game impossible to play because commands get immediately canceled when targets gets out of los&radar.
E: also, the goal wasn't to fix all other ways that units internally know about units outside los, the goal was the fix the exploit where it was uber easy to track e.g. the com in com ends games with a cheap MT.
E2: without making the game impossible to play because commands get immediately canceled when targets gets out of los&radar.
I believe that this fix is sufficient for the current release. After .73 is released, I want to make some big changes to CCommandAI and subclasses (making CAirAI inherit CMobilAI instead of CCommandAI). Figuring out a better way to do this could be one of the things I do, and also one of the things I would like to do.