how does the game flips the wall model?

For code related discussions and questions
Post Reply
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

how does the game flips the wall model?

Post by winsrp »

OK so, this is the thing.

When you make a hardcrete wall, it detects that has to flip the wall model according to the wall tile next to it so, how can I make a new asset and apply that same behavior to it? how does the game flips the wall model? or more importantly where can I assign that applies the same thing to my asset to. O_o

This is for the gates mod, so I wanted to make the gate a 1 tile thing that acts exactly like walls, but don't add the change my tile for a corner wall (in this case corner door, which is an interesting idea but not yet), and add the code that opens it. (which we already have.) xD
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: how does the game flips the wall model?

Post by Per »

Look in src/structure.c and search for REF_WALL. You could also search for REF_BLASTDOOR, which I believe was originally intended to be used for a gate type thing, but ended up being used for fortresses instead (the DOOR type in stats) ...
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Re: how does the game flips the wall model?

Post by winsrp »

hmmm.... interesting, thanks for the info Per.

By the way, if we make that gates things actually good, would you be interested in putting in the core game, from what I have tested, is a blast to have a couple door on your little fortress.. jejeje.... neat thing,
Post Reply