DreamyCecil / AdvancedMultiplayer2

A mod for classic Serious Sam: The Second Encounter v1.07 that adds a lot of options for multiplayer games including coop mode support for singleplayer maps.
GNU General Public License v2.0
1 stars 0 forks source link

ModelObject flagging for configs. #18

Closed DreamyCecil closed 3 years ago

DreamyCecil commented 3 years ago

Add a map<string, CModelObject *> argument to the model config parsing that will set pointers to certain CModelObject under a specified string name.

Example:

{
  "Model" :   "Models/Weapons/Colt/Colt.mdl",
  "Texture" : "Models/Weapons/Hand.tex",
  "Flag" : "Hand",

  "Attachment 0" : {
    "Model" :   "Models/Weapons/Colt/ColtMain.mdl",
    "Texture" : "Models/Weapons/Colt/ColtMain.tex",
    "Flag" : "Colt",
  },
}

Will result in two entries in the map: Hand = &CModelObject (main model) Colt = &CModelObject::GetAttachmentModel(0)->amo_moModelObject (model under the first attachment)

Useful for animating different parts of the weapon/enemy just by grabbing the CModelObject pointer under the part name.