]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Add a cvar to allow disabling / changing the alpha of the stomach model (client side...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 5 Sep 2010 17:35:07 +0000 (20:35 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 5 Sep 2010 17:35:07 +0000 (20:35 +0300)
data/defaultVoretournament.cfg
data/qcsrc/server/cl_client.qc
data/qcsrc/server/defs.qh
data/qcsrc/server/miscfunctions.qc

index 642e53361c6fd12d13b2c3e6b31f9283db3ee6fb..75e294403ffc570b7cd0ba7f695d8b00b12bf1f2 100644 (file)
@@ -1497,6 +1497,7 @@ set g_triggerimpulse_radial_multiplier 1 "trigger_impulse radial field multiplie
 seta g_ghost_items 1 "enable ghosted items (when between 0 and 1, overrides the alpha value)"\r
 seta g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"\r
 \r
+set cl_vore_stomachmodel 0.5 "when enabled, we see the stomach model around us when eaten. -1 = disabled, 1 = enabled, anything between 0 and 1 = alpha"\r
 set g_vore_regurgitatecolor_released "0.75 1 0.5" "the color players will have when released from the stomach alive"\r
 set g_vore_regurgitatecolor_digested "-0.125 0.25 0" "the color players will have when released from the stomach digested"\r
 set g_vore_gurglesound 1 "predators make an ambient gurgling sound"\r
index 292a37afee36c7c0e766f895fb9b6d6853a9b0e5..11cf27c7df0b3f1631ace4719a4c114a09a3a345 100644 (file)
@@ -517,6 +517,8 @@ float Client_customizeentityforclient()
        if(other.cvar_chase_active > 0 || other.classname == "observer") // the classname check prevents a bug\r
        {\r
                Client_setmodel(setmodel_state());\r
+               if not(self.eater.classname == "player")\r
+                       self.alpha = default_player_alpha;\r
                return TRUE;\r
        }\r
        if(other.spectatee_status)\r
@@ -525,9 +527,12 @@ float Client_customizeentityforclient()
        {\r
                tokenizebyseparator(self.playermodel, ".");\r
                Client_setmodel(strcat(argv(0), "_stomach.md3"));\r
+               self.alpha = other.cvar_cl_vore_stomachmodel;\r
                return TRUE;\r
        }\r
        Client_setmodel(setmodel_state());\r
+       if not(self.eater.classname == "player")\r
+               self.alpha = default_player_alpha;\r
        return TRUE;\r
 }\r
 \r
index 88cb559fbf4da9217afd0db435fd77500cc3c9fc..6a6a9aa69772e7410b5d17276ad1df97e0c72c9c 100644 (file)
@@ -333,6 +333,7 @@ float sv_clforceplayermodels;
 .float cvar_cl_gunalign;\r
 .float cvar_cl_noantilag;\r
 .float cvar_chase_active;\r
+.float cvar_cl_vore_stomachmodel;\r
 \r
 void Announce(string snd);\r
 void AnnounceTo(entity e, string snd);\r
index 0f6fdcadad81be4064013cb1b8c351b8b2a7b324..65af9b2c753a510ddadde4d3759c6975fc08b2d0 100644 (file)
@@ -615,6 +615,7 @@ void GetCvars(float f)
        GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_share, "cl_accuracy_data_share");\r
        GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_receive, "cl_accuracy_data_receive");\r
        GetCvars_handleFloat(s, f, cvar_chase_active, "chase_active");\r
+       GetCvars_handleFloat(s, f, cvar_cl_vore_stomachmodel, "cl_vore_stomachmodel");\r
 \r
        self.cvar_cl_accuracy_data_share = boolean(self.cvar_cl_accuracy_data_share);\r
        self.cvar_cl_accuracy_data_receive = boolean(self.cvar_cl_accuracy_data_receive);\r