]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Fix a bug causing consumable items to be instantly regurgitated in Arena games, if...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 18 Mar 2012 15:00:55 +0000 (17:00 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 18 Mar 2012 15:00:55 +0000 (17:00 +0200)
data/qcsrc/server/cl_client.qc
data/qcsrc/server/vore.qc
data/qcsrc/server/vore.qh
docs/TODO.txt

index e185bf6818a28be9291d01b28ee83d2e546d9c26..dcc68204f2ce0c76a1b983973f489ed587808521 100644 (file)
@@ -591,7 +591,7 @@ void PutObserverInServer (void)
                WriteEntity(MSG_ONE, self);\r
        }\r
 \r
-       Vore_Disconnect();\r
+       Vore_Disconnect(TRUE);\r
 \r
        kh_Key_DropAll(self, TRUE);\r
 \r
@@ -860,7 +860,7 @@ void PutClientInServer (void)
 \r
                RemoveGrabber(self); // Wazat's Grabber\r
 \r
-               Vore_Disconnect();\r
+               Vore_Disconnect(TRUE);\r
                self.swallow_progress_pred = self.swallow_progress_prey = 0;\r
 \r
                self.classname = "player";\r
@@ -1631,7 +1631,7 @@ void ClientDisconnect (void)
                return;\r
        }\r
 \r
-       Vore_Disconnect();\r
+       Vore_Disconnect(TRUE);\r
 \r
        CheatShutdownClient();\r
 \r
index 837a5210d61920c605e7cffdc8f745f1b9209a0e..e26b6a62d253c9de90b9dc039fe8a0a22e6b643f 100644 (file)
@@ -450,7 +450,7 @@ void Vore_Regurgitate(entity e)
        e.predator = world;\r
 }\r
 \r
-void Vore_Disconnect()\r
+void Vore_Disconnect(float consumables)\r
 {\r
        // frees prey from their predators when someone disconnects or goes spectating, or in other circumstances\r
        entity e;\r
@@ -467,10 +467,13 @@ void Vore_Disconnect()
                        Vore_Regurgitate(head);\r
        }\r
        // remove consumable items when we disconnect\r
-       for(e = world; (e = find(e, classname, "consumable")); )\r
+       if(consumables)\r
        {\r
-               if(e.predator == self)\r
-                       Item_Consumable_Remove(e, TRUE);\r
+               for(e = world; (e = find(e, classname, "consumable")); )\r
+               {\r
+                       if(e.predator == self)\r
+                               Item_Consumable_Remove(e, TRUE);\r
+               }\r
        }\r
 \r
        self.stomach_load = self.gravity = 0; // prevents a bug\r
@@ -776,12 +779,12 @@ void Vore()
        // apply delays and skip the vore system under some circumstances\r
        if(!cvar("g_vore")) // the vore system is disabled\r
        {\r
-               Vore_Disconnect();\r
+               Vore_Disconnect(TRUE);\r
                return;\r
        }\r
        if(time < game_starttime || (time < warmup && !inWarmupStage)) // don't allow vore before a round begins\r
        {\r
-               Vore_Disconnect();\r
+               Vore_Disconnect(FALSE);\r
                return;\r
        }\r
        if(self.spectatee_status)\r
index a03b4e150b803e1455e8428b1a02d9b2256708bf..86f400d7dde7d8a79063909d0a6968ab9541fc6d 100644 (file)
@@ -1,7 +1,7 @@
 const float vore_steptime = 0.1;\r
 \r
 void Vore();\r
-void Vore_Disconnect();\r
+void Vore_Disconnect(float consumables);\r
 .float regurgitate_prepare;\r
 \r
 entity Swallow_player_check();\r
index 7ddf27439e3550d0c3d85469ba0b3f3b7f9f32c9..25d138d0f8955b59c3ce8f3f676db1536eaeb9c6 100644 (file)
 \r
 - +0.8: In Race and RaceCTS, having a big belly should give you some boost or bonus\r
 \r
-- 0.7 | 0.8: Is it right to get screen flashes when team healing?
\ No newline at end of file
+- 0.7 | 0.8: Is it right to get screen flashes when team healing?\r
+\r
+- 0.8: Why am I not seeing frags and death in the scoreboard in Team Deathmatch?
\ No newline at end of file