seta crosshair_pickup_speed 4\r
seta crosshair_ring_alpha 0.5\r
seta crosshair_ring_size 3\r
+seta crosshair_swallowindicator 1\r
+seta crosshair_swallowindicator_size 4\r
seta crosshair_effect_speed 0.25 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"\r
seta crosshair_effect_scalefade 1 "use scaling and fading for crosshair effects"\r
seta crosshair_hittest 1.25 "do a crosshair hit evaluation; also, the crosshair is scaled by the given number when aiming at an enemy, and blurred when aiming at a team mate"\r
Sbar_DrawCenterPrint(); // draw centerprint messages even if viewsize >= 120\r
}\r
\r
+ float weapon_clipload, weapon_clipsize, ring_scale;\r
+\r
+ float swallow_indicator;\r
+ if(cvar("crosshair_swallowindicator"))\r
+ swallow_indicator = getstati(STAT_VORE_CANSWALLOW);\r
+\r
float hud;\r
hud = getstati(STAT_HUD);\r
\r
wcross_origin = project_3d_to_2d(view_origin + MAX_SHOT_DISTANCE * view_forward);\r
wcross_origin_z = 0;\r
if(cvar("crosshair_hittest"))\r
+ if(!swallow_indicator)\r
{\r
vector wcross_oldorigin;\r
wcross_oldorigin = wcross_origin;\r
else\r
shottype = SHOTTYPE_HITWORLD;\r
\r
- float weapon_clipload, weapon_clipsize, ring_scale;\r
-\r
string wcross_style;\r
- wcross_style = cvar_string("crosshair");\r
+\r
+ if(swallow_indicator > 1)\r
+ wcross_style = "_canswallow_team.tga";\r
+ else if(swallow_indicator > 0)\r
+ wcross_style = "_canswallow.tga";\r
+ else\r
+ wcross_style = cvar_string("crosshair");\r
\r
if (wcross_style != "0") {\r
vector wcross_color, wcross_size;\r
CROSSHAIR_DRAW(wcross_resolution, wcross_name, wcross_alpha * f);\r
wcross_name_alpha_goal_prev = f;\r
\r
+ if(swallow_indicator)\r
+ wcross_size *= cvar("crosshair_swallowindicator_size");\r
+\r
// ring around crosshair representing bullets left in weapon clip\r
weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);\r
a = cvar("crosshair_ring_alpha");\r
if (weapon_clipload && a)\r
+ if (!swallow_indicator)\r
{\r
weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);\r
ring_scale = cvar("crosshair_ring_size");\r
const float STAT_VORE_DIGESTING = 53;\r
const float STAT_VORE_EATEN = 54;\r
const float STAT_VORE_CANLEAVE = 55;\r
+const float STAT_VORE_CANSWALLOW = 56;\r
const float CTF_STATE_ATTACK = 1;\r
const float CTF_STATE_DEFEND = 2;\r
const float CTF_STATE_COMMANDER = 3;\r
\r
-const float STAT_HUD = 56;\r
+const float STAT_HUD = 57;\r
const float HUD_NORMAL = 0;\r
\r
// moved that here so the client knows the max.\r
self.stat_stomachload = spectatee.stat_stomachload;\r
self.stat_digesting = spectatee.stat_digesting;\r
self.stat_canleave = spectatee.stat_canleave;\r
+ self.stat_canswallow = spectatee.stat_canswallow;\r
setorigin(self, spectatee.origin);\r
setsize(self, spectatee.mins, spectatee.maxs);\r
SetZoomState(spectatee.zoomstate);\r
.float stomach_load;\r
.float weapon_delay;\r
.float fakeprey;\r
-.float stat_eaten, stat_stomachload, stat_digesting, stat_canleave;\r
+.float stat_eaten, stat_stomachload, stat_digesting, stat_canleave, stat_canswallow;\r
\r
// Fields\r
\r
addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);\r
addstat(STAT_WINNING, AS_FLOAT, winning);\r
addstat(STAT_VORE_LOAD, AS_INT, stat_stomachload);\r
+ addstat(STAT_VORE_CANSWALLOW, AS_INT, stat_canswallow);\r
addstat(STAT_VORE_DIGESTING, AS_INT, stat_digesting);\r
addstat(STAT_VORE_EATEN, AS_INT, stat_eaten);\r
addstat(STAT_VORE_CANLEAVE, AS_INT, stat_canleave);\r
prey = Swallow_player_check();\r
\r
// attempt to swallow our new prey if we pressed the attack button, and there's any in range\r
- if(self.BUTTON_ATCK)\r
+ self.stat_canswallow = 0;\r
if(Swallow_condition_check(prey))\r
- Vore_Swallow(prey);\r
+ {\r
+ // canswallow stat, used by the HUD\r
+ if(teams_matter && prey.team == self.team)\r
+ self.stat_canswallow = 2;\r
+ else\r
+ self.stat_canswallow = 1;\r
+\r
+ if(self.BUTTON_ATCK)\r
+ Vore_Swallow(prey);\r
+ }\r
\r
// toggle digestion, if the player has someone in their stomach\r
if(self.BUTTON_DIGEST && cvar("g_vore_digestion"))\r