seta cl_reticle_item_normal 1 "draw reticle when zooming without a weapon, 0 disables and values between 0 and 1 change alpha"\r
seta cl_flash_pickup 0.25 "if enabled, the screen flashes by this amount when picking up an item"\r
seta cl_flash_pickup_color "0 0 1" "color of the pickup flash"\r
+seta cl_flash_vore 0.25 "if enabled, the screen flashes by this amount when eating or getting eaten"\r
+seta cl_flash_vore_color_prey "1 0 0" "color of the vore flash for prey"\r
+seta cl_flash_vore_color_pred "0 1 0" "color of the vore flash for predators"\r
fov 90\r
seta cl_velocityzoom -0.2 "velocity based zooming of fov, negative values zoom out"\r
seta cl_velocityzoomtime 0.3 "time value for averaging speed values"\r
float reticle_type;\r
float chase_active_old;\r
float artwork_fade;\r
-float pickup_crosshair_time, pickup_crosshair_size, pickup_flash_time;\r
+float pickup_crosshair_time, pickup_crosshair_size, pickup_flash_time, vore_flash_laststate;\r
float myhealth, myhealth_prev, myhealth_flash;\r
float contentavgalpha, liquidalpha_prev;\r
float old_blurradius, old_bluralpha, old_sharpen_intensity;\r
if(cvar("viewsize") < 120)\r
CSQC_common_hud();\r
\r
+ if(cvar("cl_flash_pickup"))\r
+ if(pickup_flash_time < getstatf(STAT_LAST_PICKUP))\r
+ {\r
+ localcmd(strcat("bf ", cvar_string("cl_flash_pickup_color"), " ", cvar_string("cl_flash_pickup"), "\n"));\r
+ pickup_flash_time = getstatf(STAT_LAST_PICKUP);\r
+ }\r
+ if(cvar("cl_flash_vore"))\r
+ {\r
+ float vore_flash_state;\r
+ if(getstati(STAT_VORE_EATEN))\r
+ vore_flash_state = -1;\r
+ else\r
+ vore_flash_state = getstati(STAT_VORE_LOAD);\r
+\r
+ if(vore_flash_state > vore_flash_laststate && vore_flash_state > 0) // stomach load is bigger, so we ate someone\r
+ localcmd(strcat("bf ", cvar_string("cl_flash_vore_color_pred"), " ", cvar_string("cl_flash_vore"), "\n"));\r
+ if(vore_flash_state < vore_flash_laststate && vore_flash_state < 0) // -1 means we have been eaten\r
+ localcmd(strcat("bf ", cvar_string("cl_flash_vore_color_prey"), " ", cvar_string("cl_flash_vore"), "\n"));\r
+\r
+ vore_flash_laststate = vore_flash_state;\r
+ }\r
+\r
if not(getstati(STAT_VORE_EATEN)) // crosshair is useless if we're in the stomach\r
{\r
// crosshair goes VERY LAST\r
wcross_scale += sin(pickup_crosshair_size) * cvar("crosshair_pickup");\r
}\r
\r
- if(cvar("cl_flash_pickup"))\r
- if(pickup_flash_time < getstatf(STAT_LAST_PICKUP))\r
- {\r
- localcmd(strcat("bf ", cvar_string("cl_flash_pickup_color"), " ", cvar_string("cl_flash_pickup"), "\n"));\r
- pickup_flash_time = getstatf(STAT_LAST_PICKUP);\r
- }\r
-\r
if(shottype == SHOTTYPE_HITENEMY)\r
wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0\r
if(shottype == SHOTTYPE_HITTEAM)\r
makeMulti(sl, "hud_stomach");\r
me.TR(me);\r
me.TDempty(me, 0.2);\r
- me.TD(me, 1, 0.5, e = makeVoretCheckBoxEx(0.25, 0, "cl_flash_pickup", "Pickup flashes"));\r
+ me.TD(me, 1, 0.5, e = makeVoretCheckBoxEx(0.25, 0, "cl_flash_pickup", "Screen flashes"));\r
+ makeMulti(e, "cl_flash_vore");\r
me.TR(me);\r
me.TDempty(me, 0.2);\r
me.TD(me, 1, 2, e = makeVoretCheckBox(0, "cl_reticle_item_normal", "Zoom reticles"));\r