Variable movetype on land / water

Variable movetype on land / water

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Variable movetype on land / water

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Variable movetype on land / water

Post by FLOZi »

Only possible by unit switching currently.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Variable movetype on land / water

Post 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.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Variable movetype on land / water

Post by Anarchid »

Your prayers have been answered.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Variable movetype on land / water

Post by Jools »

Cool. Thank you.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Variable movetype on land / water

Post by PicassoCT »

I like how you sorted the includes alphabetically. Chaos shall not stand!
Post Reply

Return to “Game Development”