if(!CheckWireframeBox(porto, p - 48 * v_right - 48 * v_up + 16 * v_forward, 96 * v_right, 96 * v_up, 96 * v_forward))
return;
if(portal_number == 1)
+ {
portal1_idx = idx;
- if(portal_number >= 2)
- break;
+ if(portal_number >= 2)
+ break;
+ }
}
while(idx >= 2)
{
float zoomsensitivity, zoomspeed, zoomfactor, zoomdir;
float velocityzoom, curspeed;
+ vector v;
zoomsensitivity = autocvar_cl_zoomsensitivity;
zoomfactor = autocvar_cl_zoomfactor;
if(autocvar_cl_velocityzoom && autocvar_cl_velocityzoom_type) // _type = 0 disables velocity zoom too
{
+ v = pmove_vel;
+ if(csqcplayer)
+ v = csqcplayer.velocity;
+
switch(autocvar_cl_velocityzoom_type)
{
- case 3: curspeed = max(0, v_forward * pmove_vel); break;
- case 2: curspeed = (v_forward * pmove_vel); break;
- case 1: default: curspeed = vlen(pmove_vel); break;
+ case 3: curspeed = max(0, v_forward * v); break;
+ case 2: curspeed = (v_forward * v); break;
+ case 1: default: curspeed = vlen(v); break;
}
velocityzoom = bound(0, drawframetime / max(0.000000001, autocvar_cl_velocityzoom_time), 1); // speed at which the zoom adapts to player velocity
if(teamplay)
if(t == myteam)
return SHOTTYPE_HITTEAM;
- if(t == COLOR_SPECTATOR)
+ if(t == FL_SPECTATOR)
return SHOTTYPE_HITWORLD;
return SHOTTYPE_HITENEMY;
}
#define BUTTON_3 4
#define BUTTON_4 8
+float cl_notice_run();
void CSQC_UpdateView(float w, float h)
{
entity e;
vid_width = vf_size_x;
vid_height = vf_size_y;
- vector reticle_pos, reticle_size;
- vector splash_pos, splash_size;
+ vector reticle_pos = '0 0 0', reticle_size = '0 0 0';
+ vector splash_pos = '0 0 0', splash_size = '0 0 0';
WaypointSprite_Load();
{
// make special vector since we can't use view_origin (It is one frame old as of this code, it gets set later with the results this code makes.)
vector current_view_origin = getpropertyvec(VF_ORIGIN);
-
+
// We must enable chase_active to get a third person view (weapon viewmodel hidden and own player model showing).
// Ideally, there should be another way to enable third person cameras, such as through setproperty()
if(!autocvar_chase_active)
eventchase_current_distance = 0; // start from 0 next time
}
}
-
+ // workaround for camera stuck between player's legs when using chase_active 1
+ // because the engine stops updating the chase_active camera when the game ends
+ else if(intermission)
+ {
+ cvar_settemp("chase_active", "-1");
+ eventchase_current_distance = 0;
+ }
+
// do lockview after event chase camera so that it still applies whenever necessary.
- if(autocvar_cl_lockview || (autocvar__hud_configure && spectatee_status <= 0) || intermission > 1)
+ if(autocvar_cl_lockview || (!autocvar_hud_cursormode && (autocvar__hud_configure && spectatee_status <= 0 || intermission > 1)))
{
setproperty(VF_ORIGIN, freeze_org);
setproperty(VF_ANGLES, freeze_ang);
calledhooks |= HOOK_END;
}
}
-
- Announcer();
+
+ Announcer();
fov = autocvar_fov;
if(fov <= 59.5)
// improved polyblend
- vector rgb;
if(autocvar_hud_contents)
{
float contentalpha_temp, incontent, liquidalpha, contentfadetime;
}
// edge detection postprocess handling done second (used by hud_powerup)
- float sharpen_intensity, strength_finished = getstatf(STAT_STRENGTH_FINISHED), invincible_finished = getstatf(STAT_INVINCIBLE_FINISHED);
+ float sharpen_intensity = 0, strength_finished = getstatf(STAT_STRENGTH_FINISHED), invincible_finished = getstatf(STAT_INVINCIBLE_FINISHED);
if (strength_finished - time > 0) { sharpen_intensity += (strength_finished - time); }
if (invincible_finished - time > 0) { sharpen_intensity += (invincible_finished - time); }
else
shottype = SHOTTYPE_HITWORLD;
- vector wcross_color, wcross_size;
- string wcross_wep, wcross_name;
+ vector wcross_color = '0 0 0', wcross_size = '0 0 0';
+ string wcross_wep = "", wcross_name;
float wcross_scale, wcross_blur;
if (autocvar_crosshair_per_weapon || autocvar_crosshair_color_per_weapon) {
if(autocvar_crosshair_hitindication)
{
- vector hitindication_color = stov(autocvar_crosshair_hitindication_color);
+ vector hitindication_color = ((autocvar_crosshair_color_per_weapon) ? stov(autocvar_crosshair_hitindication_per_weapon_color) : stov(autocvar_crosshair_hitindication_color));
+
if(hitindication_crosshair_time < hit_time)
{
if(time - hit_time < MAX_TIME_DIFF) // don't trigger the animation if it's too old
if (autocvar_crosshair_ring || autocvar_crosshair_ring_reload)
{
// declarations and stats
- float ring_value, ring_scale, ring_alpha, ring_inner_value, ring_inner_alpha;
- string ring_image, ring_inner_image;
- vector ring_rgb, ring_inner_rgb;
+ float ring_value = 0, ring_scale = 0, ring_alpha = 0, ring_inner_value = 0, ring_inner_alpha = 0;
+ string ring_image = string_null, ring_inner_image = string_null;
+ vector ring_rgb = '0 0 0', ring_inner_rgb = '0 0 0';
ring_scale = autocvar_crosshair_ring_size;
wcross_color = stov(autocvar_crosshair_dot_color);
CROSSHAIR_DRAW(wcross_resolution * autocvar_crosshair_dot_size, "gfx/crosshairdot.tga", f * autocvar_crosshair_dot_alpha);
- // FIXME why don't we use wcross_alpha here?
+ // FIXME why don't we use wcross_alpha here?cl_notice_run();
wcross_color = wcross_color_old;
}
}
CSQC_RAPTOR_HUD();
else if(hud == HUD_BUMBLEBEE)
CSQC_BUMBLE_HUD();
+ else if(hud == HUD_BUMBLEBEE_GUN)
+ CSQC_BUMBLE_GUN_HUD();
}
+
+ cl_notice_run();
+
// let's reset the view back to normal for the end
setproperty(VF_MIN, '0 0 0');
setproperty(VF_SIZE, '1 0 0' * w + '0 1 0' * h);
acc_lev[i] = stof(argv(i)) / 100.0;
}
// let know that acc_col[] needs to be loaded
- acc_col_x[0] = -1;
+ acc_col[0] = '-1 0 0';
}
HUD_Main(); // always run these functions for alpha checks