]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Make consumable items possible to regurgitate. Will not work yet as they apply no...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 19 Nov 2011 11:48:10 +0000 (13:48 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 19 Nov 2011 11:48:10 +0000 (13:48 +0200)
data/defaultVT.cfg
data/qcsrc/server/t_items.qc

index 87b803285167071db6a9df4f4a966a83de004c9f..2ac1c3ce15816acebd5793de796082b28d91ab41 100644 (file)
@@ -1627,7 +1627,7 @@ set g_vore_regurgitatecolor_color_digest "0.3 0.15 0" "the color players will ha
 set g_vore_regurgitatecolor_fade 0.01 "how quickly the regurgitation color washes off players once they leave the stomach, does not apply to dead bodies"\r
 set g_vore_regurgitatecolor_particles 0.75 "players who are dirty from regurgitation generate particles this often, based on the amount of goo they have on them"\r
 set g_vore_neighborprey_distance 4 "Distance by which prey inside the same stomach are positioned away from each other. 0 disables seeing neighboring prey"\r
-set g_vore_neighborprey_distance_item 4 "Distance by which items inside the same stomach are positioned away from each other. 0 disables seeing neighboring items"\r
+set g_vore_neighborprey_distance_item 8 "Distance by which items inside the same stomach are positioned away from each other. 0 disables seeing neighboring items"\r
 set g_vore_swallowmodel_range 100 "Distance by which the swallow model oscillates based on swallow progress"\r
 \r
 seta cl_healthsize_fov 0.2 "offset field of view by this amount based on size, to further induce the effect of being large or small"\r
index 80116ce828e452a4d1f38c3095f882c499d06daf..7987e2063dda63498b4c36963be22304da0f1b2f 100644 (file)
@@ -219,6 +219,21 @@ void Item_ScheduleInitialRespawn(entity e)
        Item_ScheduleRespawnIn(e, game_starttime - time + ITEM_RESPAWNTIME_INITIAL(e));\r
 }\r
 \r
+void Item_Consumable_Remove();\r
+void Item_Consumable_Think()\r
+{\r
+       if(self.predator.regurgitate_prepare && time > self.predator.regurgitate_prepare)\r
+       {\r
+               self.predator.regurgitate_prepare = 0;\r
+               self.predator.complain_vore = time + complain_delay_time; // prevent complaining the next frame if this empties our stomach\r
+               Item_Consumable_Remove();\r
+               return;\r
+       }\r
+\r
+       dprint("!!!!!!!!\n");\r
+       self.nextthink = time;\r
+}\r
+\r
 float Item_Consumable_Customizeentityforclient()\r
 {\r
        if(cvar("g_vore_neighborprey_distance_item") && self.predator == other.predator && !(other.cvar_chase_active || other.classname == "observer"))\r
@@ -231,6 +246,13 @@ float Item_Consumable_Customizeentityforclient()
        return TRUE;\r
 }\r
 \r
+void Item_Consumable_Remove()\r
+{\r
+       self.nextthink = 0;\r
+       remove(self);\r
+       self = world;\r
+}\r
+\r
 void Item_Consumable_Spawn(entity e, entity pl)\r
 {\r
        entity item;\r
@@ -250,6 +272,8 @@ void Item_Consumable_Spawn(entity e, entity pl)
        item.view_ofs_z = CONSUMABLE_VIEW_OFS_z;\r
 \r
        item.customizeentityforclient = Item_Consumable_Customizeentityforclient;\r
+       item.think = Item_Consumable_Think;\r
+       item.nextthink = time;\r
 }\r
 \r
 float Item_GiveTo(entity item, entity player)\r