set g_balance_pause_health_rot_spawn 0
set g_balance_health_regenstable 100
set g_balance_health_rotstable 100
-set g_balance_health_limit 200
+set g_balance_health_limit 999
set g_balance_armor_regen 0
set g_balance_armor_regenlinear 0
set g_balance_armor_rot 0
set g_balance_pause_armor_rot_spawn 0
set g_balance_armor_regenstable 100
set g_balance_armor_rotstable 100
-set g_balance_armor_limit 200
+set g_balance_armor_limit 999
set g_balance_armor_blockpercent 0.7
set g_balance_fuel_regen 0.1 "fuel regeneration (only applies if the player owns IT_FUEL_REGEN)"
set g_balance_fuel_regenlinear 0
set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
set g_balance_shotgun_secondary 1
set g_balance_shotgun_secondary_melee_delay 0.35 // match the anim
-set g_balance_shotgun_secondary_melee_range 60
+set g_balance_shotgun_secondary_melee_range 85
set g_balance_shotgun_secondary_melee_swing 50
set g_balance_shotgun_secondary_melee_time 0.1
-set g_balance_shotgun_secondary_damage 115
+set g_balance_shotgun_secondary_damage 110
set g_balance_shotgun_secondary_force 150
set g_balance_shotgun_secondary_refire 1.1
set g_balance_shotgun_secondary_animtime 1
set g_balance_uzi_first_spread 0.03
set g_balance_uzi_first_refire 0.2
set g_balance_uzi_first_ammo 2
-set g_balance_uzi_sustained_damage 7
+set g_balance_uzi_sustained_damage 9
set g_balance_uzi_sustained_force 7.5
set g_balance_uzi_sustained_spread 0.1
set g_balance_uzi_sustained_refire 0.075
set g_balance_electro_primary_lifetime 0
set g_balance_electro_primary_refire 0.03333333
set g_balance_electro_primary_animtime 0.03333333
-set g_balance_electro_primary_ammo 10
+set g_balance_electro_primary_ammo 5
set g_balance_electro_primary_range 800
set g_balance_electro_secondary_damage 25
set g_balance_electro_secondary_spread 0
// }}}
// {{{ nex
set g_balance_nex_primary_damage 80
-set g_balance_nex_primary_force 200
+set g_balance_nex_primary_force 400
set g_balance_nex_primary_refire 1.25
set g_balance_nex_primary_animtime 0.75
set g_balance_nex_primary_ammo 5
-set g_balance_nex_primary_damagefalloff_mindist 1000
-set g_balance_nex_primary_damagefalloff_maxdist 3000
-set g_balance_nex_primary_damagefalloff_halflife 4000
-set g_balance_nex_primary_damagefalloff_forcehalflife 4000
+set g_balance_nex_primary_damagefalloff_mindist 0
+set g_balance_nex_primary_damagefalloff_maxdist 4000
+set g_balance_nex_primary_damagefalloff_halflife 2000
+set g_balance_nex_primary_damagefalloff_forcehalflife 2000
set g_balance_nex_secondary 1
set g_balance_nex_secondary_damage 80
-set g_balance_nex_secondary_force -200
+set g_balance_nex_secondary_force -500
set g_balance_nex_secondary_refire 1.25
set g_balance_nex_secondary_animtime 0.75
set g_balance_nex_secondary_ammo 5
-set g_balance_nex_secondary_damagefalloff_mindist 1000
-set g_balance_nex_secondary_damagefalloff_maxdist 3000
-set g_balance_nex_secondary_damagefalloff_halflife 4000
-set g_balance_nex_secondary_damagefalloff_forcehalflife 4000
+set g_balance_nex_secondary_damagefalloff_mindist 0
+set g_balance_nex_secondary_damagefalloff_maxdist 4000
+set g_balance_nex_secondary_damagefalloff_halflife 2000
+set g_balance_nex_secondary_damagefalloff_forcehalflife 2000
// }}}
// {{{ minstanex
set g_balance_minstanex_refire 1.25
set g_balance_hlac_secondary_shots 6
// }}}
// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 4 // make it pretty much useless in close combat
+set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0
set g_balance_campingrifle_tracer 1
-set g_balance_campingrifle_primary_damage 60
+set g_balance_campingrifle_primary_damage 50
set g_balance_campingrifle_primary_headshotaddeddamage 50
set g_balance_campingrifle_primary_spread 0
set g_balance_campingrifle_primary_force 2
set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
set g_balance_campingrifle_secondary 1
set g_balance_campingrifle_secondary_damage 25
-set g_balance_campingrifle_secondary_headshotaddeddamage 20 // 45 damage only on head
+set g_balance_campingrifle_secondary_headshotaddeddamage 25 // 50 damage only on head
set g_balance_campingrifle_secondary_spread 0.008
set g_balance_campingrifle_secondary_force 1
set g_balance_campingrifle_secondary_speed 20000
alias movetoteam_yellow "sv_cmd movetoteam $1 yellow"
alias movetoteam_auto "sv_cmd movetoteam $1 auto"
-// merge lightmaps up to 1024x1024 textures
-// the default of 2048x2048 is too heavy for my rig (SavageX)
-mod_q3bsp_lightmapmergepower 3
+// merge lightmaps up to 2048x2048 textures
+mod_q3bsp_lightmapmergepower 4
// player defaults
_cl_color 102
seta cl_particles_oldnexbeam 0 "Uses the old v2.3 Nexgun beam instead of the new beam, only works if server allows it (g_allow_oldnexbeam 1)"
set sv_qcweaponanimation 0
-set g_telefrags 1
-set g_telefrags_avoid 0
+set g_telefrags 1 "telefragging, i.e. killing someone who stands in the way of someone who is teleporting"
+set g_telefrags_teamplay 1 "never telefrag team mates"
+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 g_respawn_ghosts 0 "if 1 dead bodies become ghosts and float away when the player respawns"
+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"
// use default physics
set sv_friction_on_land 0
-exec physicsNoQWBunny-nexbased.cfg
+exec physicsNoQWBunny-xpmbased.cfg
set sv_player_viewoffset "0 0 35" "view offset of the player model"
set sv_player_mins "-16 -16 -24" "playermodel mins"
r_mipskins 1
r_shadow_realtime_world_lightmaps 1
seta r_ambient 4
-cl_decals_fadetime 1
+cl_decals_fadetime 5
cl_decals_time 2
seta cl_gunalign 3 "Gun alignment; 1 = right, 2 = left, 3 = center or right, 4 = center or left"
seta cl_nogibs 0 "reduce number of violence effects, or remove them totally"
seta cl_particlegibs 0 "simpler gibs"
seta cl_gibs_damageforcescale 3.5 "force to push around gibs"
-seta cl_gibs_lifetime 14 "average lifetime of gibs"
+seta cl_gibs_lifetime 5 "average lifetime of gibs"
seta cl_gibs_velocity_scale 1 "gib throw velocity force scale"
seta cl_gibs_velocity_random 1 "gib throw velocity randomness scale"
-seta cl_gibs_velocity_up 0 "extra z velocity for gibs"
+seta cl_gibs_velocity_up 1 "extra z velocity for gibs"
seta cl_gibs_ticrate 0.1 "ticrate for gibs"
seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls"
seta cl_casings 1 "enable or disable bullet casings"
cl_netfps 60 // should match
sv_gameplayfix_delayprojectiles 0
sv_gameplayfix_q2airaccelerate 1
+sv_gameplayfix_stepmultipletimes 1
// delay for "kill" to prevent abuse
set g_balance_kill_delay 5
// "NoQWBunny" physics based on XPM
sv_gravity 800
sv_maxspeed 320
-
-sv_maxairspeed 320
+sv_maxairspeed 400
sv_stopspeed 100
sv_accelerate 15
sv_airaccelerate 2
sv_friction 8
edgefriction 1
-sv_stepheight 34
+sv_stepheight 26
+// Q1: 16+2
+// Nex: 32+2
+// we try: 24+2
-sv_jumpvelocity 250
-sv_wateraccelerate 4
-sv_waterfriction 1
+// actually, what we want is 266.6666 for 180bpm
+// but 260 takes same amount of frames and is nicer to mappers
+sv_jumpvelocity 260
+sv_wateraccelerate -1
+sv_waterfriction -1
sv_airaccel_sideways_friction 0
-sv_airaccel_qw -0.937
+sv_airaccel_qw -0.8
sv_airstopaccelerate 3
-sv_airstrafeaccelerate 20
-sv_maxairstrafespeed 96
-sv_airstrafeaccel_qw -0.979
+sv_airstrafeaccelerate 24
+sv_maxairstrafespeed 100
+sv_airstrafeaccel_qw -0.97
sv_aircontrol 125
sv_aircontrol_penalty 100
-sv_aircontrol_power 2.5
-sv_airspeedlimit_nonqw 0
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 800
sv_warsowbunny_turnaccel 0
sv_warsowbunny_accel 0.1593
sv_warsowbunny_topspeed 925
if (previous_game_starttime != startTime) {
if ((time + 5.0) < startTime) {
//if connecting to server while restart was active don't always play prepareforbattle
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/prepareforbattle.wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/prepareforbattle.wav"), VOL_BASEVOICE, ATTN_NONE);
}
if (time < startTime) {
restartAnnouncer = spawn();
pos = panel_pos;
mySize = panel_size;
- panel_fg_alpha = autocvar_hud_panel_fg_alpha;
- panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
+ if(!autocvar__hud_configure)
+ {
+ panel_fg_alpha = autocvar_hud_panel_fg_alpha;
+ panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
- if(panel_bg_alpha_str == "") {
- panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
- }
- panel_bg_alpha = stof(panel_bg_alpha_str);
- if(autocvar__hud_configure && disable_menu_alphacheck == 2 && highlightedPanel == active_panel) {
- panel_bg_alpha = (1 - autocvar__menu_alpha) * max(autocvar_hud_configure_bg_minalpha, panel_bg_alpha) + autocvar__menu_alpha * panel_bg_alpha;
- } else if(autocvar__hud_configure) {
- panel_bg_alpha = max(autocvar_hud_configure_bg_minalpha, panel_bg_alpha);
- } if(autocvar__hud_configure && !panel_enabled) {
- panel_bg_alpha = 0.25;
+ if(panel_bg_alpha_str == "") {
+ panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
+ }
+ panel_bg_alpha = stof(panel_bg_alpha_str);
}
string s;
if(!vote_alpha)
return;
- a = vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
-
+ a = panel_bg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
HUD_Panel_DrawBg(a);
+ a = panel_fg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
self.iorigin2 = self.origin;
if(self.iflags & IFLAG_AUTOANGLES)
- self.angles = vectoangles(self.iorigin2 - self.iorigin1);
+ if(self.iorigin2 != self.iorigin1)
+ self.angles = vectoangles(self.iorigin2 - self.iorigin1);
if(self.iflags & IFLAG_ANGLES)
{
// check for pending announcement, play it and remove it
if(announce_snd != "")
{
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
strunzone(announce_snd);
announce_snd = "";
}
if (!spectatee_status) //do cprint only for players
centerprint("^1Begin!");
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
//reset maptime announcers now as well
announcer_5min = announcer_1min = FALSE;
centerprint(strcat("^1Game starts in ", ftos(countdown_rounded), " seconds"));
if(countdown_rounded <= 3 && countdown_rounded >= 1) {
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
}
self.nextthink = getstatf(STAT_GAMESTARTTIME) - (countdown - 1);
if not (warmuplimit == -1 && warmup_stage) {
announcer_5min = TRUE;
//dprint("i will play the sound, I promise!\n");
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
}
}
//if we're in warmup mode, check whether there's a warmup timelimit
if not (warmuplimit == -1 && warmup_stage) {
announcer_1min = TRUE;
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
}
}
}
if(self.noise != "")
{
self.origin = p;
- sound(self, CHAN_AUTO, self.noise, VOL_BASE * self.volume, self.atten);
+ sound(self, CHAN_TRIGGER, self.noise, VOL_BASE * self.volume, self.atten);
}
self.just_toggled = 0;
}
else
Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
if(!(self.move_flags & FL_ONGROUND))
- self.angles = vectoangles(self.velocity);
+ if(self.velocity != '0 0 0')
+ self.angles = vectoangles(self.velocity);
}
else
{
self.maxs = '3 3 3';
break;
case PROJECTILE_GRENADE:
- self.mins = '0 0 -3';
- self.maxs = '0 0 -3';
+ self.mins = '-3 -3 -3';
+ self.maxs = '3 3 3';
break;
case PROJECTILE_GRENADE_BOUNCING:
- self.mins = '0 0 -3';
- self.maxs = '0 0 -3';
+ self.mins = '-3 -3 -3';
+ self.maxs = '3 3 3';
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = SUB_Null;
self.move_bounce_factor = g_balance_grenadelauncher_secondary_bouncefactor;
// on world: announcers, ... INFO
// on players: item pickup ITEMS
// on entities: UNUSED
- // on csqc: UNUSED
+ // on csqc: announcers INFO
float CHAN_WEAPON = 1; // Weapon fire
// on world: UNUSED
// on players: weapon firing WEAPONS
// on world: UNUSED
// on players: item pickup ITEMS
// on entities: platforms moving etc. ITEMS
- // on csqc: UNUSED
+ // on csqc: platforms moving etc. ITEMS
float CHAN_PROJECTILE = 4; // Projectiles
// on world: UNUSED
// on players: projectiles hitting player SHOTS
if(me.disabled)
return 0;
inRange = (almost_in_bounds(me.valueMin, me.value, me.valueMax));
- if(key == K_LEFTARROW || key == K_KP_LEFTARROW)
+ if(key == K_LEFTARROW || key == K_KP_LEFTARROW || key == K_MWHEELUP)
{
if(inRange)
me.setValue(me, median(me.valueMin, me.value - me.valueKeyStep, me.valueMax));
me.setValue(me, me.valueMax);
return 1;
}
- if(key == K_RIGHTARROW || key == K_KP_RIGHTARROW)
+ if(key == K_RIGHTARROW || key == K_KP_RIGHTARROW || key == K_MWHEELDOWN)
{
if(inRange)
me.setValue(me, median(me.valueMin, me.value + me.valueKeyStep, me.valueMax));
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_entchannel3volume");
- makeMulti(s, "snd_playerchannel0volume snd_playerchannel3volume");
+ makeMulti(s, "snd_playerchannel0volume snd_playerchannel3volume snd_csqcchannel3volume");
me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Items:"));
me.TD(me, 1, 2, s);
setDependentStringNotEqual(e, "volume", "0");
// call the corpse damage function just in case it wants to gib
self.event_damage(inflictor, attacker, 0, deathtype, hitloc, force);
// set up to fade out later
- SUB_SetFade (self, time + 12 + random () * 4, 1);
+ SUB_SetFade (self, time + 6 + random (), 1);
// remove laserdot
if(self.weaponentity)
// NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
// SG -> SG
-void spawnfunc_ammo_shells() { spawnfunc_item_shells(); }
-
-// MG -> MG
-void spawnfunc_weapon_machinegun() { spawnfunc_weapon_uzi(); }
-void spawnfunc_ammo_bullets() { spawnfunc_item_bullets(); }
-
-// GL -> Mortar
-void spawnfunc_ammo_grenades() { spawnfunc_item_rockets(); }
-
-// LG -> Electro
-void spawnfunc_weapon_lightning() { spawnfunc_weapon_electro(); }
-void spawnfunc_ammo_lightning() { spawnfunc_item_cells(); }
-
-// Plasma -> Hagar
-void spawnfunc_weapon_plasmagun() { spawnfunc_weapon_hagar(); }
-void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); }
-
-// Rail -> Nex
-void spawnfunc_weapon_railgun() { spawnfunc_weapon_nex(); }
-void spawnfunc_ammo_slugs() { spawnfunc_item_cells(); }
-
-// BFG -> Crylink
-void spawnfunc_weapon_bfg() { spawnfunc_weapon_crylink(); }
-void spawnfunc_ammo_bfg() { spawnfunc_item_cells(); }
+void spawnfunc_ammo_shells() { spawnfunc_item_shells(); }
+
+// MG -> MG
+void spawnfunc_weapon_machinegun() { spawnfunc_weapon_uzi(); }
+void spawnfunc_ammo_bullets() { spawnfunc_item_bullets(); }
+
+// GL -> Mortar
+void spawnfunc_ammo_grenades() { spawnfunc_item_rockets(); }
+
+// LG -> Electro
+void spawnfunc_weapon_lightning() { spawnfunc_weapon_electro(); }
+void spawnfunc_ammo_lightning() { spawnfunc_item_cells(); }
+
+// Plasma -> Hagar
+void spawnfunc_weapon_plasmagun() { spawnfunc_weapon_hagar(); }
+void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); }
+
+// Rail -> Rifle
+void spawnfunc_weapon_railgun() { spawnfunc_weapon_campingrifle(); }
+void spawnfunc_ammo_slugs() { spawnfunc_item_bullets(); }
+
+// BFG -> Crylink
+void spawnfunc_weapon_bfg() { spawnfunc_weapon_crylink(); }
+void spawnfunc_ammo_bfg() { spawnfunc_item_cells(); }
// RL -> RL
-void spawnfunc_ammo_rockets() { spawnfunc_item_rockets(); }
-
-// Armor
-void spawnfunc_item_armor_body() { spawnfunc_item_armor_large(); }
-void spawnfunc_item_armor_combat() { spawnfunc_item_armor_big(); }
-void spawnfunc_item_armor_shard() { spawnfunc_item_armor_small(); }
-void spawnfunc_item_enviro() { spawnfunc_item_invincible(); }
+void spawnfunc_ammo_rockets() { spawnfunc_item_rockets(); }
+
+// Armor
+void spawnfunc_item_armor_body() { spawnfunc_item_armor_large(); }
+void spawnfunc_item_armor_combat() { spawnfunc_item_armor_big(); }
+void spawnfunc_item_armor_shard() { spawnfunc_item_armor_small(); }
+void spawnfunc_item_enviro() { spawnfunc_item_invincible(); }
// weapon remove ent from defrag
-void spawnfunc_target_init()
+void spawnfunc_target_init()
{
self.spawnflags = 0; // remove all weapons except the ones listed below
self.netname = "laser uzi"; // keep these weapons through the remove trigger
float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax)
{
- TDEATHLOOP(org)
+ if (player.classname == "player" && player.health >= 1)
{
- if ((player.classname == "player") && (player.health >= 1))
+ TDEATHLOOP(org)
{
- if(head.classname == "player")
- if(head.health >= 1)
- return 1;
+ if not(teamplay && cvar("g_telefrags_teamplay") && head.team == player.team)
+ if(head.classname == "player")
+ if(head.health >= 1)
+ return 1;
}
}
return 0;
{
TDEATHLOOP(player.origin)
{
- if ((player.classname == "player") && (player.health >= 1))
+ if (player.classname == "player" && player.health >= 1)
{
- if(head.classname == "player")
- if(head.health >= 1)
- ++tdeath_hit;
- Damage (head, teleporter, telefragger, 10000, DEATH_TELEFRAG, head.origin, '0 0 0');
+ if not(teamplay && cvar("g_telefrags_teamplay") && head.team == player.team)
+ {
+ if(head.classname == "player")
+ if(head.health >= 1)
+ ++tdeath_hit;
+ Damage (head, teleporter, telefragger, 10000, DEATH_TELEFRAG, head.origin, '0 0 0');
+ }
}
- else if (telefragger.health < 1) // corpses gib
- Damage (head, teleporter, telefragger, 10000, DEATH_TELEFRAG, head.origin, '0 0 0');
else // dead bodies and monsters gib themselves instead of telefragging
Damage (telefragger, teleporter, telefragger, 10000, DEATH_TELEFRAG, telefragger.origin, '0 0 0');
}
#define TELEPORT_FLAG_SOUND 1
#define TELEPORT_FLAG_PARTICLES 2
#define TELEPORT_FLAG_TDEATH 4
+#define TELEPORT_FLAG_FORCE_TDEATH 8
#define TELEPORT_FLAGS_WARPZONE 0
-#define TELEPORT_FLAGS_PORTAL (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES)
+#define TELEPORT_FLAGS_PORTAL (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH | TELEPORT_FLAG_FORCE_TDEATH)
#define TELEPORT_FLAGS_TELEPORTER (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH)
void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angles, vector to_velocity, vector telefragmin, vector telefragmax, float tflags)
{
if(player.classname == "player")
{
if(tflags & TELEPORT_FLAG_TDEATH)
- if(player.takedamage && player.deadflag == DEAD_NO && !g_race && !g_cts && cvar("g_telefrags"))
+ if(player.takedamage && player.deadflag == DEAD_NO && !g_race && !g_cts && (cvar("g_telefrags") || (tflags & TELEPORT_FLAG_FORCE_TDEATH)))
tdeath(player, teleporter, telefragger, telefragmin, telefragmax);
// player no longer is on ground
self.event_damage = SUB_Null;
self.takedamage = DAMAGE_NO;
+
+ if(self.movetype == MOVETYPE_NONE)
+ self.velocity = self.oldvelocity;
+
RadiusDamage (self, self.owner, cvar("g_balance_grenadelauncher_secondary_damage"), cvar("g_balance_grenadelauncher_secondary_edgedamage"), cvar("g_balance_grenadelauncher_secondary_radius"), world, cvar("g_balance_grenadelauncher_secondary_force"), self.projectiledeathtype, other);
remove (self);
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_primary_ammo");
- W_SetupShot_ProjectileSize (self, '0 0 -3', '0 0 -3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_primary_damage"));
+ W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_primary_damage"));
w_shotdir = v_forward; // no TrueAim for grenades please
pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = WEP_GRENADE_LAUNCHER;
setorigin(gren, w_shotorg);
- setsize(gren, '0 0 -3', '0 0 -3');
+ setsize(gren, '-3 -3 -3', '3 3 3');
gren.nextthink = time + cvar("g_balance_grenadelauncher_primary_lifetime");
gren.think = adaptor_think2use_hittype_splash;
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = WEP_GRENADE_LAUNCHER | HITTYPE_SECONDARY;
setorigin(gren, w_shotorg);
- setsize(gren, '0 0 -3', '0 0 -3');
+ setsize(gren, '-3 -3 -3', '3 3 3');
gren.nextthink = time + cvar("g_balance_grenadelauncher_secondary_lifetime");
gren.think = adaptor_think2use_hittype_splash;
{
vector force;
force = angle * cvar("g_balance_shotgun_secondary_force");
- Damage (trace_ent, self.owner, self.owner, cvar("g_balance_shotgun_secondary_damage") * ((f + 1) / 2), WEP_SHOTGUN | HITTYPE_SECONDARY , self.owner.origin + self.owner.view_ofs, force);
- Damage_RecordDamage(self.owner, WEP_SHOTGUN | HITTYPE_SECONDARY, cvar("g_balance_shotgun_secondary_damage") * ((f + 1) / 2));
+ Damage (trace_ent, self.owner, self.owner, cvar("g_balance_shotgun_secondary_damage") * min(1, f + 1), WEP_SHOTGUN | HITTYPE_SECONDARY , self.owner.origin + self.owner.view_ofs, force);
+ Damage_RecordDamage(self.owner, WEP_SHOTGUN | HITTYPE_SECONDARY, cvar("g_balance_shotgun_secondary_damage") * min(1, f + 1));
remove(self);
}
else if(time >= self.cnt + cvar("g_balance_shotgun_secondary_melee_time")) // missed, remove ent
void spawnfunc_weapon_shotgun(); // defined in t_items.qc
+.float shotgun_primarytime;
+
float w_shotgun(float req)
{
if (req == WR_AIM)
else if (req == WR_THINK)
{
if (self.BUTTON_ATCK)
- if (weapon_prepareattack(0, cvar("g_balance_shotgun_primary_refire")))
{
- W_Shotgun_Attack();
- weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_shotgun_primary_animtime"), w_ready);
+ if (time >= self.shotgun_primarytime) // handle refire separately so the secondary can be fired straight after a primary
+ {
+ if(weapon_prepareattack(0, cvar("g_balance_shotgun_primary_animtime")))
+ {
+ W_Shotgun_Attack();
+ self.shotgun_primarytime = time + cvar("g_balance_shotgun_primary_refire");
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_shotgun_primary_animtime"), w_ready);
+ }
+ }
}
if (self.BUTTON_ATCK2 && cvar("g_balance_shotgun_secondary"))
if (weapon_prepareattack(1, cvar("g_balance_shotgun_secondary_refire")))