]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Cvar the distance by which prey are separated in the stomach. Setting the cvar to...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 22:37:45 +0000 (01:37 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 22:37:45 +0000 (01:37 +0300)
data/defaultVT.cfg
data/qcsrc/server/cl_client.qc
data/qcsrc/server/vore.qc

index cd056d83dd7a8eaf083bb03e9ce86e7ab729bba8..61ad681a7e719f79231a7f8622e557429482565f 100644 (file)
@@ -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"\r
 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"\r
 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"\r
 set g_vore_regurgitatecolor_release_fade 0.01 "how quickly the regurgitation color washes off players once they leave the stomach"\r
 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"\r
 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"\r
+set g_vore_preydistance 16 "Distance by which prey inside the same stomach are positioned away from each other. 0 disables seeing neighboring prey"\r
 \r
 set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size"\r
 set g_healthsize_movementfactor 0.5 "Amount by which player size affects jumping and running"\r
 \r
 set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size"\r
 set g_healthsize_movementfactor 0.5 "Amount by which player size affects jumping and running"\r
index 85138812266dc178a754a4cc478c7874d67d7446..ae99b3632a577d3b55be5aa328c120c9a9566dae 100644 (file)
@@ -530,10 +530,10 @@ float Client_customizeentityforclient()
        Client_setmodel(setmodel_state());\r
        if not(self.stat_eaten || self.fakeprey)\r
                self.alpha = default_player_alpha;\r
        Client_setmodel(setmodel_state());\r
        if not(self.stat_eaten || self.fakeprey)\r
                self.alpha = default_player_alpha;\r
-       else if(self.predator == other.predator && self != other && !(other.cvar_chase_active || other.classname == "observer"))\r
-               self.alpha = default_player_alpha;\r
+       else if(cvar("g_vore_preydistance") && self.predator == other.predator && self != other && !(other.cvar_chase_active || other.classname == "observer"))\r
+               self.alpha = default_player_alpha; // allow seeing neighboring prey\r
        else\r
        else\r
-               self.alpha = -1; // hide all prey\r
+               self.alpha = -1; // hide prey\r
        return TRUE;\r
 }\r
 \r
        return TRUE;\r
 }\r
 \r
index e0abddd907ca019de2f916b7dfac822484310445..b44e6ec478c2af571a4c0e630f8bcc3d211c5483 100644 (file)
@@ -109,9 +109,9 @@ void Vore_SetCamera()
        makevectors(self.v_angle);\r
        v_forward_z = 0;\r
 \r
        makevectors(self.v_angle);\r
        v_forward_z = 0;\r
 \r
-       // In order to allow prey to see each other in the same stomach, we must position each occupant differently,\r
+       // In order to allow prey to see each other in the stomach, we must position each occupant differently,\r
        // else all players would overlap in the center. To do this, we run a loop on all players in the same stomach.\r
        // else all players would overlap in the center. To do this, we run a loop on all players in the same stomach.\r
-       // For each player, the origin is updated, then a new origin is used for the next player and so on.\r
+       // For each player, the origin is updated, then a new origin is used for the next player.\r
        // This requires that no more than 9 players can be in a stomach at a time!\r
        FOR_EACH_PLAYER(head)\r
        {\r
        // This requires that no more than 9 players can be in a stomach at a time!\r
        FOR_EACH_PLAYER(head)\r
        {\r
@@ -149,7 +149,8 @@ void Vore_SetCamera()
                                default:\r
                                        break;\r
                        }\r
                                default:\r
                                        break;\r
                        }\r
-                       head.view_ofs = PL_PREY_VIEW_OFS + (v_forward + origin_apply * 16);\r
+                       // since prey have their predators set as an aiment, view_ofs will specify the real origin of prey, not just the view offset\r
+                       head.view_ofs = PL_PREY_VIEW_OFS + (v_forward + origin_apply * cvar("g_vore_preydistance"));\r
                        position_counter += 1;\r
                }\r
        }\r
                        position_counter += 1;\r
                }\r
        }\r