2019-12-08 14:20 CET

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0005344Spring engineGeneralpublic2017-01-26 12:36
Reporterlamer 
Assigned Tohokomoko 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version103.0 
Target VersionFixed in Version 
Summary0005344: Submerged units have no los
DescriptionSubmerged units have no los, yet still have airLos.

Engine doesn't provide unit's submerged state info to AI. I'd like to receive some clarification on when should AI use sonarMap+sonarRadius and when losMap+losRadius to see/attack enemy units (and what will happen to airLos).
Steps To ReproduceSteps to reproduce:
1) run 103.0 spring, IncultaV2wetV3 map, ZK 1.4.7.1
Enable cheats
2) /cheat
Give few daggers to enemy team above commanders head (commander should be in water)
3) /give 10 corsh
Result: daggers seen only when they attack commander or when they get into 1x1 los square above commander. It still has airlos and can see gunships and planes.

In spring 100.0 all daggers inside commanders los radius are visible.
101.0+ bugged
Additional Informationhttps://github.com/ZeroK-RTS/Zero-K/issues/1490
Zkdevs i spoke to thought it's a bug.

Was there a feature request to separate water&los but leave water&airLos?
Or there is fallback modrule to get water&los back that i missed?
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0016651

hokomoko (developer)

This is intentional.

1) Submerged is when pos.y + losHeight < 0, I don't think a function is needed for this assuming you can get losHeight.

2) LoS is basically bidirectional and can't travel through water. it makes 0 sense why when you're in water LoS will be able to be cast through and when you're out of water it will stop when hitting it.

~0016652

hokomoko (developer)

and re-airLos - it is not using raycasting, I suppose it can be turned off for submerged units.

~0016653

lamer (reporter)

Thanks for explanation.
What's the purpose of modInfo.requireSonarUnderWater then, shouldn't it be always true now because LoS is basically bidirectional and can't travel through water?

> it makes 0 sense why when you're in water LoS will be able to be cast through and when you're out of water it will stop when hitting it.

I thought los can't see through underwater hills just like it can't see through onland hills, i was wrong then.

Anyway i'm fine with this change, wanted to make sure i didn't miss some new modInfo.requireLosOverWater param.
Will test pos.y + losHeight < 0 and report back: if everything works this 'feedback' can be closed.

~0016654

hokomoko (developer)

I'm a bit bothered by the 1x1 square thing.

~0016656

silentwings (reporter)

Last edited: 2016-09-12 18:47

View 2 revisions

> I suppose it can be turned off for submerged units.

It is possible to make a submerged missile launcher that acts as anti-aircraft. BA used to contain one, but it was removed for gameplay reasons, I think.

I think LOS might be how subs to see hovercraft above water (which is physically realistic, as well as useful for game devs) but I'm not sure if any game actually uses this.

~0016657

hokomoko (developer)

if it's not nailed to the ground you can easily put the los emitting point above water

~0016658

silentwings (reporter)

If that works, seems good.

~0016794

hokomoko (developer)

Fix b7b39025a09bd6d4cd6972ef6bc0aba0d282b2c5 committed to develop branch: Allow sonar to detect ships/hovers.

It's not necessarily the best solution since it only shows radar dots, but it's better than the current one.
Feel free to give me suggestions of a better model.

Fix 0005344, repo: spring changeset id: 7494
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2016-09-12 00:25 lamer New Issue
2016-09-12 10:37 hokomoko Note Added: 0016651
2016-09-12 10:38 hokomoko Note Added: 0016652
2016-09-12 15:06 lamer Note Added: 0016653
2016-09-12 15:12 hokomoko Note Added: 0016654
2016-09-12 18:46 silentwings Note Added: 0016656
2016-09-12 18:47 silentwings Note Edited: 0016656 View Revisions
2016-09-12 18:48 hokomoko Note Added: 0016657
2016-09-12 18:50 silentwings Note Added: 0016658
2016-10-12 19:18 hokomoko Changeset attached => spring develop b7b39025
2016-10-12 19:18 hokomoko Note Added: 0016794
2016-10-12 19:18 hokomoko Assigned To => hokomoko
2016-10-12 19:18 hokomoko Status new => resolved
2016-10-12 19:18 hokomoko Resolution open => fixed
2017-01-26 12:36 hokomoko Changeset attached => spring develop 9fb8b24b
+Issue History