Merge remote branch 'refs/remotes/origin/mrbougo/sgmelee-body'
authorRudolf Polzer <divverent@alientrap.org>
Tue, 31 Aug 2010 20:12:06 +0000 (22:12 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 31 Aug 2010 20:12:06 +0000 (22:12 +0200)
17 files changed:
balanceXonotic.cfg
defaultXonotic.cfg
physicsNoQWBunny-xpmbased.cfg
qcsrc/client/View.qc
qcsrc/client/hud.qc
qcsrc/client/interpolate.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/particles.qc
qcsrc/client/projectile.qc
qcsrc/common/constants.qh
qcsrc/menu/item/slider.c
qcsrc/menu/xonotic/dialog_settings_audio.c
qcsrc/server/cl_player.qc
qcsrc/server/t_quake3.qc
qcsrc/server/t_teleporters.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_shotgun.qc

index fb5fc41..7c24e27 100644 (file)
@@ -114,7 +114,7 @@ set g_balance_pause_health_rot 1
 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
@@ -123,7 +123,7 @@ set g_balance_pause_armor_rot 1
 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
@@ -244,10 +244,10 @@ set g_balance_shotgun_primary_speed 12000
 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
@@ -259,7 +259,7 @@ set g_balance_uzi_first_force 35
 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
@@ -316,7 +316,7 @@ set g_balance_electro_primary_spread 0
 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
@@ -384,25 +384,25 @@ set g_balance_crylink_secondary_line_fadetime 2
 // }}}
 // {{{ 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
@@ -523,12 +523,12 @@ set g_balance_hlac_secondary_ammo 10
 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
@@ -542,7 +542,7 @@ set g_balance_campingrifle_primary_burstcost 0
 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
index c9b5cd7..ca9fefe 100644 (file)
@@ -79,9 +79,8 @@ alias movetoteam_pink "sv_cmd movetoteam $1 pink"
 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
@@ -322,11 +321,12 @@ set g_allow_oldnexbeam 0 "If enabled, clients are allowed to use old v2.3 Nexgun
 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"
 
@@ -338,7 +338,7 @@ set sv_fragmessage_information_typefrag 1 "Enable typefrag display information,
 
 // 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"
@@ -860,16 +860,16 @@ r_mipsprites 1
 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"
@@ -1471,6 +1471,7 @@ sys_ticrate 0.0166667
 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
index 3e1cc96..dc4f406 100644 (file)
@@ -1,30 +1,34 @@
 // "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
index 30c5763..07b21d9 100644 (file)
@@ -102,7 +102,7 @@ void CheckForGamestartChange() {
        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();
index 563de31..7b56af0 100644 (file)
@@ -3742,19 +3742,15 @@ void HUD_VoteWindow(void)
        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;
@@ -3779,9 +3775,9 @@ void HUD_VoteWindow(void)
        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;
index 5593570..5ee28b0 100644 (file)
@@ -24,7 +24,8 @@ void InterpolateOrigin_Note()
        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)
        {
index cc94efb..ed8f84f 100644 (file)
@@ -8,7 +8,7 @@ void serverAnnouncer()
        // 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 = "";
        }
@@ -22,7 +22,7 @@ void restartAnnouncer_Think() {
                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;
 
@@ -34,7 +34,7 @@ void restartAnnouncer_Think() {
                        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);
@@ -72,7 +72,7 @@ void maptimeAnnouncer() {
                        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);
                        }
        }
 
@@ -87,7 +87,7 @@ void maptimeAnnouncer() {
                        //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);
                        }
        }
 }
index e0bbeb8..d4a95b7 100644 (file)
@@ -58,7 +58,7 @@ void Draw_PointParticles()
                        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;
                }
index 407b86c..9a77337 100644 (file)
@@ -72,7 +72,8 @@ void Projectile_Draw()
                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
        {
@@ -318,12 +319,12 @@ void Ent_Projectile()
                                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;
index 53f37bc..5ebeb54 100644 (file)
@@ -398,7 +398,7 @@ float       CHAN_AUTO                               = 0;
        // 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
@@ -413,7 +413,7 @@ float       CHAN_TRIGGER                    = 3; // Triggers/Items
        // 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
index 1f01cb4..c8bab9b 100644 (file)
@@ -104,7 +104,7 @@ float Slider_keyDown(entity me, float key, float ascii, float shift)
        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));
@@ -112,7 +112,7 @@ float Slider_keyDown(entity me, float key, float ascii, float shift)
                        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));
index 62506a6..ddde45d 100644 (file)
@@ -51,7 +51,7 @@ void XonoticAudioSettingsTab_fill(entity me)
        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");
index 494a80b..db8bc4b 100644 (file)
@@ -660,7 +660,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                // 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)
index 52214c2..cffe88b 100644 (file)
@@ -5,42 +5,42 @@
 // 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
index c929bcf..8a28216 100644 (file)
@@ -29,13 +29,14 @@ void trigger_teleport_use()
 
 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;
@@ -45,15 +46,16 @@ void tdeath(entity player, entity teleporter, entity telefragger, vector telefra
 {
        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');
        }
@@ -68,9 +70,10 @@ void spawn_tdeath(vector v0, entity e, vector v)
 #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)
 {
@@ -112,7 +115,7 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle
        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
index 6848b2a..64a9870 100644 (file)
@@ -32,6 +32,10 @@ void W_Grenade_Explode2 (void)
 
        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);
@@ -123,7 +127,7 @@ void W_Grenade_Attack (void)
 
        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);
@@ -137,7 +141,7 @@ void W_Grenade_Attack (void)
        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;
@@ -177,7 +181,7 @@ void W_Grenade_Attack2 (void)
        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;
index 5ecfcfa..f47077a 100644 (file)
@@ -69,8 +69,8 @@ void shotgun_meleethink (void)
        {
                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
@@ -94,6 +94,8 @@ void W_Shotgun_Attack2 (void)
 
 void spawnfunc_weapon_shotgun(); // defined in t_items.qc
 
+.float shotgun_primarytime;
+
 float w_shotgun(float req)
 {
        if (req == WR_AIM)
@@ -104,10 +106,16 @@ float w_shotgun(float req)
        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")))