Exploding units at give

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

Exploding units at give

Postby Crotalus » 27 Sep 2013, 02:13

When share is on and units are given they seem to trigger their death explosions. For instance, SCUs., which makes bases blow up.

Is that possible to fix? Any hints what lua-files to look in would be appreciated.
Crotalus
Priest
 
Posts: 319
Joined: 27 Jan 2013, 20:37
Has liked: 2 times
Been liked: 102 times
FAF User Name: Crotalus

Re: Exploding units at give

Postby stalewee » 27 Sep 2013, 03:21

I can't offer any help, but while you're looking at it, could you see if there's a way to avoid losing intel on the gifted units too?
User avatar
stalewee
Contributor
 
Posts: 107
Joined: 27 Sep 2012, 07:52
Has liked: 0 time
Been liked: 9 times
FAF User Name: stalewee

Re: Exploding units at give

Postby Crotalus » 27 Sep 2013, 04:37

Problem is solved if a little delay is added before killing the final units of a player, seems like they had too little time changing hands.

aibrain.lua, line 1121:
Code: Select all
WaitSeconds(1) -- to prevent units triggering death explosions

local killacu = self:GetListOfUnits(categories.ALLUNITS - categories.WALL, false)
if killacu and table.getn(killacu) > 0 then
    for index,unit in killacu do
        unit:Kill()
    end
end


Maybe reduce the WaitSeconds(20) in beginning of KillArmy() also? It's a long delay before you get units of a dead player, maybe half it or something (unless it's 20 for a specific reason)

I don't have commit access to my bitbucket atm so hopefully Ze_Pilot can patch this in.

Haven't found anything useful about the intel loss at give, I'm afraid it may be hidden within the engine?
Crotalus
Priest
 
Posts: 319
Joined: 27 Jan 2013, 20:37
Has liked: 2 times
Been liked: 102 times
FAF User Name: Crotalus

Re: Exploding units at give

Postby stalewee » 27 Sep 2013, 05:24

Thanks Crot
User avatar
stalewee
Contributor
 
Posts: 107
Joined: 27 Sep 2012, 07:52
Has liked: 0 time
Been liked: 9 times
FAF User Name: stalewee

Re: Exploding units at give

Postby Marko Box » 27 Sep 2013, 12:57

Crota fixing 6 years old bug in a single night. N1 N1

Heres something as a reward: :D
Spoiler: show
Image
[OS]CrazedChariot: more games are lost in fa
[OS]CrazedChariot: than are won
[BC]Banana: thats like saying there are more banana peels than bananas
Marko Box
Crusader
 
Posts: 47
Joined: 05 Apr 2013, 22:05
Has liked: 5 times
Been liked: 2 times
FAF User Name: MarkoBox


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest