]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Rename a particle effect
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 8b82b697553d7c5b96d34532ed789ce77c1ec713..e47b06553a0be0af23502af82b28181c5ef4861d 100644 (file)
@@ -295,6 +295,7 @@ void Vore_Swallow(entity e)
        e.predator.stomach_load += 1;\r
        e.predator.regurgitate_prepare = 0;\r
        e.predator.spawnshieldtime = 0; // lose spawn shield when we vore\r
+       e.predator.hitsound += 1; // play this for team mates too, as we could be swallowing them to heal them\r
        Vore_WeightApply(e.predator);\r
        Vore_AutoDigest(e.predator);\r
 \r
@@ -368,9 +369,19 @@ void Vore_Regurgitate(entity e)
                Vore_SwallowModel_Update(e, e.predator);\r
        }\r
 \r
+       // apply regurgitation damage to the predator\r
+       if(cvar("g_balance_vore_regurgitate_damage"))\r
+       {\r
+               float regurgitate_dmg;\r
+               regurgitate_dmg = cvar("g_balance_vore_regurgitate_damage");\r
+               if(cvar("g_healthsize"))\r
+                       regurgitate_dmg *= e.scale / e.predator.scale;\r
+               Damage(e.predator, e.predator, e.predator, regurgitate_dmg, DEATH_REGURGITATION, e.predator.origin, '0 0 0');\r
+       }\r
+\r
        PlayerSound(e.predator, playersound_regurgitate, CHAN_VOICE, VOICETYPE_PLAYERSOUND);\r
        setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r
-       pointparticles(particleeffectnum("regurgitate"), e.predator.origin, '0 0 0', 1);\r
+       pointparticles(particleeffectnum("vore_regurgitate"), e.predator.origin, '0 0 0', 1);\r
        e.predator.punchangle_x += cvar("g_balance_vore_regurgitate_punchangle");\r
        e.predator.stomach_load -= 1;\r
        e.predator.regurgitate_prepare = 0;\r
@@ -649,12 +660,6 @@ void Vore()
 {\r
        // main vore code, this is where it all happens\r
 \r
-       if(!cvar("g_vore")) // the vore system is disabled\r
-       {\r
-               Vore_Disconnect();\r
-               return;\r
-       }\r
-\r
        Vore_AutoTaunt();\r
 \r
        // wash the goo away from players once they leave the stomach\r
@@ -734,6 +739,11 @@ void Vore()
        }\r
 \r
        // apply delays and skip the vore system under some circumstances\r
+       if(!cvar("g_vore")) // the vore system is disabled\r
+       {\r
+               Vore_Disconnect();\r
+               return;\r
+       }\r
        if(time < game_starttime || (time < warmup && !inWarmupStage)) // don't allow vore before a round begins\r
        {\r
                Vore_Disconnect();\r