seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy"
set cl_hitsound_antispam_time 0.05 "don't play the hitsound more often than this"
+ seta cl_eventchase_death 0 "camera goes into 3rd person mode when the player is dead"
+ seta cl_eventchase_intermission 0 "camera goes into 3rd person mode when the match ends"
+ seta cl_eventchase_distance 140 "final camera distance"
+ seta cl_eventchase_speed 1.3 "how fast the camera slides back, 0 is instant"
+
//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
set teamplay_lockonrestart 0 "it set to 1 in a team-based game, the teams are locked once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen"
set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
+set sv_damageeffect_tick 0.05 "how often the damage effect is updated (particles per second), low values might cause lag"
+set sv_damageeffect_lifetime 0.04 "how much a damage effect lasts, multiplied by damage amount"
+set sv_damageeffect_lifetime_max 5 "maximum amount of lifetime a damage effect may have at a time"
+set cl_damageeffect 1 "enable weapon damage effects on players, values between 0 and 1 specify probability of the effect showing on players each tick (used to reduce the effect)"
+set cl_damageeffect_gibs 0.15 "probability of the effect showing on gibs each tick (used to reduce the effect)"
+
set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"
cl_curl_enabled 1
cl_curl_maxspeed 300
sv_curl_defaulturl "http://www.xonotic.com/contentdownload/getmap.php?file="
- set sv_curl_serverpackages_auto 0 "automatically add packs with *.serverpackage files to sv_curl_serverpackages"
+ set sv_curl_serverpackages_auto 1 "automatically add packs with *.serverpackage files to sv_curl_serverpackages"
set sv_motd ""
gl_texturecompression_q3bsplightmaps 0
gl_texturecompression_sky 1
- set menu_mouse_absolute 0 "TODO make this seta if the engine understands this right"
+ seta menu_mouse_absolute 1 "use the OS mouse pointer motion for menu"
seta menu_mouse_speed 1 "speed multiplier for the mouse in the menu (does not affect in-game aiming)"
set menu_use_default_hostname 1
alias sethostname "set menu_use_default_hostname 0; hostname $*"
// enable menu syncing
alias menu_sync "menu_cmd sync"
alias scoreboard_columns_set "cl_cmd scoreboard_columns_set $*"
-
- // BALANCE TESTING (TEMPORARY, PLEASE REMOVE LATER)
- alias balanceSamual "exec balanceSamual.cfg; restart"
- alias balanceFruitieX "exec balanceXonotic.cfg; restart"
- bind f7 balanceSamual
- bind f8 balanceFruitieX
check_unacceptable_compiler_bugs();
#ifdef WATERMARK
- print(sprintf(_("^4CSQC Build information: %s\n"), WATERMARK()));
+ print(sprintf(_("^4CSQC Build information: ^1%s\n"), WATERMARK()));
#endif
float i;
registercmd("hud_save");
//registercmd("menu_action");
- registercmd("+button3");
- registercmd("-button3");
- registercmd("+button4");
- registercmd("-button4");
registercmd("+showscores");registercmd("-showscores");
registercmd("+showaccuracy");registercmd("-showaccuracy");
if(camera_active)
cvar_set("chase_active",ftos(chase_active_backup));
+ // unset the event chasecam's chase_active
+ if(autocvar_chase_active < 0)
+ cvar_set("chase_active", "0");
+
if not(isdemo())
{
if not(calledhooks & HOOK_START)
else
HUD_Panel_ExportCfg(argv(1));
return true;
- } else if(strCmd == "+button4") { // zoom
- // return false, because the message shall be sent to the server anyway (for demos/speccing)
- if(ignore_plus_zoom)
- {
- --ignore_plus_zoom;
- return false;
- }
- button_zoom = 1;
- return true;
- } else if(strCmd == "-button4") { // zoom
- if(ignore_minus_zoom)
- {
- --ignore_minus_zoom;
- return false;
- }
- button_zoom = 0;
- return true;
- } else if(strCmd == "+button3") { // secondary
- button_attack2 = 1;
- return false;
- } else if(strCmd == "-button3") { // secondary
- button_attack2 = 0;
- return false;
} else if(strCmd == "+showscores") {
scoreboard_showscores = true;
return true;
case ENT_CLIENT_TUBANOTE: Ent_TubaNote(bIsNewEntity); break;
case ENT_CLIENT_WARPZONE: WarpZone_Read(bIsNewEntity); break;
case ENT_CLIENT_WARPZONE_CAMERA: WarpZone_Camera_Read(bIsNewEntity); break;
+ case ENT_CLIENT_WARPZONE_TELEPORTED: WarpZone_Teleported_Read(bIsNewEntity); break;
case ENT_CLIENT_TRIGGER_MUSIC: Ent_ReadTriggerMusic(); break;
case ENT_CLIENT_HOOK: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_HOOK); break;
case ENT_CLIENT_LGBEAM: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_LGBEAM); break;
case ENT_CLIENT_GAUNTLET: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_GAUNTLET); break;
case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
+ case ENT_CLIENT_DAMAGEEFFECT: Ent_DamageEffect(); break;
default:
error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
break;
float autocvar_crosshair_color_by_health;
float autocvar_cl_hitsound;
float autocvar_cl_hitsound_antispam_time;
+ var float autocvar_cl_eventchase_death = 1;
+ var float autocvar_cl_eventchase_intermission = 1;
+ var float autocvar_cl_eventchase_distance = 140;
+ var float autocvar_cl_eventchase_speed = 1.3;
+float autocvar_cl_damageeffect;
+float autocvar_cl_damageeffect_gibs;
const float ENT_CLIENT_LGBEAM = 28;
const float ENT_CLIENT_GAUNTLET = 29;
const float ENT_CLIENT_ACCURACY = 30;
- const float ENT_CLIENT_DAMAGEEFFECT = 31;
+ const float ENT_CLIENT_WARPZONE_TELEPORTED = 31;
++const float ENT_CLIENT_DAMAGEEFFECT = 32;
const float ENT_CLIENT_TURRET = 40;
float autocvar_g_balance_shotgun_secondary_melee_range;
float autocvar_g_balance_shotgun_secondary_melee_swing;
float autocvar_g_balance_shotgun_secondary_melee_time;
+ float autocvar_g_balance_shotgun_secondary_melee_no_doubleslap;
float autocvar_g_balance_shotgun_secondary_refire;
float autocvar_g_balance_shotgun_reload_ammo;
float autocvar_g_balance_shotgun_reload_time;
float autocvar_sv_warsowbunny_turnaccel;
string autocvar_sv_weaponstats_file;
float autocvar_sv_gibhealth;
+float autocvar_sv_damageeffect_tick;
+float autocvar_sv_damageeffect_lifetime;
+float autocvar_sv_damageeffect_lifetime_max;
float autocvar_sys_ticrate;
float autocvar_teamplay_lockonrestart;
float autocvar_teamplay_mode;
if(anypoint)
teamcheck = -1;
else if(have_team_spawns > 0)
- teamcheck = self.team; // MUST be team
- else if(have_team_spawns == 0 && have_noteam_spawns)
+ {
+ if(have_team_spawns_forteam[self.team] == 0)
+ {
+ // we request a spawn for a team, and we have team
+ // spawns, but that team has no spawns?
+ if(have_team_spawns[0])
+ // try noteam spawns
+ teamcheck = 0;
+ else
+ // if not, any spawn has to do
+ teamcheck = -1;
+ }
+ else
+ teamcheck = self.team; // MUST be team
+ }
+ else if(have_team_spawns == 0 && have_team_spawns[0])
teamcheck = 0; // MUST be noteam
else
teamcheck = -1;
// if we get here, we either require team spawns but have none, or we require non-team spawns and have none; use any spawn then
+
// get the list of players
playerlist = findchain(classname, "player");
// get the entire list of spots
RemoveGrapplingHook(self); // Wazat's Grappling Hook
+ Violence_DamageEffect_Remove(self);
+
self.classname = "player";
self.wasplayer = TRUE;
self.iscreature = TRUE;
DecodeLevelParms();
#ifdef WATERMARK
- sprint(self, strcat("^4SVQC Build information: ", WATERMARK(), "\n"));
+ sprint(self, strcat("^4SVQC Build information: ^1", WATERMARK(), "\n"));
#endif
self.classname = "player_joining";
pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1);
if(autocvar_g_respawn_ghosts_maxtime)
SUB_SetFade (self, time + autocvar_g_respawn_ghosts_maxtime / 2 + random () * (autocvar_g_respawn_ghosts_maxtime - autocvar_g_respawn_ghosts_maxtime / 2), 1.5);
+ Violence_DamageEffect_Remove(self);
}
CopyBody(1);
.float items_added;
void PlayerPreThink (void)
{
+ WarpZone_PlayerPhysics_FixVAngle();
+
self.stat_game_starttime = game_starttime;
self.stat_allow_oldnexbeam = autocvar_g_allow_oldnexbeam;
self.stat_leadlimit = autocvar_leadlimit;
}
if(!zoomstate_set)
- SetZoomState(self.BUTTON_ZOOM || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_SNIPERRIFLE && autocvar_g_balance_sniperrifle_secondary == 0));
+ SetZoomState(self.BUTTON_ZOOM || self.BUTTON_ZOOMSCRIPT || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_SNIPERRIFLE && autocvar_g_balance_sniperrifle_secondary == 0));
float oldspectatee_status;
oldspectatee_status = self.spectatee_status;
Drag_MoveDrag(oldself, self);
+ Violence_DamageEffect_Copy(oldself, self);
+
+ self.owner = oldself;
self = oldself;
}
self.anim_forwardleft = '20 1 1';
self.anim_backright = '21 1 1';
self.anim_backleft = '22 1 1';
+ self.anim_melee = '23 1 1';
animparseerror = FALSE;
animfilename = strcat(self.model, ".animinfo");
animfile = fopen(animfilename, FILE_READ);
self.anim_forwardleft = animparseline(animfile);
self.anim_backright = animparseline(animfile);
self.anim_backleft = animparseline(animfile);
+ self.anim_melee = animparseline(animfile);
fclose(animfile);
// derived anims
Violence_GibSplash(self, 1, 1, attacker);
self.modelindex = 0; // restore later
self.solid = SOLID_NOT; // restore later
+ self.takedamage = DAMAGE_NO; // restore later
}
}
float require_spawnfunc_prefix; // if this float exists, only functions with spawnfunc_ name prefix qualify as spawn functions
- #define BUTTON_ATCK button0
- #define BUTTON_JUMP button2
- #define BUTTON_ATCK2 button3
- #define BUTTON_ZOOM button4
- #define BUTTON_CROUCH button5
- #define BUTTON_HOOK button6
- #define BUTTON_INFO button7
- #define BUTTON_CHAT buttonchat
- #define BUTTON_USE buttonuse
- #define BUTTON_DRAG button8
+ #define BUTTON_ATCK button0
+ #define BUTTON_JUMP button2
+ #define BUTTON_ATCK2 button3
+ #define BUTTON_ZOOM button4
+ #define BUTTON_CROUCH button5
+ #define BUTTON_HOOK button6
+ #define BUTTON_INFO button7
+ #define BUTTON_CHAT buttonchat
+ #define BUTTON_USE buttonuse
+ #define BUTTON_DRAG button8
+ #define BUTTON_ZOOMSCRIPT button9
// Globals
.vector anim_forwardleft; // player running forward and left
.vector anim_backright; // player running backward and right
.vector anim_backleft; // player running back and left
+ .vector anim_melee; // player doing the melee action
// weapon animation vectors:
.vector anim_fire1;
float some_spawn_has_been_used;
float have_team_spawns; // 0 = no team spawns requested, -1 = team spawns requested but none found, 1 = team spawns requested and found
- float have_noteam_spawns; // 0 = no no-team spawns, 1 = no-team spawns exist
+ float have_team_spawns_forteam[17]; // 0 = this team has no spawns, 1 = this team has spawns; team 0 is the "no-team"
// set when showing a kill countdown
.entity killindicator;
.float cvar_cl_voice_directional;
.float cvar_cl_voice_directional_taunt_attenuation;
+.float cvar_cl_damageeffect;
+
.float version_mismatch;
float independent_players;
if (have_team_spawns != 0)
if (self.team)
have_team_spawns = 1;
- if (!self.team)
- have_noteam_spawns = 1;
+ have_team_spawns_forteam[self.team] = 1;
if (autocvar_r_showbboxes)
{
GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[9], "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
GetCvars_handleFloat(s, f, cvar_cl_weaponimpulsemode, "cl_weaponimpulsemode");
GetCvars_handleFloat(s, f, cvar_cl_autotaunt, "cl_autotaunt");
+ GetCvars_handleFloat(s, f, cvar_cl_damageeffect, "cl_damageeffect");
GetCvars_handleFloat(s, f, cvar_cl_noantilag, "cl_noantilag");
GetCvars_handleFloat(s, f, cvar_cl_voice_directional, "cl_voice_directional");
GetCvars_handleFloat(s, f, cvar_cl_voice_directional_taunt_attenuation, "cl_voice_directional_taunt_attenuation");