little question about colors in game


(LION) #1

hi
sorry for asking but where can i change team colors like the minesmoke, airstrikesmoke and maybe the covop smoke?
:???:


(nUllSkillZ) #2

There’s alredy a “smoke”-mod available.
So you could take a look there.
Although I’m not sure which smoke is beeing replaced/changed.

http://rtcw.filefront.com/file.info?ID=20087


(LION) #3

thx for fast reply but i meant the red and blue smoke as the come when i drop a fieldop smoke nade


(Jaquboss) #4

That is coded … you need to change gamecode…


(LION) #5

i know :wink: thats why i wanted to ask the forum in which file its saved.
I heared about cg_effects.c but i couldnt find anything in there containing colors of the smoke in the game. My plan is the make a lan-mod where soldiers can thow nades containing red smoke …


(Jaquboss) #6

try to search pyro_smoke , or look to weapon file for airstrike and look what is used ase smoke effect , then try to search in sources…


(LION) #7

hi again,
i found out that when you change in pak0.pk3 the color of smokepuff.tga( in gfx/misc), your smoke (cov ops, and fieldops) gets this color. But does anybody know where the shader is, which controls whether its blue , red or gray??


(Jaquboss) #8
	if( team == TEAM_ALLIES ) { // allied team, generate blue smoke
			le = CG_SmokePuff( origin, dir, 
				  25+rnd*110,	// width
				  rnd*0.5+0.5, rnd*0.5+0.5, 1, 0.5, /* JAQUBOSS 2  LION: its coded in this line and it uses random values*/
				  4800+(rand()%2800), // duration was 2800+
				  t,
				  0, 
				  0,
				  cgs.media.smokePuffShader);
		} else {
			le = CG_SmokePuff( origin, dir, 
				  25+rnd*110,	// width
				  1.0, rnd*0.5+0.5, rnd*0.5+0.5, 0.5, /* here is axis color*/
				  4800+(rand()%2800), // duration was 2800+
				  t,
				  0, 
				  0,
				  cgs.media.smokePuffShader);
		}

search for theese lines in cg_weapons.c …
EDIT:See allies smoke : if you want green try this rnd0.5+0.5 /red/, 1 /green is always full /, rnd0.5+0.5 /blue/, 0.5/ alpha , opacity/,
maybe you can try to make alpha use random values too


(LION) #9

thx man :wink: