Add a sv_doors_always_open cvar which will keep open doors open. Useful for public defrag servers.
See merge request xonotic/xonotic-data.pk3dir!711
- wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
- wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
- make
- - EXPECT=87520b179179232b2bce66d249d4686b
+ - EXPECT=892e447048e051e51f30cff2affc729a
- HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
| tee /dev/stderr
| grep '^:'
done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit)
- exit 1
+# NOTE: The generated docs are incomplete - they don't contain code behind SVQC CSQC MENUQC GAMEQC ifdefs.
+# With them added to PREDEFINED, it would take over half an hour to generate the docs and even then
+# they might not be complete. Doxygen doesn't handle #elif and might not understand some QC definitions.
doxygen: # rename to 'pages' when gitlab.com allows pages to exceed 100MiB
stage: deploy
script:
-Fri Aug 30 07:24:34 CEST 2019
+Thu Sep 12 07:24:50 CEST 2019
# Translators:
# Çağlar Turalı <caglarturali@gmail.com>, 2018
# Demiray Muhterem <mdemiray@msn.com>, 2018
+# ibra kap <ibrakap@gmail.com>, 2019
msgid ""
msgstr ""
"Project-Id-Version: Xonotic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-19 07:23+0200\n"
-"PO-Revision-Date: 2019-05-19 05:23+0000\n"
-"Last-Translator: divVerent <divVerent@xonotic.org>\n"
+"PO-Revision-Date: 2019-09-11 17:17+0000\n"
+"Last-Translator: ibra kap <ibrakap@gmail.com>\n"
"Language-Team: Turkish (http://www.transifex.com/team-xonotic/xonotic/"
"language/tr/)\n"
"Language: tr\n"
#: qcsrc/client/hud/panel/quickmenu.qc:781
#: qcsrc/client/hud/panel/quickmenu.qc:788
msgid "Chat"
-msgstr ""
+msgstr "Sohbet"
#: qcsrc/client/hud/panel/quickmenu.qc:782
msgid "QMCMD^Send public message to"
#: qcsrc/client/hud/panel/quickmenu.qc:847
msgid "QMCMD^Fullscreen"
-msgstr ""
+msgstr "Tam Ekran"
#: qcsrc/client/hud/panel/quickmenu.qc:850
#: qcsrc/client/hud/panel/quickmenu.qc:860
set g_trueaim_minrange 44 "TrueAim minimum range (TrueAim adjusts shots so they hit the crosshair point even though the gun is not at the screen center)"
seta crosshair_hittest 1 "do a crosshair hit evaluation, applying effects from the _blur, _scale, and _showipact cvars"
seta crosshair_hittest_blur 1 "blur the crosshair if the shot is obstructed"
-seta crosshair_hittest_scale 1.25 "enlarge crosshair if aiming at an enemy, shrink crosshair if shot is obstructed or aiming at a teammate"
+seta crosshair_hittest_scale 1.25 "shrink crosshair if shot is obstructed or aiming at a teammate"
seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed"
// change color based on special case
// this means that timelimit can be overidden globally and fraglimit can be overidden for each game mode: DM/TDM, Domination, CTF, and Runematch.
set leadlimit 0
set leadlimit_and_fraglimit 0 "if set, leadlimit is ANDed with fraglimit (otherwise ORed)"
-seta timelimit_override -1 "Time limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta fraglimit_override -1 "Frag limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta leadlimit_override -1 "Lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta capturelimit_override -1 "Capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta captureleadlimit_override -1 "Capture llead imit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_domination_point_limit -1 "Domination point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_domination_point_leadlimit -1 "Domination point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_keyhunt_point_limit -1 "Keyhunt point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_keyhunt_point_leadlimit -1 "Keyhunt point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_race_laps_limit -1 "Race laps limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_nexball_goallimit -1 "Nexball goal limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_nexball_goalleadlimit -1 "Nexball goal lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_invasion_point_limit -1 "Invasion point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set timelimit_override -1 "Time limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set fraglimit_override -1 "Frag limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set leadlimit_override -1 "Lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set capturelimit_override -1 "Capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set captureleadlimit_override -1 "Capture llead imit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_domination_point_limit -1 "Domination point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_domination_point_leadlimit -1 "Domination point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_keyhunt_point_limit -1 "Keyhunt point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_keyhunt_point_leadlimit -1 "Keyhunt point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_race_laps_limit -1 "Race laps limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_nexball_goallimit -1 "Nexball goal limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_nexball_goalleadlimit -1 "Nexball goal lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_invasion_point_limit -1 "Invasion point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
// =================================
// clan arena
// ============
set g_ca 0 "Clan Arena: Played in rounds, once you're dead you're out! The team with survivors wins the round"
-seta g_ca_point_limit -1 "Clan Arena point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_ca_point_leadlimit -1 "Clan Arena point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_ca_point_limit -1 "Clan Arena point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_ca_point_leadlimit -1 "Clan Arena point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
set g_ca_spectate_enemies 0 "Allow spectating enemy player by dead player during clan arena games"
set g_ca_warmup 10 "how long the players will have time to run around the map before the round starts"
set g_ca_damage2score_multiplier 0.01
set g_ca_round_timelimit 180 "round time limit in seconds"
-seta g_ca_teams_override 0
+set g_ca_teams_override 0
set g_ca_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any"
set g_ca_teams 0
set g_ca_weaponarena "most" "starting weapons - takes the same options as g_weaponarena"
set g_ctf_fullbrightflags 0
set g_ctf_dynamiclights 0
-seta g_ctf_ignore_frags 0 "1: regular frags give no points"
+set g_ctf_ignore_frags 0 "1: regular frags give no points"
exec ctfscoring-samual.cfg
set g_tdm_on_dm_maps 0 "when this is set, all DM maps automatically support TDM"
set g_tdm_teams 2 "how many teams are in team deathmatch (set by mapinfo)"
set g_tdm_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any"
-seta g_tdm_teams_override 0 "how many teams are in team deathmatch"
+set g_tdm_teams_override 0 "how many teams are in team deathmatch"
set g_tdm_point_limit -1 "TDM point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
set g_tdm_point_leadlimit -1 "TDM point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
// ============
set g_domination 0 "Domination: capture and hold control points to gain points"
set g_domination_default_teams 2 "default number of teams for maps that aren't domination-specific"
-seta g_domination_teams_override 0 "use a specific number of teams in domination games (minimum 2), disables dom_team entities"
+set g_domination_teams_override 0 "use a specific number of teams in domination games (minimum 2), disables dom_team entities"
set g_domination_disable_frags 0 "players can't get frags normally, only get points from kills"
set g_domination_point_amt 0 "override: how many points to get per ping"
set g_domination_point_fullbright 0 "domination point fullbright"
// ===========
set g_freezetag 0 "Freeze Tag: Freeze the opposing team(s) to win, unfreeze teammates by standing next to them"
set g_freezetag_warmup 5 "Time players get to run around before the round starts"
-seta g_freezetag_point_limit -1 "Freeze Tag point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_freezetag_point_leadlimit -1 "Freeze Tag point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_freezetag_point_limit -1 "Freeze Tag point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+set g_freezetag_point_leadlimit -1 "Freeze Tag point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
set g_freezetag_revive_speed 0.4 "Speed for reviving a frozen teammate"
set g_freezetag_revive_clearspeed 1.6 "Speed at which reviving progress gets lost when out of range"
set g_freezetag_revive_extra_size 100 "Distance in qu that you can stand from a frozen teammate to keep reviving him"
set g_freezetag_revive_nade 1 "Enable reviving from own nade explosion"
set g_freezetag_revive_nade_health 40 "Amount of health player has if they revived from their own nade explosion"
-set g_freezetag_round_timelimit 180 "round time limit in seconds"
+set g_freezetag_round_timelimit 360 "round time limit in seconds"
set g_freezetag_frozen_maxtime 60 "frozen players will be automatically unfrozen after this time in seconds"
-seta g_freezetag_teams_override 0
+set g_freezetag_teams_override 0
set g_freezetag_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any"
set g_freezetag_teams 0
set g_freezetag_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
// keepaway
// ==========
set g_keepaway 0 "game mode which focuses around a ball"
-set g_keepaway_score_bckill 1 "enable scoring points (y/n) for ball carrier kills (value is how many points to award)"
-set g_keepaway_score_killac 1 "amount of points to give when you kill someone while you have the ball"
+set g_keepaway_score_bckill 1 "points for killing the ball barrier (Ball Carrier Kill)"
+set g_keepaway_score_killac 1 "points for kills while holding the ball (Kill As Carrier)"
set g_keepaway_score_timeinterval 1 "amount of time it takes between intervals for timepoints to be added to the score"
set g_keepaway_score_timepoints 0 "points to add to score per timeinterval, 0 for no points"
set g_keepaway_ballcarrier_effects 8 "Add together the numbers you want: EF_ADDITIVE (32) / EF_NODEPTHTEST (8192) / EF_DIMLIGHT (8)"
set g_balance_keyhunt_throwvelocity 400
set g_balance_keyhunt_protecttime 0.8
set g_balance_keyhunt_damageforcescale 1
-seta g_keyhunt_teams_override 0
+set g_keyhunt_teams_override 0
set g_keyhunt_teams 0
set g_keyhunt_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any"
set g_nexball_trail_color 254 "1-256 for different colors (Quake palette, 254 is white)"
set g_nexball_playerclip_collisions 1 "make the ball bounce off clips"
set g_nexball_radar_showallplayers 1 "1: show every player and the ball on the radar 0: only show teammates and the ball on the radar"
-seta g_nexball_safepass_maxdist 5000 "Max distance to allow save fassping (0 to turn off safe passing)"
-seta g_nexball_safepass_turnrate 0.1 "How fast the safe-pass ball can habge direction"
-seta g_nexball_safepass_holdtime 0.75 "How long to remeber last teammate you pointed at"
-seta g_nexball_viewmodel_scale 0.25 "How large the ball for the carrier"
-seta g_nexball_viewmodel_offset "8 8 0" "Where the ball is located on carrier forward right up"
-seta g_nexball_tackling 1 "Allow ball theft?"
+set g_nexball_safepass_maxdist 5000 "Max distance to allow save fassping (0 to turn off safe passing)"
+set g_nexball_safepass_turnrate 0.1 "How fast the safe-pass ball can habge direction"
+set g_nexball_safepass_holdtime 0.75 "How long to remeber last teammate you pointed at"
+set g_nexball_viewmodel_scale 0.25 "How large the ball for the carrier"
+set g_nexball_viewmodel_offset "8 8 0" "Where the ball is located on carrier forward right up"
+set g_nexball_tackling 1 "Allow ball theft?"
// ===========
wcross_color.z += sin(hitindication_crosshair_size) * hitindication_color.z;
}
- if(shottype == SHOTTYPE_HITENEMY)
- wcross_scale *= autocvar_crosshair_hittest; // is not queried if hittest is 0
+ // no effects needed for targeting enemies, this can't possibly span all valid targets!
+ // just show for teammates to give a sign that they're an invalid target
+ //if(shottype == SHOTTYPE_HITENEMY)
+ //wcross_scale *= autocvar_crosshair_hittest; // is not queried if hittest is 0
if(shottype == SHOTTYPE_HITTEAM)
wcross_scale /= autocvar_crosshair_hittest; // is not queried if hittest is 0
CLASS(LastManStanding, Gametype)
INIT(LastManStanding)
{
- this.gametype_init(this, _("Last Man Standing"),"lms","g_lms",false,true,"","timelimit=20 lives=9 leadlimit=0",_("Survive and kill until the enemies have no lives left"));
+ this.gametype_init(this, _("Last Man Standing"),"lms","g_lms",false,true,"","timelimit=20 lives=5 leadlimit=0",_("Survive and kill until the enemies have no lives left"));
}
METHOD(LastManStanding, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
{
CLASS(ClanArena, Gametype)
INIT(ClanArena)
{
- this.gametype_init(this, _("Clan Arena"),"ca","g_ca",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=0",_("Kill all enemy teammates to win the round"));
+ this.gametype_init(this, _("Clan Arena"),"ca","g_ca",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6",_("Kill all enemy teammates to win the round"));
}
METHOD(ClanArena, m_parse_mapinfo, bool(string k, string v))
{
CLASS(FreezeTag, Gametype)
INIT(FreezeTag)
{
- this.gametype_init(this, _("Freeze Tag"),"ft","g_freezetag",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=0",_("Kill enemies to freeze them, stand next to frozen teammates to revive them; freeze all enemies to win"));
+ this.gametype_init(this, _("Freeze Tag"),"ft","g_freezetag",true,true,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6",_("Kill enemies to freeze them, stand next to frozen teammates to revive them; freeze all enemies to win"));
}
METHOD(FreezeTag, m_parse_mapinfo, bool(string k, string v))
{
}
vector planes[MAX_CLIP_PLANES];
-int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnormal, float stepheight) // SV_FlyMove
+int _Movetype_FlyMove(entity this, float dt, bool applygravity, bool applystepnormal, float stepheight) // SV_FlyMove
{
+ move_stepnormal = '0 0 0';
+
if(dt <= 0)
return 0;
// step - return it to caller
blocked |= 2;
// save the trace for player extrafriction
- if(stepnormal)
- stepnormal = trace_plane_normal;
+ if(applystepnormal)
+ move_stepnormal = trace_plane_normal;
}
if(my_trace_fraction >= 0.001)
const int UNSTICK_FIXED = 1;
const int UNSTICK_STUCK = 2;
+// set by _Movetype_FlyMove
+vector move_stepnormal;
+
void _Movetype_WallFriction(entity this, vector stepnormal);
-int _Movetype_FlyMove(entity this, float dt, bool applygravity, vector stepnormal, float stepheight);
+int _Movetype_FlyMove(entity this, float dt, bool applygravity, bool applystepnormal, float stepheight);
void _Movetype_CheckVelocity(entity this);
void _Movetype_CheckWaterTransition(entity ent);
void _Movetype_CheckStuck(entity this);
{
UNSET_ONGROUND(this);
_Movetype_CheckVelocity(this);
- _Movetype_FlyMove(this, dt, true, '0 0 0', 0);
+ _Movetype_FlyMove(this, dt, true, false, 0);
_Movetype_LinkEdict(this, true);
}
}
else
{
_Movetype_CheckVelocity(this);
- _Movetype_FlyMove(this, dt, true, '0 0 0', 0);
+ _Movetype_FlyMove(this, dt, true, false, 0);
_Movetype_LinkEdict(this, true);
// TODO? movetypesteplandevent
#include "walk.qh"
void _Movetype_Physics_Walk(entity this, float dt) // SV_WalkMove
{
- vector stepnormal = '0 0 0';
-
// if frametime is 0 (due to client sending the same timestamp twice), don't move
if (dt <= 0)
return;
this.pm_time -= dt;
}
- int clip = _Movetype_FlyMove(this, dt, applygravity, stepnormal, GAMEPLAYFIX_STEPMULTIPLETIMES(this) ? PHYS_STEPHEIGHT(this) : 0);
+ int clip = _Movetype_FlyMove(this, dt, applygravity, false, GAMEPLAYFIX_STEPMULTIPLETIMES(this) ? PHYS_STEPHEIGHT(this) : 0);
if (GAMEPLAYFIX_DOWNTRACEONGROUND(this) && !(clip & 1))
{
// move forward
this.velocity_z = 0;
- clip = _Movetype_FlyMove(this, dt, applygravity, stepnormal, 0);
+ clip = _Movetype_FlyMove(this, dt, applygravity, true, 0);
this.velocity_z += start_velocity.z;
if (clip & 8)
{
// extra friction based on view angle
if ((clip & 2) && PHYS_WALLFRICTION(this))
- _Movetype_WallFriction(this, stepnormal);
+ _Movetype_WallFriction(this, move_stepnormal);
}
// don't do the down move if stepdown is disabled, moving upward, not in water, or the move started offground or ended onground
else if (!GAMEPLAYFIX_STEPDOWN(this) || this.waterlevel >= 3 || start_velocity.z >= (1.0 / 32.0) || !oldonground || IS_ONGROUND(this))
REGISTER_STAT(BUGRIGS_STEER, float, g_bugrigs_steer)
#ifdef SVQC
-int autocvar_sv_gameplayfix_downtracesupportsongroundflag;
-int autocvar_sv_gameplayfix_easierwaterjump;
-int autocvar_sv_gameplayfix_stepdown;
-int autocvar_sv_gameplayfix_stepmultipletimes;
-int autocvar_sv_gameplayfix_unstickplayers;
-int autocvar_sv_gameplayfix_fixedcheckwatertransition;
+int autocvar_sv_gameplayfix_downtracesupportsongroundflag = 1;
+int autocvar_sv_gameplayfix_easierwaterjump = 1;
+int autocvar_sv_gameplayfix_stepdown = 2;
+int autocvar_sv_gameplayfix_stepmultipletimes = 1;
+int autocvar_sv_gameplayfix_unstickplayers = 1;
+int autocvar_sv_gameplayfix_fixedcheckwatertransition = 1;
#endif
REGISTER_STAT(GAMEPLAYFIX_DOWNTRACEONGROUND, int, autocvar_sv_gameplayfix_downtracesupportsongroundflag)
REGISTER_STAT(GAMEPLAYFIX_EASIERWATERJUMP, int, autocvar_sv_gameplayfix_easierwaterjump)
REGISTER_STAT(MOVEVARS_AIRCONTROL_POWER, float)
REGISTER_STAT(MOVEVARS_AIRCONTROL_BACKWARDS, bool)
REGISTER_STAT(MOVEVARS_AIRCONTROL_SIDEWARDS, bool)
-noref bool autocvar_sv_gameplayfix_nogravityonground;
+noref bool autocvar_sv_gameplayfix_nogravityonground = true;
REGISTER_STAT(MOVEFLAGS, int, MOVEFLAG_VALID
| (autocvar_sv_gameplayfix_q2airaccelerate ? MOVEFLAG_Q2AIRACCELERATE : 0)
| (autocvar_sv_gameplayfix_nogravityonground ? MOVEFLAG_NOGRAVITYONGROUND : 0)
W_Crylink_Dequeue_Raw(e.crylink_owner, e.queueprev, e, e.queuenext);
}
+void W_Crylink_DeleteLink(entity this)
+{
+ if(this.classname != "spike_oktoremove")
+ W_Crylink_Dequeue(this);
+ delete_fn(this);
+}
+
void W_Crylink_Reset(entity this)
{
- W_Crylink_Dequeue(this);
delete(this);
}
else if(finalhit)
{
// just unlink
- W_Crylink_Dequeue(this);
delete(this);
return;
}
void W_Crylink_Fadethink(entity this)
{
- W_Crylink_Dequeue(this);
delete(this);
}
for(counter = 0; counter < shots; ++counter)
{
proj = new(spike);
+ proj.dtor = W_Crylink_DeleteLink;
proj.reset = W_Crylink_Reset;
proj.realowner = proj.owner = actor;
proj.crylink_owner = actor;
for(counter = 0; counter < shots; ++counter)
{
proj = new(spike);
+ proj.dtor = W_Crylink_DeleteLink;
proj.weaponentity_fld = weaponentity;
proj.reset = W_Crylink_Reset;
proj.realowner = proj.owner = actor;
}
METHOD(MachineGun, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
{
- if(WEP_CVAR(machinegun, reload_ammo) && actor.(weaponentity).clip_load < min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo))) { // forced reload
+ // forced reload - wait until the bulletcounter is 0 so a burst loop can finish
+ if(WEP_CVAR(machinegun, reload_ammo)
+ && actor.(weaponentity).clip_load < min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo))
+ && actor.(weaponentity).misc_bulletcounter >= 0)
+ {
thiswep.wr_reload(thiswep, actor, weaponentity);
- } else
- if(WEP_CVAR(machinegun, mode) == 1)
+ }
+ else if(WEP_CVAR(machinegun, mode) == 1)
{
if(fire & 1)
if(weapon_prepareattack(thiswep, actor, weaponentity, false, 0))
W_MachineGun_Attack_Auto(thiswep, actor, weaponentity, fire);
}
+ // You can "shoot" more rounds than what's "used", and vice versa.
if(fire & 2)
if(weapon_prepareattack(thiswep, actor, weaponentity, true, 0))
{
return;
}
- W_DecreaseAmmo(thiswep, actor, WEP_CVAR(machinegun, burst_ammo), weaponentity);
+ float ammo_available;
+ if (WEP_CVAR(machinegun, reload_ammo) > 0)
+ {
+ ammo_available = actor.(weaponentity).clip_load;
+ }
+ else
+ {
+ ammo_available = GetResource(actor, thiswep.ammo_type);
+ }
+
+ // We don't want to shoot 3 rounds if there's 2 left in the mag, so we'll use a fraction.
+ // Also keep the fraction <= 1 otherwise we'd mag dump in one burst.
+ float burst_fraction = min(1, ammo_available / WEP_CVAR(machinegun, burst_ammo));
+ int to_shoot = floor(WEP_CVAR(machinegun, burst) * burst_fraction);
- actor.(weaponentity).misc_bulletcounter = WEP_CVAR(machinegun, burst) * -1;
+ // We also don't want to use 3 rounds if there's only 2 left.
+ int to_use = min(WEP_CVAR(machinegun, burst_ammo), ammo_available);
+ W_DecreaseAmmo(thiswep, actor, to_use, weaponentity);
+
+ // Bursting counts up to 0 from a negative.
+ actor.(weaponentity).misc_bulletcounter = -to_shoot;
W_MachineGun_Attack_Burst(thiswep, actor, weaponentity, fire);
}
}
METHOD(MachineGun, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
{
float ammo_amount;
+ float burst_ammo_per_shot = WEP_CVAR(machinegun, burst_ammo) / WEP_CVAR(machinegun, burst);
if(WEP_CVAR(machinegun, mode) == 1)
- ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR(machinegun, burst_ammo);
+ ammo_amount = GetResource(actor, thiswep.ammo_type) >= burst_ammo_per_shot;
else
ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR(machinegun, first_ammo);
if(WEP_CVAR(machinegun, reload_ammo))
{
if(WEP_CVAR(machinegun, mode) == 1)
- ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR(machinegun, burst_ammo);
+ ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= burst_ammo_per_shot;
else
ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR(machinegun, first_ammo);
}
}
METHOD(MachineGun, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
{
+ if(actor.(weaponentity).misc_bulletcounter < 0)
+ return;
W_Reload(actor, weaponentity, min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo)), SND_RELOAD);
}
METHOD(MachineGun, wr_suicidemessage, Notification(entity thiswep))
-#if 0
+/*
"Perl code to convert this to a skinvalues.txt file.";
print "title Generic\n";
print "author Morphed\n";
}
}
__DATA__
-#endif
+*/
SKINBEGIN
// font sizes (used for everything)
SKINFLOAT(FONTSIZE_NORMAL, 12);
float pmin = 2, pmax = 16, pstep = 1;
cvar_set("timelimit_override", "10");
- cvar_set("g_lms_lives_override", "9");
if(random() < 0.4) // 40% are DM
{
bool autocvar_sv_eventlog_files_timestamps;
float autocvar_sv_friction_on_land;
var float autocvar_sv_friction_slick = 0.5;
-float autocvar_sv_gameplayfix_q2airaccelerate;
+float autocvar_sv_gameplayfix_q2airaccelerate = 1;
int autocvar_sv_gentle;
#define autocvar_sv_gravity cvar("sv_gravity")
string autocvar_sv_intermission_cdtrack;
int autocvar_timelimit_overtimes;
float autocvar_timelimit_suddendeath;
#define autocvar_utf8_enable cvar("utf8_enable")
-float autocvar_sv_gameplayfix_gravityunaffectedbyticrate;
-bool autocvar_sv_gameplayfix_upwardvelocityclearsongroundflag;
+bool autocvar_sv_gameplayfix_gravityunaffectedbyticrate = true;
+bool autocvar_sv_gameplayfix_upwardvelocityclearsongroundflag = true;
float autocvar_g_trueaim_minrange;
float autocvar_g_grab_range;
int autocvar_g_max_info_autoscreenshot;
return "Map switch will happen after scoreboard.";
}
-bool autocvar_sv_gameplayfix_multiplethinksperframe;
+bool autocvar_sv_gameplayfix_multiplethinksperframe = true;
void RunThink(entity this)
{
// don't let things stay in the past.
}
bool autocvar_sv_freezenonclients;
-bool autocvar_sv_gameplayfix_delayprojectiles;
+bool autocvar_sv_gameplayfix_delayprojectiles = false;
void Physics_Frame()
{
if(autocvar_sv_freezenonclients)
return false; // no checks here
else if(this.classname == "grapplinghook")
RemoveHook(this);
- else if(this.classname == "spike")
- {
- W_Crylink_Dequeue(this);
- delete(this);
- }
else
delete(this);
return true;
}
}
}
-
if (this)
{
if (this.wframe == WFRAME_RELOAD) return;
g_spawn_near_teammate_ignore_spawnpoint 1
g_spawnshieldtime 0.5
g_respawn_delay_forced 2
-
-g_buffs_resistance_blockpercent 0.5