ModelDef inheritance

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: ModelDef inheritance

Re: ModelDef inheritance

by Blue Shadow » Sat Jul 07, 2018 8:31 pm

ModelDef inheritance

by Major Cooke » Sat Jul 07, 2018 3:18 pm

Having an "InheritFrom" or "Inherited" word/flag would be quite helpful in some circumstances where we may have very large model definitions, rather than having to redefine them over and over again.

From this:

Code: Select all

Model "StaticTrail"
{
	Model 0 "Models/BeamOffset8.md3"
	Scale 100.0 100.0 120.0

	DONTCULLBACKFACES
	USEACTORPITCH
	
	Skin 0 "Graphics/BulletTex.png"
	FrameIndex X202 B 0 0
	Skin 0 "Graphics/BulletTexStart.png"
	FrameIndex X202 Z 0 0
}

Model "StaticTrailBig"
{
	Model 0 "Models/BeamOffset8.md3"
	Scale 100.0 100.0 120.0

	DONTCULLBACKFACES
	USEACTORPITCH
	
	Skin 0 "Graphics/BulletTex.png"
	FrameIndex X202 B 0 0
	Skin 0 "Graphics/BulletTexStart.png"
	FrameIndex X202 Z 0 0
}
To this:

Code: Select all

Model "StaticTrail"
{
	Model 0 "Models/BeamOffset8.md3"
	Scale 100.0 100.0 120.0

	DONTCULLBACKFACES
	USEACTORPITCH
	
	Skin 0 "Graphics/BulletTex.png"
	FrameIndex X202 B 0 0
	Skin 0 "Graphics/BulletTexStart.png"
	FrameIndex X202 Z 0 0
}

Model "StaticTrailBig"
{
	InheritFrom "StaticTrail"
}
In a way, this would allow for skins to also be changed for example. Or if colon could be used, that'd work too.

Top