project-navigation
Personal tools

Author Topic: UFO 2.5 Dev Production/Market Balance  (Read 21432 times)

Nokim

  • Guest
Re: UFO 2.5 Dev Production/Market Balance
« Reply #30 on: August 18, 2012, 08:03:41 pm »
so maybe move this close to e.g. chr shared code?
Do you mean move to game directory? I can of course but you should remember that rank parsing code relies on some parts of campaign code. Namely global variable cp_campaignPool and function E_GetEmployeeType.

Nokim

  • Guest
Re: UFO 2.5 Dev Production/Market Balance
« Reply #31 on: August 19, 2012, 09:21:20 am »
Rank list removed from campaign data structure. But it continue using campaign memory pool + campaign had implicit reset of its own data. Both results in corruption of rank data because ranks list for some reason is loaded twice at least: on each save subsystem initialization. But second results in freeing memory pool (with rank IDs, etc) without notification of ranks list hence without resetting ranks counter and getting trash in rankID, rank name etc.

So added CL_ResetRanks function and its call in CP_ResetCampaignData.

To use ranks from game part:
* ranks list must have its own memory management (i've tried assigned by caller)
* employeeType and some simple related functions should be defined in game part (i've tried and got huge mess with headers inclusions)

Nokim

  • Guest
Re: UFO 2.5 Dev Production/Market Balance
« Reply #32 on: August 21, 2012, 12:05:37 pm »
If i understand it right... Rank code now fully independent from campaign code.

There is some additional work required to use rank code in game part.
« Last Edit: August 21, 2012, 12:14:32 pm by Nokim »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: UFO 2.5 Dev Production/Market Balance
« Reply #33 on: August 21, 2012, 12:23:42 pm »
now game contains a file named cl_ - this should not be the case. cl_ is for the client.

i will check the remaining of the patch asap

Nokim

  • Guest
Re: UFO 2.5 Dev Production/Market Balance
« Reply #34 on: August 21, 2012, 09:49:46 pm »
now game contains a file named cl_ - this should not be the case. cl_ is for the client.
Renamed files and functions. As far as i can see all works fine but it's in game part only in sense as files in directory. For real use in game part some more high level work required. I.e. you should decide how it will be shared with client side.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: UFO 2.5 Dev Production/Market Balance
« Reply #35 on: August 21, 2012, 11:08:37 pm »
the data should be stored in the csi_t struct at least - but i can tell more if i checked the patches.

thanks a lot already.

Nokim

  • Guest
Re: UFO 2.5 Dev Production/Market Balance
« Reply #36 on: August 31, 2012, 10:35:52 am »
I don't want to be annoying but patch with reset function in this post should be applied ASAP to current master. It provide fix to possible saves corruption due to trash from memory written as soldier rank id (introduced in already applied my patches). Or other fix should be applied, like return rank table in campaign data structure but that invalidate other my patches.
« Last Edit: August 31, 2012, 10:44:34 am by Nokim »