set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
set g_jetpack_fuel 8 "fuel per second for jetpack"
set g_jetpack_attenuation 2 "jetpack sound attenuation"
+set g_jetpack_reverse_thrust 0 "if not 0, downward acceleration when crouching with the jetpack"
set g_grappling_hook_tarzan 2 // 2: can also pull players
set g_balance_grapplehook_speed_fly 1800
set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
set g_jetpack_fuel 8 "fuel per second for jetpack"
set g_jetpack_attenuation 2 "jetpack sound attenuation"
+set g_jetpack_reverse_thrust 0 "if not 0, downward acceleration when crouching with the jetpack"
set g_grappling_hook_tarzan 2 // 2: can also pull players
set g_balance_grapplehook_speed_fly 1800
set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
set g_jetpack_fuel 8 "fuel per second for jetpack"
set g_jetpack_attenuation 2 "jetpack sound attenuation"
+set g_jetpack_reverse_thrust 0 "if not 0, downward acceleration when crouching with the jetpack"
set g_grappling_hook_tarzan 2 // 2: can also pull players
set g_balance_grapplehook_speed_fly 1800
set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
set g_jetpack_fuel 8 "fuel per second for jetpack"
set g_jetpack_attenuation 2 "jetpack sound attenuation"
+set g_jetpack_reverse_thrust 0 "if not 0, downward acceleration when crouching with the jetpack"
set g_grappling_hook_tarzan 2 // 2: can also pull players
set g_balance_grapplehook_speed_fly 1800
set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
set g_jetpack_fuel 8 "fuel per second for jetpack"
set g_jetpack_attenuation 2 "jetpack sound attenuation"
+set g_jetpack_reverse_thrust 0 "if not 0, downward acceleration when crouching with the jetpack"
set g_grappling_hook_tarzan 2 // 2: can also pull players
set g_balance_grapplehook_speed_fly 1800
set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
set g_jetpack_fuel 8 "fuel per second for jetpack"
set g_jetpack_attenuation 2 "jetpack sound attenuation"
+set g_jetpack_reverse_thrust 0 "if not 0, downward acceleration when crouching with the jetpack"
set g_grappling_hook_tarzan 2 // 2: can also pull players
set g_balance_grapplehook_speed_fly 1800
set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
set g_jetpack_fuel 8 "fuel per second for jetpack"
set g_jetpack_attenuation 2 "jetpack sound attenuation"
+set g_jetpack_reverse_thrust 0 "if not 0, downward acceleration when crouching with the jetpack"
set g_grappling_hook_tarzan 2 // 2: can also pull players
set g_balance_grapplehook_speed_fly 1800
r_water_hideplayer 1 // hide your own feet/player model in refraction views, this way you don't see half of your body under water
r_water_refractdistort 0.019
+set cl_rainsnow_maxdrawdist 2048
+
// strength sound settings
set sv_strengthsound_antispam_time 0.1 "minimum distance of strength sounds"
set sv_strengthsound_antispam_refire_threshold 0.04 "apply minimum distance only if refire of the gun is smaller than this"
--- /dev/null
+Plane,g_ok_hmg_luma
--- /dev/null
+Plane,g_ok_hmg_simple
\ No newline at end of file
--- /dev/null
+Plane,g_ok_rl_luma
--- /dev/null
+Plane,g_ok_rl_simple
\ No newline at end of file
seta notification_INFO_WEAPON_VAPORIZER_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_WEAPON_VORTEX_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
-// MSG_CENTER notifications (count = 224):
+// MSG_CENTER notifications (count = 225):
seta notification_CENTER_ALONE "1" "0 = off, 1 = centerprint"
seta notification_CENTER_ASSAULT_ATTACKING "1" "0 = off, 1 = centerprint"
seta notification_CENTER_ASSAULT_DEFENDING "1" "0 = off, 1 = centerprint"
seta notification_CENTER_CTF_PICKUP_TEAM_VERBOSE_RED "1" "0 = off, 1 = centerprint"
seta notification_CENTER_CTF_PICKUP_TEAM_VERBOSE_YELLOW "1" "0 = off, 1 = centerprint"
seta notification_CENTER_CTF_PICKUP_TEAM_YELLOW "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_CTF_PICKUP_VISIBLE "1" "0 = off, 1 = centerprint"
seta notification_CENTER_CTF_PICKUP_YELLOW "1" "0 = off, 1 = centerprint"
seta notification_CENTER_CTF_RETURN_BLUE "1" "0 = off, 1 = centerprint"
seta notification_CENTER_CTF_RETURN_PINK "1" "0 = off, 1 = centerprint"
seta notification_show_sprees_info_newline "1" "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
seta notification_show_sprees_info_specialonly "1" "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
-// Notification counts (total = 806): MSG_ANNCE = 89, MSG_INFO = 316, MSG_CENTER = 224, MSG_MULTI = 153, MSG_CHOICE = 24
+// Notification counts (total = 807): MSG_ANNCE = 89, MSG_INFO = 316, MSG_CENTER = 225, MSG_MULTI = 153, MSG_CHOICE = 24
int redflag, blueflag, yellowflag, pinkflag, neutralflag; // current status
float redflag_statuschange_elapsedtime = 0, blueflag_statuschange_elapsedtime = 0, yellowflag_statuschange_elapsedtime = 0, pinkflag_statuschange_elapsedtime = 0, neutralflag_statuschange_elapsedtime = 0; // time since the status changed
bool ctf_oneflag; // one-flag CTF mode enabled/disabled
+ bool ctf_stalemate; // currently in stalemate
int stat_items = STAT(CTF_FLAGSTATUS);
float fs, fs2, fs3, size1, size2;
vector e1, e2;
ctf_oneflag = (stat_items & CTF_FLAG_NEUTRAL);
+ ctf_stalemate = (stat_items & CTF_STALEMATE);
+
mod_active = (redflag || blueflag || yellowflag || pinkflag || neutralflag || (stat_items & CTF_SHIELDED));
if (autocvar__hud_configure) {
TC(Pickup, this);
bool b = Item_GiveTo(item, player);
if (b) {
- LOG_TRACEF("entity %i picked up %s\n", player, this.m_name);
+ LOG_DEBUGF("entity %i picked up %s\n", player, this.m_name);
player.inventory.inv_items[this.m_id]++;
Inventory_update(player);
}
LOG_WARNINGF("Missing model: \"%s\"\n", s);
return;
}
- LOG_DEBUGF("precache_model(\"%s\")\n", s);
+ profile(sprintf("precache_model(\"%s\")\n", s));
precache_model(s);
}
ENDCLASS(Model)
if(autocvar_g_nades_pickup)
if(time >= this.spawnshieldtime)
if(!toucher.nade && this.health == this.max_health) // no boosted shot pickups, thank you very much
- if(!toucher.frozen)
+ if(!STAT(FROZEN, toucher))
if(CanThrowNade(toucher)) // prevent some obvious things, like dead players
if(IS_REAL_CLIENT(toucher)) // above checks for IS_PLAYER, don't need to do it here
{
REGISTER_WAYPOINT(FlagBaseBlue, _("Blue base"), '0.8 0.8 0', 1);
REGISTER_WAYPOINT(FlagBaseYellow, _("Yellow base"), '0.8 0.8 0', 1);
REGISTER_WAYPOINT(FlagBasePink, _("Pink base"), '0.8 0.8 0', 1);
+REGISTER_WAYPOINT(FlagReturn, _("Return flag here"), '0 0.8 0.8', 1);
REGISTER_WAYPOINT(DomNeut, _("Control point"), '0 1 1', 1);
REGISTER_WAYPOINT(DomRed, _("Control point"), '0 1 1', 1);
return 2;
}
if (s == WP_Item.netname) return Items_from(this.wp_extra).m_waypointblink;
+ if(s == WP_FlagReturn.netname) return 2;
return 1;
}
MULTITEAM_CENTER(CTF_PICKUP_TEAM_VERBOSE, 4, 1, 2, 0, "s1 s2 s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYour %steam mate (^BG%s%s)^BG got the ^TC^TT^BG flag! Protect them!"), "", FLAG)
MSG_CENTER_NOTIF(CTF_PICKUP_TEAM_NEUTRAL, 1, 1, 0, "s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYour %steam mate^BG got the flag! Protect them!"), "")
MSG_CENTER_NOTIF(CTF_PICKUP_TEAM_VERBOSE_NEUTRAL, 1, 2, 0, "s1 s2 s1", CPID_CTF_LOWPRIO, "0 0", _("^BGYour %steam mate (^BG%s%s)^BG got the flag! Protect them!"), "")
+ MSG_CENTER_NOTIF(CTF_PICKUP_VISIBLE, 1, 0, 0, "", CPID_STALEMATE, "0 0", _("^BGEnemies can now see you on radar!"), "")
MULTITEAM_CENTER(CTF_RETURN, 4, 1, 0, 0, "", CPID_CTF_LOWPRIO, "0 0", _("^BGYou returned the ^TC^TT^BG flag!"), "", FLAG)
MSG_CENTER_NOTIF(CTF_STALEMATE_CARRIER, 1, 0, 0, "", CPID_STALEMATE, "0 0", _("^BGStalemate! Enemies can now see you on radar!"), "")
MSG_CENTER_NOTIF(CTF_STALEMATE_OTHER, 1, 0, 0, "", CPID_STALEMATE, "0 0", _("^BGStalemate! Flag carriers can now be seen by enemies on radar!"), "")
return autocvar_g_physics_clientselect && strhasword(autocvar_g_physics_clientselect_options, thecvar);
}
-float Physics_ClientOption(entity this, string option)
+float Physics_ClientOption(entity this, string option, float defaultval)
{
if(Physics_Valid(this.cvar_cl_physics))
{
if(cvar_type(s) & CVAR_TYPEFLAG_EXISTS)
return cvar(s);
}
- return cvar(strcat("sv_", option));
+ return defaultval;
}
void Physics_UpdateStats(entity this, float maxspd_mod)
{
- STAT(MOVEVARS_AIRACCEL_QW, this) = AdjustAirAccelQW(Physics_ClientOption(this, "airaccel_qw"), maxspd_mod);
- STAT(MOVEVARS_AIRSTRAFEACCEL_QW, this) = (Physics_ClientOption(this, "airstrafeaccel_qw"))
- ? AdjustAirAccelQW(Physics_ClientOption(this, "airstrafeaccel_qw"), maxspd_mod)
+ STAT(MOVEVARS_AIRACCEL_QW, this) = AdjustAirAccelQW(Physics_ClientOption(this, "airaccel_qw", autocvar_sv_airaccel_qw), maxspd_mod);
+ STAT(MOVEVARS_AIRSTRAFEACCEL_QW, this) = (Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw))
+ ? AdjustAirAccelQW(Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw), maxspd_mod)
: 0;
- STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw") * maxspd_mod;
- STAT(MOVEVARS_MAXSPEED, this) = Physics_ClientOption(this, "maxspeed") * maxspd_mod; // also slow walking
+ STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod;
+ STAT(MOVEVARS_MAXSPEED, this) = Physics_ClientOption(this, "maxspeed", autocvar_sv_maxspeed) * maxspd_mod; // also slow walking
// old stats
// fix some new settings
- STAT(MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, this) = Physics_ClientOption(this, "airaccel_qw_stretchfactor");
- STAT(MOVEVARS_MAXAIRSTRAFESPEED, this) = Physics_ClientOption(this, "maxairstrafespeed");
- STAT(MOVEVARS_MAXAIRSPEED, this) = Physics_ClientOption(this, "maxairspeed");
- STAT(MOVEVARS_AIRSTRAFEACCELERATE, this) = Physics_ClientOption(this, "airstrafeaccelerate");
- STAT(MOVEVARS_WARSOWBUNNY_TURNACCEL, this) = Physics_ClientOption(this, "warsowbunny_turnaccel");
- STAT(MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, this) = Physics_ClientOption(this, "airaccel_sideways_friction");
- STAT(MOVEVARS_AIRCONTROL, this) = Physics_ClientOption(this, "aircontrol");
- STAT(MOVEVARS_AIRCONTROL_POWER, this) = Physics_ClientOption(this, "aircontrol_power");
- STAT(MOVEVARS_AIRCONTROL_PENALTY, this) = Physics_ClientOption(this, "aircontrol_penalty");
- STAT(MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL, this) = Physics_ClientOption(this, "warsowbunny_airforwardaccel");
- STAT(MOVEVARS_WARSOWBUNNY_TOPSPEED, this) = Physics_ClientOption(this, "warsowbunny_topspeed");
- STAT(MOVEVARS_WARSOWBUNNY_ACCEL, this) = Physics_ClientOption(this, "warsowbunny_accel");
- STAT(MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO, this) = Physics_ClientOption(this, "warsowbunny_backtosideratio");
- STAT(MOVEVARS_FRICTION, this) = Physics_ClientOption(this, "friction");
- STAT(MOVEVARS_ACCELERATE, this) = Physics_ClientOption(this, "accelerate");
- STAT(MOVEVARS_STOPSPEED, this) = Physics_ClientOption(this, "stopspeed");
- STAT(MOVEVARS_AIRACCELERATE, this) = Physics_ClientOption(this, "airaccelerate");
- STAT(MOVEVARS_AIRSTOPACCELERATE, this) = Physics_ClientOption(this, "airstopaccelerate");
- STAT(MOVEVARS_JUMPVELOCITY, this) = Physics_ClientOption(this, "jumpvelocity");
- STAT(MOVEVARS_TRACK_CANJUMP, this) = Physics_ClientOption(this, "track_canjump");
+ STAT(MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, this) = Physics_ClientOption(this, "airaccel_qw_stretchfactor", autocvar_sv_airaccel_qw_stretchfactor);
+ STAT(MOVEVARS_MAXAIRSTRAFESPEED, this) = Physics_ClientOption(this, "maxairstrafespeed", autocvar_sv_maxairstrafespeed);
+ STAT(MOVEVARS_MAXAIRSPEED, this) = Physics_ClientOption(this, "maxairspeed", autocvar_sv_maxairspeed);
+ STAT(MOVEVARS_AIRSTRAFEACCELERATE, this) = Physics_ClientOption(this, "airstrafeaccelerate", autocvar_sv_airstrafeaccelerate);
+ STAT(MOVEVARS_WARSOWBUNNY_TURNACCEL, this) = Physics_ClientOption(this, "warsowbunny_turnaccel", autocvar_sv_warsowbunny_turnaccel);
+ STAT(MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, this) = Physics_ClientOption(this, "airaccel_sideways_friction", autocvar_sv_airaccel_sideways_friction);
+ STAT(MOVEVARS_AIRCONTROL, this) = Physics_ClientOption(this, "aircontrol", autocvar_sv_aircontrol);
+ STAT(MOVEVARS_AIRCONTROL_POWER, this) = Physics_ClientOption(this, "aircontrol_power", autocvar_sv_aircontrol_power);
+ STAT(MOVEVARS_AIRCONTROL_PENALTY, this) = Physics_ClientOption(this, "aircontrol_penalty", autocvar_sv_aircontrol_penalty);
+ STAT(MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL, this) = Physics_ClientOption(this, "warsowbunny_airforwardaccel", autocvar_sv_warsowbunny_airforwardaccel);
+ STAT(MOVEVARS_WARSOWBUNNY_TOPSPEED, this) = Physics_ClientOption(this, "warsowbunny_topspeed", autocvar_sv_warsowbunny_topspeed);
+ STAT(MOVEVARS_WARSOWBUNNY_ACCEL, this) = Physics_ClientOption(this, "warsowbunny_accel", autocvar_sv_warsowbunny_accel);
+ STAT(MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO, this) = Physics_ClientOption(this, "warsowbunny_backtosideratio", autocvar_sv_warsowbunny_backtosideratio);
+ STAT(MOVEVARS_FRICTION, this) = Physics_ClientOption(this, "friction", autocvar_sv_friction);
+ STAT(MOVEVARS_ACCELERATE, this) = Physics_ClientOption(this, "accelerate", autocvar_sv_accelerate);
+ STAT(MOVEVARS_STOPSPEED, this) = Physics_ClientOption(this, "stopspeed", autocvar_sv_stopspeed);
+ STAT(MOVEVARS_AIRACCELERATE, this) = Physics_ClientOption(this, "airaccelerate", autocvar_sv_airaccelerate);
+ STAT(MOVEVARS_AIRSTOPACCELERATE, this) = Physics_ClientOption(this, "airstopaccelerate", autocvar_sv_airstopaccelerate);
+ STAT(MOVEVARS_JUMPVELOCITY, this) = Physics_ClientOption(this, "jumpvelocity", autocvar_sv_jumpvelocity);
+ STAT(MOVEVARS_TRACK_CANJUMP, this) = Physics_ClientOption(this, "track_canjump", autocvar_sv_track_canjump);
}
#endif
bool do_crouch = PHYS_INPUT_BUTTON_CROUCH(this);
if(this.hook && !wasfreed(this.hook))
do_crouch = false;
+ if(this.waterlevel >= WATERLEVEL_SWIMMING)
+ do_crouch = false;
if(hud != HUD_NORMAL)
do_crouch = false;
if(STAT(FROZEN, this))
}
}
makevectors(this.v_angle);
+ float wishdown = this.movement.z;
+ if(PHYS_INPUT_BUTTON_CROUCH(this))
+ wishdown = -PHYS_MAXSPEED(this);
//wishvel = v_forward * this.movement.x + v_right * this.movement.y + v_up * this.movement.z;
vector wishvel = v_forward * this.movement.x
+ v_right * this.movement.y
- + '0 0 1' * this.movement.z;
+ + '0 0 1' * wishdown;
if(this.viewloc)
wishvel.z = -160; // drift anyway
else if (wishvel == '0 0 0')
wishvel = '0 0 -60'; // drift towards bottom
-
vector wishdir = normalize(wishvel);
float wishspeed = min(vlen(wishvel), PHYS_MAXSPEED(this) * maxspd_mod) * 0.7;
- if (IS_DUCKED(this))
- wishspeed *= 0.5;
-
// if (pmove_waterjumptime <= 0) // TODO: use
{
// water friction
{
if (IS_NEXUIZ_DERIVED(gamemode))
#endif
+ if(this.waterlevel >= WATERLEVEL_SUBMERGED)
+ this.velocity_z = PHYS_MAXSPEED(this);
+ else
this.velocity_z = 200;
#if 0
else
float a_up = PHYS_JETPACK_ACCEL_UP(this);
float a_add = PHYS_JETPACK_ANTIGRAVITY(this) * PHYS_GRAVITY(this);
+ if(PHYS_JETPACK_REVERSE_THRUST(this) && PHYS_INPUT_BUTTON_CROUCH(self)) { a_up = PHYS_JETPACK_REVERSE_THRUST(this); }
+
wishvel_x *= a_side;
wishvel_y *= a_side;
wishvel_z *= a_up;
wishvel_z += a_add;
+ if(PHYS_JETPACK_REVERSE_THRUST(this) && PHYS_INPUT_BUTTON_CROUCH(self)) { wishvel_z *= -1; }
+
float best = 0;
//////////////////////////////////////////////////////////////////////////////////////
// finding the maximum over all vectors of above form
#define PHYS_JETPACK_FUEL(s) STAT(JETPACK_FUEL, s)
#define PHYS_JETPACK_MAXSPEED_SIDE(s) STAT(JETPACK_MAXSPEED_SIDE, s)
#define PHYS_JETPACK_MAXSPEED_UP(s) STAT(JETPACK_MAXSPEED_UP, s)
+#define PHYS_JETPACK_REVERSE_THRUST(s) STAT(JETPACK_REVERSE_THRUST, s)
#define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS(s) STAT(MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS, s)
#define PHYS_JUMPSTEP(s) STAT(MOVEVARS_JUMPSTEP, s)
TC(Sound, this);
string s = Sound_fixpath(this);
if (!s) return;
- LOG_DEBUGF("precache_sound(\"%s\")\n", s);
+ profile(sprintf("precache_sound(\"%s\")\n", s));
precache_sound(s);
}
ENDCLASS(Sound)
PlayerState ps = PS(this);
if (!ps) return; // initial connect
PS(this) = NULL;
+
+ ps.m_switchweapon = WEP_Null;
+ ps.m_weapon = WEP_Null;
+ ps.m_switchingweapon = WEP_Null;
+ ps.ps_push(ps, this);
+
if (ps.m_client != this) return; // don't own state, spectator
FOREACH_CLIENT(PS(it) == ps, { PS(it) = NULL; });
remove(ps);
REGISTER_STAT(JETPACK_FUEL, float, autocvar_g_jetpack_fuel)
REGISTER_STAT(JETPACK_MAXSPEED_SIDE, float, autocvar_g_jetpack_maxspeed_side)
REGISTER_STAT(JETPACK_MAXSPEED_UP, float, autocvar_g_jetpack_maxspeed_up)
+REGISTER_STAT(JETPACK_REVERSE_THRUST, float, autocvar_g_jetpack_reverse_thrust)
REGISTER_STAT(MOVEVARS_HIGHSPEED, float, autocvar_g_movement_highspeed)
Net_LinkEntity(this, false, 0, rainsnow_SendEntity);
}
#elif defined(CSQC)
+float autocvar_cl_rainsnow_maxdrawdist = 2048;
+
void Draw_Rain(entity this)
{
- te_particlerain(this.origin + this.mins, this.origin + this.maxs, this.velocity, floor(this.count * drawframetime + random()), this.glow_color);
+ vector maxdist = '1 1 0' * autocvar_cl_rainsnow_maxdrawdist;
+ maxdist.z = 5;
+ if(boxesoverlap(vec2(view_origin) - maxdist, vec2(view_origin) + maxdist, vec2(this.absmin) - '0 0 5', vec2(this.absmax) + '0 0 5'))
+ //if(autocvar_cl_rainsnow_maxdrawdist <= 0 || vdist(vec2(this.origin) - vec2(this.absmin + this.absmax * 0.5), <=, autocvar_cl_rainsnow_maxdrawdist))
+ te_particlerain(this.origin + this.mins, this.origin + this.maxs, this.velocity, floor(this.count * drawframetime + random()), this.glow_color);
}
void Draw_Snow(entity this)
{
- te_particlesnow(this.origin + this.mins, this.origin + this.maxs, this.velocity, floor(this.count * drawframetime + random()), this.glow_color);
+ vector maxdist = '1 1 0' * autocvar_cl_rainsnow_maxdrawdist;
+ maxdist.z = 5;
+ if(boxesoverlap(vec2(view_origin) - maxdist, vec2(view_origin) + maxdist, vec2(this.absmin) - '0 0 5', vec2(this.absmax) + '0 0 5'))
+ //if(autocvar_cl_rainsnow_maxdrawdist <= 0 || vdist(vec2(this.origin) - vec2(this.absmin + this.absmax * 0.5), <=, autocvar_cl_rainsnow_maxdrawdist))
+ te_particlesnow(this.origin + this.mins, this.origin + this.maxs, this.velocity, floor(this.count * drawframetime + random()), this.glow_color);
}
NET_HANDLE(ENT_CLIENT_RAINSNOW, bool isnew)
void __shutdown() {}
#define shutdownhooks() CALL_ACCUMULATED_FUNCTION(__shutdown)
+#define GETTIME_REALTIME 1
+#ifdef MENUQC
+float(int tmr) _gettime = #67;
+#else
+float(int tmr) _gettime = #519;
+#endif
+
+void profile(string s)
+{
+ static float g_starttime;
+ float rt = _gettime(GETTIME_REALTIME);
+ if (!g_starttime) g_starttime = rt;
+ LOG_TRACEF("[%f] %s", rt - g_starttime, s);
+}
+
#define _STATIC_INIT(where, func) \
- void _static_##func(); \
+ [[accumulate]] void _static_##func() { profile(#func); } \
ACCUMULATE_FUNCTION(where, _static_##func) \
void _static_##func()
t = strcat(t, _("encryption:"), " ", (q ? sprintf(_("AES level %d"), q) : ZCTX(_("ENC^none"))), ", ");
t = strcat(t, sprintf(_("mod: %s"), ((modname == "xonotic") ? ZCTX(_("MOD^Default")) : original_modname)));
if(pure_available)
- t = strcat(t, sprintf(_(" (%s)"), (pure) ? _("official settings") : _("modified settings")));
+ t = strcat(t, sprintf(" (%s)", (pure) ? _("official settings") : _("modified settings")));
t = strcat(t, ", ");
t = strcat(t, ((sflags >= 0 && (sflags & SERVERFLAG_PLAYERSTATS)) ? _("stats enabled") : _("stats disabled")));
setZonedTooltip(me, t, string_null);
bestdenom = denom;
}
}
- me.insertValue(me, i, strzone(sprintf(_("%dx%d (%d:%d)"), w, h, bestnum, bestdenom)), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
+ me.insertValue(me, i, strzone(sprintf("%dx%d (%d:%d)", w, h, bestnum, bestdenom)), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
}
else
- me.insertValue(me, i, strzone(sprintf(_("%dx%d"), w, h)), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
+ me.insertValue(me, i, strzone(sprintf("%dx%d", w, h)), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
}
float autocvar_menu_vid_allowdualscreenresolution;
void XonoticResolutionSlider_configureXonoticResolutionSlider(entity me)
GAMETYPE(MAPINFO_TYPE_ONSLAUGHT) \
GAMETYPE(MAPINFO_TYPE_ASSAULT) \
if (cvar("developer")) GAMETYPE(MAPINFO_TYPE_RACE) \
- GAMETYPE(MAPINFO_TYPE_CTS) \
+ if (cvar("developer")) GAMETYPE(MAPINFO_TYPE_CTS) \
/* GAMETYPE(MAPINFO_TYPE_INVASION) */ \
/**/
int autocvar_g_jetpack_fuel;
float autocvar_g_jetpack_maxspeed_side;
float autocvar_g_jetpack_maxspeed_up;
+float autocvar_g_jetpack_reverse_thrust;
#define autocvar_g_maplist cvar_string("g_maplist")
bool autocvar_g_maplist_check_waypoints;
int autocvar_g_maplist_index;
int autocvar_g_frozen_revive_falldamage_health;
bool autocvar_g_frozen_damage_trigger;
float autocvar_g_frozen_force;
+float autocvar_sv_airaccel_qw;
+float autocvar_sv_airstrafeaccel_qw;
+float autocvar_sv_airspeedlimit_nonqw;
+float autocvar_sv_airaccel_qw_stretchfactor;
+float autocvar_sv_maxairstrafespeed;
+float autocvar_sv_airstrafeaccelerate;
+float autocvar_sv_warsowbunny_turnaccel;
+float autocvar_sv_airaccel_sideways_friction;
+float autocvar_sv_aircontrol;
+float autocvar_sv_aircontrol_power;
+float autocvar_sv_aircontrol_penalty;
+float autocvar_sv_warsowbunny_airforwardaccel;
+float autocvar_sv_warsowbunny_topspeed;
+float autocvar_sv_warsowbunny_accel;
+float autocvar_sv_warsowbunny_backtosideratio;
+float autocvar_sv_friction;
+float autocvar_sv_accelerate;
+float autocvar_sv_stopspeed;
+float autocvar_sv_airaccelerate;
+float autocvar_sv_airstopaccelerate;
+float autocvar_sv_track_canjump;
.entity weaponentity = weaponentities[0]; // TODO: unhardcode
if (this.hook.state) {
do_crouch = false;
+ } else if (this.waterlevel >= WATERLEVEL_SWIMMING) {
+ do_crouch = false;
} else if (this.vehicle) {
do_crouch = false;
} else if (STAT(FROZEN, this)) {
.float player_blocked;
.float weapon_blocked; // weapon use disabled
-.float frozen = _STAT(FROZEN); // for freeze attacks
.float revive_progress = _STAT(REVIVE_PROGRESS);
.float revival_time; // time at which player was last revived
.float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
}
}
+bool ctf_Return_Customize(entity this, entity client)
+{
+ // only to the carrier
+ return boolean(client == this.owner);
+}
+
void ctf_FlagcarrierWaypoints(entity player)
{
WaypointSprite_Spawn(WP_FlagCarrier, 0, 0, player, FLAG_WAYPOINT_OFFSET, NULL, player.team, player, wps_flagcarrier, true, RADARICON_FLAG);
WaypointSprite_UpdateMaxHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id) * 2);
WaypointSprite_UpdateHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(player.health, player.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id));
WaypointSprite_UpdateTeamRadar(player.wps_flagcarrier, RADARICON_FLAGCARRIER, WPCOLOR_FLAGCARRIER(player.team));
+
+ if(player.flagcarried && CTF_SAMETEAM(player, player.flagcarried))
+ {
+ if(!player.wps_enemyflagcarrier)
+ {
+ entity wp = WaypointSprite_Spawn(((ctf_oneflag) ? WP_FlagCarrier : WP_FlagCarrierEnemy), 0, 0, player, FLAG_WAYPOINT_OFFSET, NULL, 0, player, wps_enemyflagcarrier, true, RADARICON_FLAG);
+ wp.colormod = WPCOLOR_ENEMYFC(player.team);
+ setcefc(wp, ctf_Stalemate_Customize);
+
+ if(IS_REAL_CLIENT(player) && !ctf_stalemate)
+ Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PICKUP_VISIBLE);
+ }
+
+ if(!player.wps_flagreturn)
+ {
+ entity owp = WaypointSprite_SpawnFixed(WP_FlagReturn, player.flagcarried.ctf_spawnorigin + FLAG_WAYPOINT_OFFSET, player, wps_flagreturn, RADARICON_FLAG);
+ owp.colormod = '0 0.8 0.8';
+ //WaypointSprite_UpdateTeamRadar(player.wps_flagreturn, RADARICON_FLAG, ((player.team) ? colormapPaletteColor(player.team - 1, false) : '1 1 1'));
+ setcefc(owp, ctf_Return_Customize);
+ }
+ }
}
void ctf_CalculatePassVelocity(entity flag, vector to, vector from, float turnrate)
if(player.wps_enemyflagcarrier)
WaypointSprite_Kill(player.wps_enemyflagcarrier);
+ if(player.wps_flagreturn)
+ WaypointSprite_Kill(player.wps_flagreturn);
+
// captureshield
ctf_CaptureShield_Update(player, 0); // shield player from picking up flag
}
bool ctf_Stalemate_Customize(entity this, entity client)
{
// make spectators see what the player would see
- entity e, wp_owner;
- e = WaypointSprite_getviewentity(client);
- wp_owner = this.owner;
+ entity e = WaypointSprite_getviewentity(client);
+ entity wp_owner = this.owner;
// team waypoints
- if(CTF_SAMETEAM(wp_owner.flagcarried, wp_owner)) { return false; }
+ //if(CTF_SAMETEAM(wp_owner.flagcarried, wp_owner)) { return false; }
if(SAME_TEAM(wp_owner, e)) { return false; }
if(!IS_PLAYER(e)) { return false; }
if((this.pass_target == NULL)
|| (IS_DEAD(this.pass_target))
|| (this.pass_target.flagcarried)
- || (vdist(this.origin - targ_origin, <, autocvar_g_ctf_pass_radius))
+ || (vdist(this.origin - targ_origin, >, autocvar_g_ctf_pass_radius))
|| ((trace_fraction < 1) && (trace_ent != this.pass_target))
|| (time > this.ctf_droptime + autocvar_g_ctf_pass_timelimit))
{
if((flag.owner) && (flag.owner.flagcarried == flag))
{
WaypointSprite_Kill(flag.owner.wps_enemyflagcarrier);
+ WaypointSprite_Kill(flag.owner.wps_flagreturn);
WaypointSprite_Kill(flag.wps_flagcarrier);
flag.owner.flagcarried = NULL;
ctf_RespawnFlag(this);
}
+bool ctf_FlagBase_Customize(entity this, entity client)
+{
+ if(client.flagcarried && CTF_SAMETEAM(client, client.flagcarried))
+ return false;
+ return true;
+}
+
void ctf_DelayedFlagSetup(entity this) // called after a flag is placed on a map by ctf_FlagSetup()
{
// bot waypoints
entity wp = WaypointSprite_SpawnFixed(basename, this.origin + FLAG_WAYPOINT_OFFSET, this, wps_flagbase, RADARICON_FLAG);
wp.colormod = ((this.team) ? Team_ColorRGB(this.team) : '1 1 1');
WaypointSprite_UpdateTeamRadar(this.wps_flagbase, RADARICON_FLAG, ((this.team) ? colormapPaletteColor(this.team - 1, false) : '1 1 1'));
+ setcefc(wp, ctf_FlagBase_Customize);
// captureshield setup
ctf_CaptureShield_Spawn(this);
| CTF_YELLOW_FLAG_CARRYING | CTF_YELLOW_FLAG_TAKEN | CTF_YELLOW_FLAG_LOST
| CTF_PINK_FLAG_CARRYING | CTF_PINK_FLAG_TAKEN | CTF_PINK_FLAG_LOST
| CTF_NEUTRAL_FLAG_CARRYING | CTF_NEUTRAL_FLAG_TAKEN | CTF_NEUTRAL_FLAG_LOST
- | CTF_FLAG_NEUTRAL | CTF_SHIELDED);
+ | CTF_FLAG_NEUTRAL | CTF_SHIELDED | CTF_STALEMATE);
// scan through all the flags and notify the client about them
for(entity flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext)
if(player.ctf_captureshielded)
player.ctf_flagstatus |= CTF_SHIELDED;
+ if(ctf_stalemate)
+ player.ctf_flagstatus |= CTF_STALEMATE;
+
// update the health of the flag carrier waypointsprite
if(player.wps_flagcarrier)
WaypointSprite_UpdateHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(player.health, player.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id));
.entity wps_flagbase;
.entity wps_flagcarrier;
.entity wps_flagdropped;
+.entity wps_flagreturn;
.entity wps_enemyflagcarrier;
.float wps_helpme_time;
bool wpforenemy_announced;
const int RETURN_SPEEDRUN = 4;
const int RETURN_NEEDKILL = 5;
+bool ctf_Stalemate_Customize(entity this, entity client);
+
void ctf_Handle_Throw(entity player, entity receiver, float droptype);
// flag properties
const int CTF_NEUTRAL_FLAG_CARRYING = 768;
const int CTF_FLAG_NEUTRAL = 2048;
const int CTF_SHIELDED = 4096;
+const int CTF_STALEMATE = 8192;
blendfunc blend
}
}
+
+g_ok_hmg_luma
+{
+ deformVertexes autosprite
+ cull none
+ nopicmip
+ {
+ map models/weapons/g_ok_hmg_luma
+ blendfunc blend
+ }
+}
+
+g_ok_rl_luma
+{
+ deformVertexes autosprite
+ cull none
+ nopicmip
+ {
+ map models/weapons/g_ok_rl_luma
+ blendfunc blend
+ }
+}
}
}
+g_ok_hmg_simple // heavy machinegun
+{
+ deformVertexes autosprite
+ cull none
+ nopicmip
+
+ {
+ map models/weapons/g_ok_hmg_simple
+ blendfunc blend
+
+ }
+}
+
+g_ok_rl_simple // rocket propelled chainsaw
+{
+ deformVertexes autosprite
+ cull none
+ nopicmip
+
+ {
+ map models/weapons/g_ok_rl_simple
+ blendfunc blend
+
+ }
+}
+
////////// ARMOR + HEALTH ITEMS //////////
///// ARMOR /////