Disco Dynamite

Discussion for Bani's Pub mod

Moderators: Forum moderators, developers

Post Reply

Can I get a witness?!?

Uggggh yeah!
8
67%
Wha?
4
33%
 
Total votes: 12

sniser2
Posts: 15
Joined: Fri Jan 30, 2004 12:39 pm

Disco Dynamite

Post by sniser2 »

Topic says it all. The closer detonation time is, the faster it changes color.. and talking about disco, how about an alt fire for the satchel detonator that allows you to listen to some funkay tunes while waiting for victims? Would fit nicely to the dynamite!
Mr. N|c3 Guy
Posts: 3
Joined: Sat Feb 07, 2004 3:17 am

Post by Mr. N|c3 Guy »

Why not? Would be a nice idea, like the *beep...beep...beepbeepbeep* of the bomb in CS or similar...

...and b/c it's so stupid to be blown by dyno while trying to defuse it...
sniser2
Posts: 15
Joined: Fri Jan 30, 2004 12:39 pm

Post by sniser2 »

Hmm on a serious note, yeah I tried that, a "warning" before the boom (in the last second it stops blinking and just glows red very brightly). It's not enough to get away, it just makes you go "oh. shi*t." - but it looks kinda nice!
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

are you crazy ? :roll:
sniser2
Posts: 15
Joined: Fri Jan 30, 2004 12:39 pm

Post by sniser2 »

Maybe.

Code: Select all

#define DISCO_DYNAMITE
#define	SNI_TNT_LIFESPAN						15000		// 15000
#define	SNI_TNT_BOOMDELAY						30000		// 30000
#define	SNI_TNT_BOOMWARNING						1000		// n/a
#define	SNI_TNT_SINKWARNING						1000		// n/a
#define	SNI_TNT_LIGHTRADIUS						512			// 320
#define	SNI_TNT_BLINKSPEED						0.006f		// 0.004f

#define DISCO_PIMP_POWAH(blehah,origin,radius,light)														\
			switch (blehah % 10) {                                                                          \
				case 0:                                                                                     \
					/*blue*/                                                                                \
					trap_R_AddLightToScene( origin, radius, light, 0.0, 0.0, 1.0, 0, REF_FORCE_DLIGHT );    \
					break;                                                                                  \
				case 1:                                                                                     \
					/*red*/                                                                                 \
					trap_R_AddLightToScene( origin, radius, light, 1.0, 0.0, 0.0, 0, REF_FORCE_DLIGHT );    \
					break;                                                                                  \
				case 2:                                                                                     \
					/*yellow*/                                                                              \
					trap_R_AddLightToScene( origin, radius, light, 1.0, 1.0, 0.0, 0, REF_FORCE_DLIGHT );    \
					break;                                                                                  \
				case 3:                                                                                     \
					/*purple*/                                                                              \
					trap_R_AddLightToScene( origin, radius, light, 0.5, 0.0, 1.0, 0, REF_FORCE_DLIGHT );    \
					break;                                                                                  \
				case 4:                                                                                     \
					/*green*/                                                                               \
					trap_R_AddLightToScene( origin, radius, light, 0.0, 1.0, 0.0, 0, REF_FORCE_DLIGHT );    \
					break;                                                                                  \
				case 5:                                                                                     \
					/*bleh blue*/																			\
					trap_R_AddLightToScene( origin, radius, light, 0.0, 1.0, 1.0, 0, REF_FORCE_DLIGHT );    \
					break;                                                                                  \
				case 6:                                                                                     \
					/*orange*/                                                                              \
					trap_R_AddLightToScene( origin, radius, light, 1.0, 0.5, 0.0, 0, REF_FORCE_DLIGHT );    \
					break;                                                                                  \
				case 7:                                                                                     \
					/*pink*/																				\
					trap_R_AddLightToScene( origin, radius, light, 1.0, 0.0, 1.0, 0, REF_FORCE_DLIGHT );    \
					break;                                                                                  \
				case 8:                                                                                     \
					/*sky blue*/                                                                            \
					trap_R_AddLightToScene( origin, radius, light, 0.0, 0.5, 1.0, 0, REF_FORCE_DLIGHT );    \
					break;                                                                                  \
				case 9:                                                                                     \
					/*lime*/                                                                            	\
					trap_R_AddLightToScene( origin, radius, light, 1.0, 0.5, 0.0, 0, REF_FORCE_DLIGHT );    \
					break;                                                                                  \
				default:                                                                                    \
					break;																					\
			}																								

Code: Select all

static void CG_DynamiteTrail( centity_t *ent, const weaponInfo_t *wi ) {
	vec3_t origin;	
	float mult, light;
	BG_EvaluateTrajectory( &ent->currentState.pos, cg.time, origin, qfalse, ent->currentState.effect2Time );
	if &#40; ent->currentState.teamNum < 4 &#41; &#123;
		if &#40;&#40;cg.time - ent->currentState.effect1Time&#41; >= &#40;SNI_TNT_BOOMDELAY-SNI_TNT_BOOMWARNING&#41;&#41; &#123;
#ifdef DISCO_DYNAMITE
			DISCO_PIMP_POWAH&#40;rand&#40;&#41;,origin,SNI_TNT_LIGHTRADIUS,4.0&#41;
#else
			trap_R_AddLightToScene&#40; origin, SNI_TNT_LIGHTRADIUS, 4.0f, 1.0, 0.5, 0.0, 0, REF_FORCE_DLIGHT &#41;;
#endif
		&#125; else &#123;
#ifdef DISCO_DYNAMITE
			DISCO_PIMP_POWAH&#40;cg.time/500,origin,SNI_TNT_LIGHTRADIUS,2*fabs&#40;sin&#40;&#40;cg.time - ent->currentState.effect1Time&#41;*SNI_TNT_BLINKSPEED*&#40;&#40;cg.time - ent->currentState.effect1Time&#41;/&#40;float&#41;SNI_TNT_BOOMDELAY&#41;&#41;&#41;&#41;
#else
			light = 2*fabs&#40;sin&#40;&#40;cg.time - ent->currentState.effect1Time&#41;*SNI_TNT_BLINKSPEED*&#40;&#40;cg.time - ent->currentState.effect1Time&#41;/&#40;float&#41;SNI_TNT_BOOMDELAY&#41;&#41;&#41;;
			trap_R_AddLightToScene&#40; origin, SNI_TNT_LIGHTRADIUS, light, 1.0, 0.0, 0.0, 0, REF_FORCE_DLIGHT &#41;;
#endif
		&#125;
	&#125; else &#123;
		if &#40;&#40;cg.time - ent->trailTime&#41; >= &#40;SNI_TNT_LIFESPAN-SNI_TNT_SINKWARNING&#41;&#41; &#123;
			trap_R_AddLightToScene&#40; origin, SNI_TNT_LIGHTRADIUS, 2.0, 0, 0, 1.0, 0, REF_FORCE_DLIGHT &#41;;
		&#125; else &#123;
			mult = 0.75 - 0.75*&#40;&#40;cg.time - ent->trailTime&#41;/&#40;float&#41;SNI_TNT_LIFESPAN&#41;;
			trap_R_AddLightToScene&#40; origin, mult*SNI_TNT_LIGHTRADIUS, 3.0, 1.0, 1.0, 0, 0, REF_FORCE_DLIGHT &#41;;
		&#125;
	&#125;
&#125;
bacon
Posts: 549
Joined: Sat Apr 19, 2003 9:34 pm
Contact:

Post by bacon »

IN case you haven't noticed, disco is dead.
sniser2
Posts: 15
Joined: Fri Jan 30, 2004 12:39 pm

Post by sniser2 »

Heh.. it's not about the music fool.. TEH COLAZ OMG!! :shock:
Actually I just increased the light range by 20 instead of 2 because of a typo.. and I kinda liked the whole map being tinted in one color heh. It grew from there ahem. Is BayonET going to be very realistic? :?
Mr. N|c3 Guy
Posts: 3
Joined: Sat Feb 07, 2004 3:17 am

Post by Mr. N|c3 Guy »

No, it's going to be a MOD for public servers, e. g. to have fun, AFAIK. :)
Post Reply