Jump to content

Change TemplateType / Cell-graphics ingame? Works only 50%?


yuri624

Recommended Posts

 
So I try to change the template type of a cell ingame. This is on the Desert theme, going from an empty, passable cell to an impassable brush.
 
Code:
   CellClass * cellptr = &Map[257];
   struct {
      TemplateType TType;      // Template type.
      unsigned char TIcon;      // Template icon number.
   } temp;
   temp.TType = TEMPLATE_BRUSH1;
   temp.TIcon = 0;
   cellptr->TType = temp.TType;
   cellptr->TIcon = temp.TIcon;
   cellptr->Recalc_Attributes();
   Map.Flag_Cell(257);


After triggering this code the cell is no longer passable as it should be.
In the classic graphics the cell gets correctly updated (both the passable status and the GRAPHIC itself), but in the remastered graphics it does NOT (not GRAPHIC update).

What am I missing here?
Edited by yuri624
Better title
Link to comment
Share on other sites

  • yuri624 changed the title to Change TemplateType / Cell-graphics ingame? Works only 50%?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...