From: MirceaKitsune Date: Tue, 3 May 2011 22:37:45 +0000 (+0300) Subject: Cvar the distance by which prey are separated in the stomach. Setting the cvar to... X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=a84e64941a7e765f09aee5604bd7d50f0064545a Cvar the distance by which prey are separated in the stomach. Setting the cvar to 0 will disable the ability to see neighboring prey, and everything will work as before. --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index cd056d83..61ad681a 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1564,6 +1564,7 @@ set g_vore_regurgitatecolor_release "0.4 0.6 0.1" "the color players will have w set g_vore_regurgitatecolor_release_fade 0.01 "how quickly the regurgitation color washes off players once they leave the stomach" set g_vore_regurgitatecolor_digest "0.15 0.25 0" "the color players will have when digested, only works when g_vore_keepdeadprey is disabled" set g_vore_keepdeadprey 0.75 "If enabled, prey remains in the stomach after dying, else the predator throws up their dead body. 0 = disabled, 1 = ernabled, anything between = probability" +set g_vore_preydistance 16 "Distance by which prey inside the same stomach are positioned away from each other. 0 disables seeing neighboring prey" set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size" set g_healthsize_movementfactor 0.5 "Amount by which player size affects jumping and running" diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 85138812..ae99b363 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -530,10 +530,10 @@ float Client_customizeentityforclient() Client_setmodel(setmodel_state()); if not(self.stat_eaten || self.fakeprey) self.alpha = default_player_alpha; - else if(self.predator == other.predator && self != other && !(other.cvar_chase_active || other.classname == "observer")) - self.alpha = default_player_alpha; + else if(cvar("g_vore_preydistance") && self.predator == other.predator && self != other && !(other.cvar_chase_active || other.classname == "observer")) + self.alpha = default_player_alpha; // allow seeing neighboring prey else - self.alpha = -1; // hide all prey + self.alpha = -1; // hide prey return TRUE; } diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index e0abddd9..b44e6ec4 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -109,9 +109,9 @@ void Vore_SetCamera() makevectors(self.v_angle); v_forward_z = 0; - // In order to allow prey to see each other in the same stomach, we must position each occupant differently, + // In order to allow prey to see each other in the stomach, we must position each occupant differently, // else all players would overlap in the center. To do this, we run a loop on all players in the same stomach. - // For each player, the origin is updated, then a new origin is used for the next player and so on. + // For each player, the origin is updated, then a new origin is used for the next player. // This requires that no more than 9 players can be in a stomach at a time! FOR_EACH_PLAYER(head) { @@ -149,7 +149,8 @@ void Vore_SetCamera() default: break; } - head.view_ofs = PL_PREY_VIEW_OFS + (v_forward + origin_apply * 16); + // since prey have their predators set as an aiment, view_ofs will specify the real origin of prey, not just the view offset + head.view_ofs = PL_PREY_VIEW_OFS + (v_forward + origin_apply * cvar("g_vore_preydistance")); position_counter += 1; } }