Page 1 of 1

Variable movetype on land / water

Posted: 21 Mar 2013, 09:04
by Jools
FLOZi wrote: http://github.com/spring/spring/blob/ma ... veInfo.cpp

c.f. lines 102, 103 (ship/boat hardcoding) and 110 in particular for hover. 123 to 126 for tank / kbot. A movetype that doesn't specify SHIP, BOAT, HOVER or TANK will default to KBOT - so if you're missing a keyword in the name it should not crash and in fact the unit should still move around just fine, on land at least.

Grepping through the code, TEDClass appears to only be used to distinguish factories (PLANT) vs builders.(c.f. UnitDefHandler.cpp lines 499 & 606)
Is it possible to have an unit have the hover movetype when at sea, and kbot movetype when at land? I'm thinking mostly of pelicans, currently they have movement bonuses for hovers because of typemap also when moving on land, and we want to chanage that.

I know that pelicans always have technically been hovers in all mods that have pelicans.

Re: Variable movetype on land / water

Posted: 21 Mar 2013, 12:28
by FLOZi
Only possible by unit switching currently.

Re: Variable movetype on land / water

Posted: 21 Mar 2013, 14:03
by Jools
It's just a problem on some maps that have a movement bonus for hover units. I don't think that the mapmaker has thought that this also applies to pelicans, but it does. But maybe the problem then is really in the map and not the engine.

Re: Variable movetype on land / water

Posted: 21 Mar 2013, 15:11
by Anarchid
Your prayers have been answered.

Re: Variable movetype on land / water

Posted: 21 Mar 2013, 15:39
by Jools
Cool. Thank you.

Re: Variable movetype on land / water

Posted: 21 Mar 2013, 15:44
by PicassoCT
I like how you sorted the includes alphabetically. Chaos shall not stand!