From: Samual Lenks <samual@xonotic.org>
Date: Tue, 24 Dec 2013 02:47:05 +0000 (-0500)
Subject: Begin messing around with contents transition
X-Git-Tag: xonotic-v0.8.0~233^2~9
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a9bb6b166b5bdfdc409d37c546f2946612bb3efa;p=xonotic%2Fxonotic-data.pk3dir.git

Begin messing around with contents transition
---

diff --git a/qcsrc/client/movetypes.qc b/qcsrc/client/movetypes.qc
index 22bbd142f..254362aca 100644
--- a/qcsrc/client/movetypes.qc
+++ b/qcsrc/client/movetypes.qc
@@ -17,6 +17,7 @@ float _Movetype_CheckWater() // SV_CheckWater
 
 void _Movetype_CheckWaterTransition() // SV_CheckWaterTransition
 {
+	print("foobar\n");
 }
 
 void _Movetype_Impact(entity oth) // SV_Impact
diff --git a/qcsrc/server/w_grenadelauncher.qc b/qcsrc/server/w_grenadelauncher.qc
index 17144d3a5..47f6b5909 100644
--- a/qcsrc/server/w_grenadelauncher.qc
+++ b/qcsrc/server/w_grenadelauncher.qc
@@ -175,6 +175,13 @@ void W_Grenade_Touch2 (void)
 	}
 }
 
+void W_Grenade_ContentsTransition(float originalcont, float newcont)
+{
+	//pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), self.origin, self.velocity, 1);
+	pointparticles(particleeffectnum("grenade_explode"), self.origin, '0 0 0', 1);
+	print(sprintf("W_Grenade_ContentsTransition(): Original: '%d', New: '%d'\n", originalcont, newcont));
+}
+
 void W_Grenade_Attack (void)
 {
 	entity gren;
@@ -210,6 +217,7 @@ void W_Grenade_Attack (void)
 	gren.damageforcescale = autocvar_g_balance_grenadelauncher_primary_damageforcescale;
 	gren.event_damage = W_Grenade_Damage;
 	gren.damagedbycontents = TRUE;
+	gren.contentstransition = W_Grenade_ContentsTransition;
 	gren.missile_flags = MIF_SPLASH | MIF_ARC;
 	W_SETUPPROJECTILEVELOCITY_UP(gren, g_balance_grenadelauncher_primary);