hover=1 units with turret = 1 weapons are broken - Page 2

hover=1 units with turret = 1 weapons are broken

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: hover=1 units with turret = 1 weapons are broken

Post by KDR_11k »

I think I found it, the UpdateTargetLostTimer function seems to check if the target is in radar but doesn't care about LOS.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: hover=1 units with turret = 1 weapons are broken

Post by Argh »

Yay, one problem down...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: hover=1 units with turret = 1 weapons are broken

Post by Forboding Angel »

KDR_11k wrote:I think I found it, the UpdateTargetLostTimer function seems to check if the target is in radar but doesn't care about LOS.
That actually answers a lot of questions... Thanks KDR.

What would be a temp solution to stuff like this? Apply an equal amount of radar as los to the unit?

I'm a little scared of sticking radar on something that is majorly mass produced. Wouldn't that eat a decent bit of performance?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: hover=1 units with turret = 1 weapons are broken

Post by Tobi »

KDR_11k wrote:I think I found it, the UpdateTargetLostTimer function seems to check if the target is in radar but doesn't care about LOS.
Didn't read entire thread but IIRC LOS_INLOS implies LOS_INRADAR, so checking for just radar is normally the same as checking for radar || los.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: hover=1 units with turret = 1 weapons are broken

Post by KDR_11k »

That's interesting. Guess it handles cloaked units differently then?

Anyway, changing that code didn't fix it it seems.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: hover=1 units with turret = 1 weapons are broken

Post by Tobi »

Cloaked units are never in LOS. (their losStatus for all enemy allyteams doesn't have LOS_INLOS)

(See LosHandler.h, it contains a if (unit->isCloaked) return false;)

That means the LOS updates in CUnit check the radarHandler (radarHandler isn't checked at all if unit is in LOS), so it can possibly still be in radar.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: hover=1 units with turret = 1 weapons are broken

Post by smoth »

Bump to see if anyone has made any progress with this.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: hover=1 units with turret = 1 weapons are broken

Post by smoth »

is anyone looking into this bug?
Post Reply

Return to “Engine”