From: MirceaKitsune Date: Mon, 18 Jul 2011 10:32:15 +0000 (+0300) Subject: More progress on the mass based stomach system, implementing actual prey mass. Still... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b34099f6ecf78c35daed2f0cb20f1b0332ff8aac;p=voretournament%2Fvoretournament.git More progress on the mass based stomach system, implementing actual prey mass. Still unusable --- diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index 2643e00f..a4e7bb1a 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -186,6 +186,7 @@ set g_balance_grabber_reload_time 2 // {{{ stomach set g_balance_vore_load_capacity 100 "capacity percent a player's stomach has, influenced by player size" +set g_balance_vore_load_mass 30 "prey mass, influenced by player size" set g_balance_vore_swallow_range 140 "distance below which you can swallow another player when facing them" set g_balance_vore_swallow_speed_fill 2.5 "how long it takes to swallow a player, 0 is instant" set g_balance_vore_swallow_speed_fill_scalediff 0.5 "fill rate depends on predator size compared to prey size by this amount" diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 98393a8f..848ddaf9 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -69,6 +69,16 @@ float Swallow_condition_check(entity prey) return FALSE; } +float Prey_Mass(entity prey) +{ + float vore_mass; + vore_mass = cvar("g_balance_vore_load_mass"); + if(cvar("g_healthsize")) + vore_mass *= prey.scale; + vore_mass = ceil(vore_mass); + return vore_mass; +} + float Stomach_TeamMates_check(entity pred) { // checks if a player's stomach contains any team mates @@ -310,7 +320,7 @@ void Vore_Swallow(entity e) PlayerSound(e.predator, playersound_swallow, CHAN_VOICE, VOICETYPE_PLAYERSOUND); setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating e.predator.punchangle_x -= cvar("g_balance_vore_swallow_punchangle"); - e.predator.stomach_load += 1; + e.predator.stomach_load += Prey_Mass(e); e.predator.regurgitate_prepare = 0; e.predator.spawnshieldtime = 0; // lose spawn shield when we vore e.predator.hitsound += 1; // play this for team mates too, as we could be swallowing them to heal them @@ -401,7 +411,7 @@ void Vore_Regurgitate(entity e) setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating pointparticles(particleeffectnum("vore_regurgitate"), e.predator.origin, '0 0 0', 1); e.predator.punchangle_x += cvar("g_balance_vore_regurgitate_punchangle"); - e.predator.stomach_load -= 1; + e.predator.stomach_load -= Prey_Mass(e); e.predator.regurgitate_prepare = 0; e.predator.action_delay = time + cvar("g_balance_vore_action_delay"); Vore_WeightApply(e.predator); @@ -425,7 +435,7 @@ void Vore_DeadPrey_Configure(entity e) // first release the prey from the predator, as dead prey needs to be attached differently // the predator's stomach load is also decreased, as dead prey doesn't count any more - e.predator.stomach_load -= 1; + e.predator.stomach_load -= Prey_Mass(e); Vore_WeightApply(e.predator); e.predator = world;