CoD4x_Server icon indicating copy to clipboard operation
CoD4x_Server copied to clipboard

Change material of model

Open k4r3l01 opened this issue 7 years ago • 3 comments

Hello please its will be possible to change material of model via gsc its will be decreased number of needed models like weapons with camo. or in future.

k4r3l01 avatar Aug 03 '17 15:08 k4r3l01

Client changes required.

T-Maxxx avatar Aug 03 '17 16:08 T-Maxxx

i know but its will be great :)

k4r3l01 avatar Aug 03 '17 16:08 k4r3l01

Server:

  • Invoke on player
  • Find weapon and material by name
  • Send message to player to change weapon's current material.

Client:

  • Find desired weapon and material
  • Find correct offset in xmodel structure
  • Replace pointer

Result:

  • Each client may have its own texture on weapon, server still think its default one
  • One xmodel, N textures, less work on adding new texture than new model
  • Same weapon index means same texture for two clients even they see it as different one
  • Less work == less quality (I'm talking about this texture mismatch).

@callofduty4x/dev Any limitations? Like weapon in common_mp and texture in mod?

T-Maxxx avatar Aug 03 '17 17:08 T-Maxxx