if(spectatee_status == -1)
s = sprintf(_("^1Use ^3%s^1 or ^3%s^1 to change the speed"), getcommandkey("next weapon", "weapnext"), getcommandkey("previous weapon", "weapprev"));
else
- s = sprintf(_("^1Press ^3%s^1 to observe"), getcommandkey("secondary fire", "+fire2"));
+ s = sprintf(_("^1Press ^3%s^1 to observe, ^3%s^1 to change camera mode"), getcommandkey("secondary fire", "+fire2"), getcommandkey("drop weapon", "dropweapon"));
drawInfoMessage(s);
s = sprintf(_("^1Press ^3%s^1 for gamemode info"), getcommandkey("server info", "+show_info"));
if (!autocvar_crosshair_enabled) // main toggle for crosshair rendering
return;
+ if (spectatee_status > 0 && STAT(CAMERA_SPECTATOR) == 2)
+ return;
+
if (hud != HUD_NORMAL)
{
HUD_Crosshair_Vehicle(this);
// event chase camera
if(autocvar_chase_active <= 0) // greater than 0 means it's enabled manually, and this code is skipped
{
+ if(STAT(CAMERA_SPECTATOR))
+ {
+ if(spectatee_status > 0)
+ {
+ if(!autocvar_chase_active)
+ {
+ cvar_set("chase_active", "-2");
+ goto skip_eventchase_death;
+ }
+ }
+ else if(autocvar_chase_active == -2)
+ cvar_set("chase_active", "0");
+
+ if(autocvar_chase_active == -2)
+ goto skip_eventchase_death;
+ }
+ else if(autocvar_chase_active == -2)
+ cvar_set("chase_active", "0");
+
float vehicle_chase = (hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0));
float ons_roundlost = (gametype == MAPINFO_TYPE_ONSLAUGHT && STAT(ROUNDLOST));
entity gen = NULL;
eventchase_current_distance = 0;
}
+ LABEL(skip_eventchase_death);
+
// do lockview after event chase camera so that it still applies whenever necessary.
if(autocvar_cl_lockview || (!autocvar_hud_cursormode && (autocvar__hud_configure && spectatee_status <= 0 || intermission > 1 || QuickMenu_IsOpened())))
{
REGISTER_STAT(TELEPORT_MAXSPEED, float, autocvar_g_teleport_maxspeed)
REGISTER_STAT(TELEPORT_TELEFRAG_AVOID, int, autocvar_g_telefrags_avoid)
+.int camera_spectator;
+REGISTER_STAT(CAMERA_SPECTATOR, int, this.camera_spectator)
+
REGISTER_STAT(SPECTATORSPEED, float)
#ifdef SVQC
this.angles = spectatee.v_angle;
STAT(FROZEN, this) = STAT(FROZEN, spectatee);
this.revive_progress = spectatee.revive_progress;
- if(!PHYS_INPUT_BUTTON_USE(this))
+ if(!PHYS_INPUT_BUTTON_USE(this) && this.camera_spectator != 2)
this.fixangle = true;
setorigin(this, spectatee.origin);
setsize(this, spectatee.mins, spectatee.maxs);
{
if(MinigameImpulse(this, this.impulse))
this.impulse = 0;
+
+ if (this.impulse == IMP_weapon_drop.impulse)
+ {
+ this.camera_spectator = (this.camera_spectator + 1) % 3;
+ this.impulse = 0;
+ return;
+ }
}
if (this.flags & FL_JUMPRELEASED) {
if (PHYS_INPUT_BUTTON_JUMP(this) && !this.version_mismatch) {
.float usekeypressed;
.float last_vehiclecheck;
.int items_added;
+.float camera_spectator_stat = _STAT(CAMERA_SPECTATOR);
void PlayerPreThink (entity this)
{
WarpZone_PlayerPhysics_FixVAngle(this);
// if a player goes unarmed after holding a loaded weapon, empty his clip size and remove the crosshair ammo ring
if (PS(this).m_weapon == WEP_Null)
this.clip_load = this.clip_size = 0;
+
+ this.camera_spectator_stat = this.camera_spectator;
}
void DrownPlayer(entity this)