From: Samual Lenks <samual@xonotic.org>
Date: Sat, 8 Sep 2012 23:19:12 +0000 (-0400)
Subject: New capture effects
X-Git-Tag: xonotic-v0.7.0~240^2~23
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=874bdca421ce8777777c6493a067aec066debf41;p=xonotic%2Fxonotic-data.pk3dir.git

New capture effects
---

diff --git a/effectinfo.txt b/effectinfo.txt
index d7a90bb1e..d346a30ef 100644
--- a/effectinfo.txt
+++ b/effectinfo.txt
@@ -7681,7 +7681,6 @@ alpha 64 128 64
 airfriction 5
 sizeincrease 2
 type static
-// ============== DRIFTING SMOKE
 effect red_pass
 trailspacing 12
 color 0xFF0000 0x970000
@@ -7692,7 +7691,6 @@ airfriction 9
 sizeincrease 8
 velocityjitter 64 64 64
 type static
-// ============== BRIGHT CORE
 effect red_pass
 trailspacing 12
 color 0xFF0000 0x970000
@@ -7712,7 +7710,6 @@ alpha 64 128 64
 airfriction 5
 sizeincrease 2
 type static
-// ============== DRIFTING SMOKE
 effect blue_pass
 trailspacing 12
 color 0x0000FF 0x000097
@@ -7723,7 +7720,6 @@ airfriction 9
 sizeincrease 8
 velocityjitter 64 64 64
 type static
-// ============== BRIGHT CORE
 effect blue_pass
 trailspacing 12
 color 0x0000FF 0x000097
@@ -7732,3 +7728,53 @@ size 4 4
 alpha 256 256 1280
 type static
 
+// red_cap -- red team capture effect
+effect red_cap
+count 500
+type spark
+tex 64 64
+color 0xFF0000 0x970000
+size 1 1
+alpha 0 256 100
+stretchfactor 2
+//gravity 1
+bounce 1.5
+originjitter 1 1 1
+velocityjitter 1000 1000 1500
+velocitymultiplier 0.5
+airfriction 2
+stretchfactor 0.6
+effect red_cap
+countabsolute 1
+type smoke
+tex 65 65
+size 150 150
+alpha 190 190 180
+sizeincrease -80
+color 0xFF0000 0x970000
+
+// blue_cap -- blue team capture effect
+effect blue_cap
+count 500
+type spark
+tex 64 64
+color 0x0000FF 0x000097
+size 1 1
+alpha 0 256 100
+stretchfactor 2
+//gravity 1
+bounce 1.5
+originjitter 1 1 1
+velocityjitter 1000 1000 1500
+velocitymultiplier 0.5
+airfriction 2
+stretchfactor 0.6
+effect blue_cap
+countabsolute 1
+type smoke
+tex 65 65
+size 150 150
+alpha 190 190 180
+sizeincrease -80
+color 0x0000FF 0x000097
+
diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc
index b0c4c4c40..134365f29 100644
--- a/qcsrc/server/mutators/gamemode_ctf.qc
+++ b/qcsrc/server/mutators/gamemode_ctf.qc
@@ -372,8 +372,8 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype)
 	// effects
 	if(autocvar_g_ctf_flag_capture_effects) 
 	{
-		pointparticles(particleeffectnum((player.team == COLOR_TEAM1) ? "red_ground_quake" : "blue_ground_quake"), flag.origin, '0 0 0', 1);
-		shockwave_spawn("models/ctf/shockwavetransring.md3", flag.origin - '0 0 15', -0.8, 0, 1);
+		pointparticles(particleeffectnum(flag.capeffect), flag.origin, '0 0 0', 1);
+		//shockwave_spawn("models/ctf/shockwavetransring.md3", flag.origin - '0 0 15', -0.8, 0, 1);
 	}
 
 	// other
@@ -923,6 +923,7 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag
 	if(!flag.skin) { flag.skin = ((teamnumber) ? autocvar_g_ctf_flag_red_skin : autocvar_g_ctf_flag_blue_skin); }
 	if(!flag.toucheffect) { flag.toucheffect = ((teamnumber) ? "redflag_touch" : "blueflag_touch"); }
 	if(!flag.passeffect) { flag.passeffect = ((!teamnumber) ? "red_pass" : "blue_pass"); } // invert the team number of the flag to pass as enemy team color
+	if(!flag.capeffect) { flag.capeffect = ((teamnumber) ? "red_cap" : "blue_cap"); }
 	
 	// sound 
 	if(!flag.snd_flag_taken) { flag.snd_flag_taken  = ((teamnumber) ? "ctf/red_taken.wav" : "ctf/blue_taken.wav"); }
diff --git a/qcsrc/server/mutators/gamemode_ctf.qh b/qcsrc/server/mutators/gamemode_ctf.qh
index a8cfa2237..0b5c3471d 100644
--- a/qcsrc/server/mutators/gamemode_ctf.qh
+++ b/qcsrc/server/mutators/gamemode_ctf.qh
@@ -48,6 +48,7 @@ void spawnfunc_ctf_team();
 // effects
 .string toucheffect;
 .string passeffect;
+.string capeffect;
 
 // list of flags on the map
 entity ctf_worldflaglist;