]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Don't require re-pressing for stomach kicks for bots (again). This prevents a certain...
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 36d5705312c0bf6b985a527090caa2ddcb0f4f09..8b82b697553d7c5b96d34532ed789ce77c1ec713 100644 (file)
@@ -218,7 +218,7 @@ void Vore_SwallowModel_Think()
        }\r
 \r
        // properties that should update whenever possible, but when the predator is not available\r
-       self.alpha = self.owner.cvar_cl_vore_stomachmodel;\r
+       self.alpha = self.owner.cvar_cl_vore_swallowmodel;\r
        self.nextthink = time;\r
 }\r
 \r
@@ -235,6 +235,7 @@ void Vore_SwallowModel_Update(entity prey, entity pred)
                // apply the properties of the prey\r
                prey.swallow_model.viewmodelforclient = prey; // use the same system as the weapon model\r
                //prey.swallow_model.effects |= EF_NOGUNBOB; // let it bob\r
+               prey.swallow_model.effects |= EF_NODEPTHTEST; // don't hide behind walls\r
                prey.swallow_model.colormap = prey.colormap; // pants and shirt color\r
                prey.swallow_model.glowmod = prey.glowmod; // glow color\r
 \r
@@ -518,11 +519,12 @@ void Vore_Teamheal()
        }\r
 }\r
 \r
+.float kick_pressed;\r
 void Vore_StomachKick()\r
 {\r
        // allows prey to kick the predator's stomach and do some damage or attempt to escape\r
 \r
-       if(time > self.stomachkick_delay)\r
+       if(time > self.stomachkick_delay && !self.kick_pressed)\r
        {\r
                float damage;\r
                vector force;\r
@@ -546,6 +548,9 @@ void Vore_StomachKick()
                        self.predator.regurgitate_prepare = 0;\r
 \r
                self.stomachkick_delay = time + cvar("g_balance_vore_kick_delay");\r
+               if(cvar("g_balance_vore_kick_repress"))\r
+               if not(clienttype(self) == CLIENTTYPE_BOT) // not for bots, to prevent an issue\r
+                       self.kick_pressed = TRUE;\r
        }\r
 }\r
 \r
@@ -847,8 +852,13 @@ void Vore()
                Vore_Teamheal();\r
 \r
        // execute prey commands\r
-       if(self.BUTTON_ATCK && cvar("g_vore_kick"))\r
-               Vore_StomachKick();\r
+       if(self.BUTTON_ATCK)\r
+       {\r
+               if(cvar("g_vore_kick"))\r
+                       Vore_StomachKick();\r
+       }\r
+       else\r
+               self.kick_pressed = FALSE;\r
        if(self.BUTTON_JUMP)\r
                Vore_StomachLeave();\r
 \r