]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Add a cvar that allows disabling the vore system. Yes, it's the core part Vore Tourna...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 12 Sep 2010 01:27:39 +0000 (04:27 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 12 Sep 2010 01:27:39 +0000 (04:27 +0300)
data/defaultVoretournament.cfg
data/qcsrc/client/Main.qc
data/qcsrc/client/main.qh
data/qcsrc/client/sbar.qc
data/qcsrc/server/bot/havocbot/vore_ai.qc
data/qcsrc/server/cl_client.qc
data/qcsrc/server/vore.qc

index 2ee750b3b377e7e0e849d63073b7e05a425bb0b6..a6d6c5cc657f73b760a7ebd91b03b72037f5c967 100644 (file)
@@ -1498,6 +1498,7 @@ seta g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the co
 set cl_vore_stomachmodel 1 "when enabled, we see the stomach model around us when eaten. -1 = disabled, 1 = enabled, anything between 0 and 1 = alpha"\r
 set cl_vore_cameraspeed 1.5 "speed at which you see yourself sliding down when swallowed, 0 disables"\r
 set cl_vore_punchangle 10 "your view gets tilted by this amount when swallowing or regurgitating someone"\r
+set g_vore 1 "enables the vore system, you want this on!"\r
 set g_vore_reversescoring 0 "reverses vore scoring, and gives digested prey a frag rather than the predator (offer yourself gameplay), does not affect suicides, weapon kills and team kills"\r
 set g_vore_teamvore 1 "allow players to swallow their team mates"\r
 set g_vore_biggergut 1 "when enabled, a player can't swallow someone with more players in their stomach than them"\r
index 54f11ec1459a3698c6927372ae85292122e938a6..d544424804dc281904e2e9a3b8dd10a11b047d2e 100644 (file)
@@ -1013,6 +1013,7 @@ void Ent_Init()
 \r
        g_weaponswitchdelay = ReadByte() / 255.0;\r
 \r
+       g_vore = ReadCoord();\r
        g_balance_vore_swallow_limit = ReadCoord();\r
 \r
        if(!postinit)\r
index 949ff1bfedcf2e403ffff45d64c00b7ac091acc9..10d1fd66407607c12842837107c49eee851558ed 100644 (file)
@@ -164,7 +164,7 @@ void centerprint(string strMessage);
 float armorblockpercent;\r
 float g_weaponswitchdelay;\r
 \r
-float g_balance_vore_swallow_limit;\r
+float g_vore, g_balance_vore_swallow_limit;\r
 \r
 //hooks\r
 float calledhooks;\r
index b09e2bf6acdd336b8e30888622876f3a16bd8076..9db2566f77d5ac6a276400a6eea580a685358f35 100644 (file)
@@ -2943,76 +2943,79 @@ void Sbar_Draw (void)
                fade = 3.2 - 2 * (time - weapontime);\r
                fade = bound(0.7, fade, 1);\r
 \r
-               // draw the stomach board\r
-               if (cvar("viewsize") <= 100) {\r
-                       if (teamplay)\r
-                               drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach", '256 256 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color\r
-                       else {\r
-                               // allow for custom HUD colors in non-teamgames\r
-                               color_x = cvar("sbar_color_bg_r");\r
-                               color_y = cvar("sbar_color_bg_g");\r
-                               color_z = cvar("sbar_color_bg_b");\r
-\r
-                               drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach", '256 256 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
-                       }\r
-               }\r
-\r
-               if(getstati(STAT_VORE_EATEN))\r
+               if(g_vore) // only when the vore system is enabled\r
                {\r
-                       drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color2"))), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-                       drawstring(bottomleft - '-80 172 0', "predator:", '10 10 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               }\r
-               else\r
-               {\r
-                       drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color1"))), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-                       drawstring(bottomleft - '-80 172 0', "self:", '10 10 0', ' 1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               }\r
+                       // draw the stomach board\r
+                       if (cvar("viewsize") <= 100) {\r
+                               if (teamplay)\r
+                                       drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach", '256 256 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color\r
+                               else {\r
+                                       // allow for custom HUD colors in non-teamgames\r
+                                       color_x = cvar("sbar_color_bg_r");\r
+                                       color_y = cvar("sbar_color_bg_g");\r
+                                       color_z = cvar("sbar_color_bg_b");\r
+\r
+                                       drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach", '256 256 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
+                               }\r
+                       }\r
 \r
-               float stomach_load;\r
-               stomach_load = getstati(STAT_VORE_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise\r
+                       if(getstati(STAT_VORE_EATEN))\r
+                       {\r
+                               drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color2"))), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               drawstring(bottomleft - '-80 172 0', "predator:", '10 10 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       }\r
+                       else\r
+                       {\r
+                               drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color1"))), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               drawstring(bottomleft - '-80 172 0', "self:", '10 10 0', ' 1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       }\r
 \r
-               Sbar_DrawXNum(bottomleft - '-18 170 0', bound(0, stomach_load, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               drawstring(bottomleft - '-40 170 0', "/", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               Sbar_DrawXNum(bottomleft - '-50 170 0', bound(0, g_balance_vore_swallow_limit, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       float stomach_load;\r
+                       stomach_load = getstati(STAT_VORE_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise\r
 \r
-               if(getstati(STAT_VORE_DIGESTING))\r
-                       drawstring(bottomleft - '-76 142 0', "stomach digesting", '12 12 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               else if(stomach_load == g_balance_vore_swallow_limit)\r
-                       drawstring(bottomleft - '-76 142 0', "stomach full", '12 12 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               else if(!stomach_load)\r
-                       drawstring(bottomleft - '-76 142 0', "stomach empty", '12 12 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               else\r
-                       drawstring(bottomleft - '-76 142 0', "stomach has prey", '12 12 0', '0.75 1 0.75', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       Sbar_DrawXNum(bottomleft - '-18 170 0', bound(0, stomach_load, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       drawstring(bottomleft - '-40 170 0', "/", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       Sbar_DrawXNum(bottomleft - '-50 170 0', bound(0, g_balance_vore_swallow_limit, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
 \r
-               // draw the stomach board player list\r
-               entity pl;\r
-               float f;\r
+                       if(getstati(STAT_VORE_DIGESTING))\r
+                               drawstring(bottomleft - '-76 142 0', "stomach digesting", '12 12 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       else if(stomach_load == g_balance_vore_swallow_limit)\r
+                               drawstring(bottomleft - '-76 142 0', "stomach full", '12 12 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       else if(!stomach_load)\r
+                               drawstring(bottomleft - '-76 142 0', "stomach empty", '12 12 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       else\r
+                               drawstring(bottomleft - '-76 142 0', "stomach has prey", '12 12 0', '0.75 1 0.75', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
 \r
-               pos = bottomleft;\r
-               for(pl = players.sort_next; pl; pl = pl.sort_next)\r
-               {\r
-                       if(pl.team == COLOR_SPECTATOR)\r
-                               continue;\r
+                       // draw the stomach board player list\r
+                       entity pl;\r
+                       float f;\r
 \r
-                       if(getstati(STAT_VORE_EATEN))\r
-                               f = pl.plpredator == getstati(STAT_VORE_EATEN);\r
-                       else\r
+                       pos = bottomleft;\r
+                       for(pl = players.sort_next; pl; pl = pl.sort_next)\r
                        {\r
-                               if(spectatee_status)\r
-                                       f = pl.plpredator == spectatee_status;\r
+                               if(pl.team == COLOR_SPECTATOR)\r
+                                       continue;\r
+\r
+                               if(getstati(STAT_VORE_EATEN))\r
+                                       f = pl.plpredator == getstati(STAT_VORE_EATEN);\r
                                else\r
-                                       f = pl.plpredator == player_localentnum;\r
-                       }\r
+                               {\r
+                                       if(spectatee_status)\r
+                                               f = pl.plpredator == spectatee_status;\r
+                                       else\r
+                                               f = pl.plpredator == player_localentnum;\r
+                               }\r
 \r
-                       if(f)\r
-                       {\r
-                               Sbar_PrintStomachboardItem(pos - '-16 124 0', pl);\r
-                               pos_y += 1.25 * sbar_fontsize_y;\r
-                       }\r
+                               if(f)\r
+                               {\r
+                                       Sbar_PrintStomachboardItem(pos - '-16 124 0', pl);\r
+                                       pos_y += 1.25 * sbar_fontsize_y;\r
+                               }\r
 \r
-                       if(getstati(STAT_VORE_EATEN))\r
-                       if(pl.sv_entnum == getstati(STAT_VORE_EATEN) - 1)\r
-                               Sbar_PrintStomachboardItemPred(bottomleft - '-76 156 0', pl);\r
+                               if(getstati(STAT_VORE_EATEN))\r
+                               if(pl.sv_entnum == getstati(STAT_VORE_EATEN) - 1)\r
+                                       Sbar_PrintStomachboardItemPred(bottomleft - '-76 156 0', pl);\r
+                       }\r
                }\r
 \r
                if (cvar("viewsize") <= 100) {\r
index 6e95c6feb18aa989d439cb47aa95a001ba9f2408..0b356c1a01c085dceaef7a819f41164a162c6da7 100644 (file)
@@ -77,6 +77,8 @@ void Vore_AI()
 {
        // main vore AI code
 
+       if(!cvar("g_vore"))
+               return;
        if(cvar("bot_nofire") || !skill || (g_rpg && cvar("g_rpg_botattack") < 1))
                return;
 
index 393463ccff1fd88f0a874e39b6504941eccbf43c..c8109a7baf7c552228d64164fbde9d2790a3b669 100644 (file)
@@ -1013,6 +1013,7 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteByte(MSG_ENTITY, cvar("g_balance_armor_blockpercent") * 255.0);\r
        WriteByte(MSG_ENTITY, cvar("g_balance_weaponswitchdelay") * 255.0);\r
 \r
+       WriteCoord(MSG_ENTITY, cvar("g_vore"));\r
        WriteCoord(MSG_ENTITY, cvar("g_balance_vore_swallow_limit"));\r
        return TRUE;\r
 }\r
index e0ef601fabf9daeda805402991c43d3428d41b8e..971366103c05062c5a608c748dd788fc3c030940 100644 (file)
@@ -318,6 +318,12 @@ void Vore()
 {\r
        // main vore code, this is where it all happens\r
 \r
+       if(!cvar("g_vore")) // vore system is disabled\r
+       {\r
+               Vore_Disconnect();\r
+               return;\r
+       }\r
+\r
        // set all vore related stats\r
        if(self.predator.classname == "player")\r
        {\r