]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'refs/remotes/origin/fruitiex/newpanelhud_stable'
authorRudolf Polzer <divverent@alientrap.org>
Tue, 31 Aug 2010 07:29:40 +0000 (09:29 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 31 Aug 2010 07:29:40 +0000 (09:29 +0200)
32 files changed:
Makefile
balanceXonotic.cfg
defaultXonotic.cfg
physicsNoQWBunny-xpmbased.cfg
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/csqc_builtins.qc
qcsrc/client/effects.qc
qcsrc/client/hook.qc
qcsrc/client/interpolate.qc
qcsrc/client/laser.qc
qcsrc/client/projectile.qc
qcsrc/client/scoreboard.qc
qcsrc/client/waypointsprites.qc
qcsrc/menu/draw.qc
qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c
qcsrc/menu/xonotic/dialog_settings_audio.c
qcsrc/menu/xonotic/dialog_settings_misc.c
qcsrc/server/anticheat.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_physics.qc
qcsrc/server/defs.qh
qcsrc/server/domination.qc
qcsrc/server/func_breakable.qc
qcsrc/server/t_quake3.qc
qcsrc/server/t_teleporters.qc
qcsrc/server/w_common.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_shotgun.qc
qcsrc/warpzonelib/common.qc

index 99478f084e03015f18caec84e0b8910328e652d5..83abf218dafe39bf73f32d681386e63b99c0d2a9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,6 @@
 SCM := $(shell if [ -d .svn ]; then echo svn; elif [ -d ../.git ]; then echo git; fi)
 FTEQCC ?= fteqcc
 PERL ?= perl
-PK3NAME ?= `date +../data%Y%m%d.pk3`
 ZIP ?= 7za a -tzip -mx=9
 ZIPEXCLUDE ?= -x\!*.pk3 -xr\!\.svn -x\!qcsrc
 DIFF ?= diff
@@ -35,23 +34,6 @@ qc-recursive: menu.dat progs.dat csprogs.dat
 .PHONY: skin
 skin: gfx/menu/default/skinvalues.txt
 
-.PHONY: pk3
-pk3: $(PK3NAME)
-
-.PHONY: pk3here
-pk3here: qc
-       $(RM) $(PK3NAME); \
-       set -ex; \
-               ABSPK3NAME=$(PK3NAME); \
-               case $$ABSPK3NAME in \
-                       /*) \
-                               ;; \
-                       *) \
-                               ABSPK3NAME=$$PWD/$$ABSPK3NAME; \
-                               ;; \
-               esac; \
-               $(ZIP) $(ZIPEXCLUDE) $$ABSPK3NAME .
-
 .PHONY: clean
 clean:
        rm -f progs.dat menu.dat csprogs.dat
@@ -71,86 +53,6 @@ menu.dat: qcsrc/menu/*.* qcsrc/menu/*/*.* qcsrc/common/*.*
 gfx/menu/default/skinvalues.txt: qcsrc/menu/skin-customizables.inc
        $(PERL) qcsrc/menu/skin-customizables.inc > gfx/menu/default/skinvalues.txt
 
-$(PK3NAME): qc
-       $(RM) $(PK3NAME)
-       set -ex; \
-               ABSPK3NAME=$(PK3NAME); \
-               case $$ABSPK3NAME in \
-                       /*) \
-                               ;; \
-                       *) \
-                               ABSPK3NAME=$$PWD/$$ABSPK3NAME; \
-                               ;; \
-               esac; \
-               TDIR=`mktemp -d -t xonoticpk3.XXXXXX`; \
-               cp -v progs.dat csprogs.dat menu.dat $$TDIR/; \
-               svn export --force . $$TDIR; \
-               cd $$TDIR; \
-               $(ZIP) $$ABSPK3NAME .
-
 .PHONY: testcase
 testcase:
        cd qcsrc/testcase && $(FTEQCC) $(FTEQCCFLAGS) $(FTEQCCFLAGS_CSPROGS) -DTESTCASE="$$TESTCASE"
-
-.PHONY: update commit diff log logv logupdate logvupdate revert
-update: $(SCM)-update
-commit: $(SCM)-commit
-diff: $(SCM)-diff
-log: $(SCM)-log
-logv: $(SCM)-logv
-revert: $(SCM)-revert
-logupdate: log update
-logvupdate: logv update
-
-.PHONY: svn-update
-svn-update:
-       cd .. && svn update
-
-.PHONY: svn-commit
-svn-commit:
-       cd .. && svn commit
-
-.PHONY: svn-diff
-svn-diff:
-       cd .. && svn diff
-
-.PHONY: svn-log
-svn-log:
-       cd .. && svn log -r HEAD:BASE
-
-.PHONY: svn-logv
-svn-logv:
-       cd .. && svn log -r HEAD:BASE -v
-
-.PHONY: svn-revert
-svn-revert:
-       svn revert -- $(FILE)
-
-.PHONY: git-update
-git-update:
-       git pull origin
-
-.PHONY: git-commit
-git-commit:
-       git commit -a || true
-       if echo -n 'Also send to server? Hit Enter for yes, ^C for no. '; read -r L; then \
-               git config svn-remote.svn.url svn://svn.icculus.org/xonotic; \
-               git config svn-remote.svn.fetch trunk:refs/remotes/origin/master; \
-               git svn dcommit; \
-       fi
-
-.PHONY: git-diff
-git-diff:
-       git diff; git diff origin/master..HEAD; true
-
-.PHONY: git-log
-git-log:
-       git fetch && git log HEAD..origin/master
-
-.PHONY: git-logv
-git-logv:
-       git fetch && git log -v HEAD..origin/master
-
-.PHONY: git-revert
-git-revert:
-       git checkout -- $(FILE)
index 39b9b26ccc3d4451db82a29a5fc0020b0f707f3f..7c24e276eb2986bdbb4c44c0c0416b7592a4e129 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
@@ -343,10 +343,10 @@ set g_balance_electro_combo_comboradius 0
 set g_balance_electro_combo_speed 400
 // }}}
 // {{{ crylink
-set g_balance_crylink_primary_damage 10
-set g_balance_crylink_primary_edgedamage 8
-set g_balance_crylink_primary_force -60
-set g_balance_crylink_primary_radius 100
+set g_balance_crylink_primary_damage 8
+set g_balance_crylink_primary_edgedamage 6
+set g_balance_crylink_primary_force 40
+set g_balance_crylink_primary_radius 80
 set g_balance_crylink_primary_speed 1100
 set g_balance_crylink_primary_spread 0.1
 set g_balance_crylink_primary_shots 7
@@ -364,16 +364,16 @@ set g_balance_crylink_primary_other_lifetime 2 // range: 800 full, fades to 1300
 set g_balance_crylink_primary_other_fadetime 0.25
 
 set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 4
+set g_balance_crylink_secondary_damage 2
 set g_balance_crylink_secondary_edgedamage 0
 set g_balance_crylink_secondary_force -20
-set g_balance_crylink_secondary_radius 15
+set g_balance_crylink_secondary_radius 5
 set g_balance_crylink_secondary_speed 1600
 set g_balance_crylink_secondary_spread 0.03
 set g_balance_crylink_secondary_shots 3
 set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.1
-set g_balance_crylink_secondary_animtime 0.1
+set g_balance_crylink_secondary_refire 0.15
+set g_balance_crylink_secondary_animtime 0.15
 set g_balance_crylink_secondary_ammo 1
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 
@@ -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 c9b5cd7df79c91123bc9b5a1ed9d7b90cf417f37..f273a167c216135f1aabf67ac7601f8d9fce7482 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,8 +321,9 @@ 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"
@@ -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 3e1cc9629bc3c4d83ba80a8bc5103beb0a329558..89e9181f6ba5601109f9f9799e6396e821cefa0e 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 1000
 sv_warsowbunny_turnaccel 0
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
index a45b360e94ce21fe32d9448036f0baf0250150b2..30c5763cec9929a3fec09e1b3383b37833aa0860 100644 (file)
@@ -79,11 +79,11 @@ void Porto_Draw()
                        p = p - view_up * 16;
                if(idx-1 >= portal1_idx)
                {
-                       Draw_CylindricLine(p, q, 4, "", 1, 0, '0 0 1', 0.5, DRAWFLAG_NORMAL);
+                       Draw_CylindricLine(p, q, 4, "", 1, 0, '0 0 1', 0.5, DRAWFLAG_NORMAL, view_origin);
                }
                else
                {
-                       Draw_CylindricLine(p, q, 4, "", 1, 0, '1 0 0', 0.5, DRAWFLAG_NORMAL);
+                       Draw_CylindricLine(p, q, 4, "", 1, 0, '1 0 0', 0.5, DRAWFLAG_NORMAL, view_origin);
                }
                --idx;
        }
@@ -354,6 +354,12 @@ void CSQC_UpdateView(float w, float h)
        float fov;
        float f, i, j;
        vector v, vo;
+       vector vf_size, vf_min;
+
+       vf_size = R_SetView3fv(VF_SIZE);
+       vf_min = R_SetView3fv(VF_MIN);
+       vid_width = vf_size_x;
+       vid_height = vf_size_y;
 
        vector reticle_pos, reticle_size;
 
@@ -398,9 +404,6 @@ void CSQC_UpdateView(float w, float h)
                view_set = 1;
        }
 
-       vid_width = w;
-       vid_height = h;
-
 #ifdef BLURTEST
        if(time > blurtest_time0 && time < blurtest_time1)
        {
@@ -488,6 +491,10 @@ void CSQC_UpdateView(float w, float h)
        // ALWAYS Clear Current Scene First
        R_ClearScene();
 
+       // FIXME engine bug? VF_SIZE and VF_MIN are not restored to sensible values by this
+       R_SetView(VF_SIZE, vf_size);
+       R_SetView(VF_MIN, vf_min);
+
        // Assign Standard Viewflags
        // Draw the World (and sky)
        R_SetView(VF_DRAWWORLD, 1);
@@ -878,6 +885,11 @@ void CSQC_UpdateView(float w, float h)
 
        if(autocvar__hud_configure)
                HUD_Panel_Mouse();
+
+       // let's reset the view back to normal for the end
+       R_SetView(VF_MIN, '0 0 0');
+       R_SetView(VF_SIZE, '1 0 0' * w + '0 1 0' * h);
+
        // be safe against triggerbots until everyone has the fixed engine
        // this call is meant to overwrite the trace globals by something
        // unsuspicious
index 0c2df0e636257816fd717d9965883a9a323fd56a..5e724442b7a316ea17cd0278d0fd23015d0740d5 100644 (file)
@@ -10,7 +10,7 @@ var float autocvar_cl_gentle;
 var float autocvar_cl_gentle_gibs;
 var float autocvar_cl_gentle_messages;
 
-var float autocvar_hud_color_bg_team;
+var float autocvar_scoreboard_color_bg_team;
 
 var float autocvar__menu_alpha;
 
index ec2ab9a3195892c29191d391e9d30e90cd380ebb..0835c742db2499eeb51f3eddd0144fdce2c7f7a9 100644 (file)
@@ -79,6 +79,7 @@ void ()                                                                       R_ClearScene = #300;
 void (float mask)                                                      R_AddEntities = #301;
 void (entity e)                                                                R_AddEntity = #302;
 float (float property, ...)                                            R_SetView = #303;
+vector (float property, ...)                                           R_SetView3fv = #303;
 void ()                                                                        R_RenderScene = #304;
 void (vector org, float radius, vector rgb)                            R_AddDynamicLight = #305;
 void ()                                                                        R_CalcRefDef = #306;
index bbee6580097170d884b1fcd1f7b183996a0cfba2..2e946fc830d1228515c89ef4110d6417a134396a 100644 (file)
@@ -10,8 +10,8 @@ void SUB_Remove()
 
 void b_draw()
 {
-    //Draw_CylindricLine(self.fx_start, self.fx_end, self.fx_with, self.fx_texture, 0, time * 3, '1 1 1', 0.7, DRAWFLAG_ADDITIVE);
-    Draw_CylindricLine(self.fx_start, self.fx_end, self.fx_with, self.fx_texture, (self.fx_with/256), 0, '1 1 1', 1, DRAWFLAG_ADDITIVE);
+    //Draw_CylindricLine(self.fx_start, self.fx_end, self.fx_with, self.fx_texture, 0, time * 3, '1 1 1', 0.7, DRAWFLAG_ADDITIVE, view_origin);
+    Draw_CylindricLine(self.fx_start, self.fx_end, self.fx_with, self.fx_texture, (self.fx_with/256), 0, '1 1 1', 1, DRAWFLAG_ADDITIVE, view_origin);
 
 }
 void b_make(vector s,vector e, string t,float l,float z)
index b769947eeb9439e02e6618ef20dbdc4338e0b168..06858d597aa917a126e1e46cc50354458973afa0 100644 (file)
@@ -5,7 +5,7 @@
 .float HookSilent;
 .float HookRange;
 
-void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float alpha, float drawflag)
+void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float alpha, float drawflag, vector vieworg)
 {
        // I want to draw a quad...
        // from and to are MIDPOINTS.
@@ -17,7 +17,7 @@ void Draw_CylindricLine(vector from, vector to, float thickness, string texture,
        length_tex = aspect * vlen(to - from) / thickness;
 
        // direction is perpendicular to the view normal, and perpendicular to the axis
-       thickdir = normalize(cross(axis, view_origin - from));
+       thickdir = normalize(cross(axis, vieworg - from));
 
 /*
        print("from ", vtos(from), "\n");
@@ -46,8 +46,10 @@ float Draw_GrapplingHook_trace_callback_a;
 void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end)
 {
        float i;
+       vector vorg;
+       vorg = WarpZone_TransformOrigin(WarpZone_trace_transform, view_origin);
        for(i = 0; i < Draw_GrapplingHook_trace_callback_a; ++i)
-               Draw_CylindricLine(hit, start, 8, Draw_GrapplingHook_trace_callback_tex, 0.25, Draw_GrapplingHook_trace_callback_rnd, Draw_GrapplingHook_trace_callback_rgb, min(1, Draw_GrapplingHook_trace_callback_a - i), DRAWFLAG_NORMAL);
+               Draw_CylindricLine(hit, start, 8, Draw_GrapplingHook_trace_callback_tex, 0.25, Draw_GrapplingHook_trace_callback_rnd, Draw_GrapplingHook_trace_callback_rgb, min(1, Draw_GrapplingHook_trace_callback_a - i), DRAWFLAG_NORMAL, vorg);
        Draw_GrapplingHook_trace_callback_rnd += 0.25 * vlen(hit - start) / 8;
 }
 
index 5593570508b67ab74516119fe3ec841789bc5d28..5ee28b0fd22f8d9fa803f6db9d791166fbaf91c6 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 23ced4b64a2f8caf155bd878d2c0ca63a0fe6f61..6703b1b11f82ad1b96d7e387d33b36d2b44b7996 100644 (file)
@@ -35,11 +35,11 @@ void Draw_Laser()
        {
                if(self.alpha)
                {
-                       Draw_CylindricLine(self.origin, trace_endpos, self.scale, "particles/laserbeam", 0, time * 3, self.colormod, self.alpha, DRAWFLAG_NORMAL); // TODO make a texture to make the laser look smoother
+                       Draw_CylindricLine(self.origin, trace_endpos, self.scale, "particles/laserbeam", 0, time * 3, self.colormod, self.alpha, DRAWFLAG_NORMAL, view_origin);
                }
                else
                {
-                       Draw_CylindricLine(self.origin, trace_endpos, self.scale, "particles/laserbeam", 0, time * 3, self.colormod, 0.5, DRAWFLAG_ADDITIVE); // TODO make a texture to make the laser look smoother
+                       Draw_CylindricLine(self.origin, trace_endpos, self.scale, "particles/laserbeam", 0, time * 3, self.colormod, 0.5, DRAWFLAG_ADDITIVE, view_origin);
                }
        }
        if not(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT))
index 407b86c746db7eb8bce41e948ff88b2f186ad1d6..9a773379b5d6eed97a57ae1189f2651ffc6c67d8 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 0566ec14ab961b9cc7c5ca39206b51f47b7e51ee..76b19a54c50c99a94d7942951edf430ab380d626 100644 (file)
@@ -595,8 +595,8 @@ string HUD_FixScoreboardColumnWidth(float i, string str)
                for(j = 0; j < hud_num_fields; ++j)
                        if(j != i)
                                if (hud_field[i] != SP_SEPARATOR)
-                                       namesize -= hud_size[j] + 1;
-               namesize += 1;
+                                       namesize -= hud_size[j] + hud_fontsize_x;
+               namesize += hud_fontsize_x;
                hud_size[i] = namesize;
 
                if (hud_fixscoreboardcolumnwidth_iconlen != 0)
@@ -760,7 +760,10 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
        tmp_y = 1.25 * hud_fontsize_y;
 
        // rounded header
-       drawpic(pos, "gfx/scoreboard/scoreboard_tableheader", tmp, (rgb * autocvar_hud_color_bg_team) + '0.5 0.5 0.5', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+       if (teamplay)
+               drawpic(pos, "gfx/scoreboard/scoreboard_tableheader", tmp, (rgb * autocvar_scoreboard_color_bg_team) + '0.5 0.5 0.5', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+       else
+               drawpic(pos, "gfx/scoreboard/scoreboard_tableheader", tmp, rgb + '0.5 0.5 0.5', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
        // table border
        tmp_y += hud_border_thickness;
@@ -776,7 +779,10 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
 
        // table background
        tmp_y = body_table_height;
-       drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_hud_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+       if (teamplay)
+               drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+       else
+               drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
        // anyway, apply some color
        //drawfill(pos, tmp + '2 0 0', rgb, 0.1, DRAWFLAG_NORMAL);
@@ -912,7 +918,10 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        tmp_x = sbwidth;
        tmp_y = height * rows;
 
-       drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_hud_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+       if (teamplay)
+               drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+       else
+               drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
        drawborderlines(hud_accuracy_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
 
        // column highlighting
@@ -1015,9 +1024,9 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
 {
        float i;
        RANKINGS_RECEIVED_CNT = 0;
-               for (i=RANKINGS_CNT-1; i>=0; --i)
-                       if (grecordtime[i])
-                               RANKINGS_RECEIVED_CNT = RANKINGS_RECEIVED_CNT + 1;
+       for (i=RANKINGS_CNT-1; i>=0; --i)
+               if (grecordtime[i])
+                       ++RANKINGS_RECEIVED_CNT;
 
        if (RANKINGS_RECEIVED_CNT == 0)
                return pos;
@@ -1025,9 +1034,9 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
        float is_spec;
        is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
        vector hl_rgb;
-               hl_rgb_x = cvar("scoreboard_color_bg_r") + 0.5;
-               hl_rgb_y = cvar("scoreboard_color_bg_g") + 0.5;
-               hl_rgb_z = cvar("scoreboard_color_bg_b") + 0.5;
+       hl_rgb_x = cvar("scoreboard_color_bg_r") + 0.5;
+       hl_rgb_y = cvar("scoreboard_color_bg_g") + 0.5;
+       hl_rgb_z = cvar("scoreboard_color_bg_b") + 0.5;
 
        pos_y += hud_fontsize_y;
        drawstring(pos, strcat("Rankings"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
@@ -1036,7 +1045,10 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
        tmp_x = sbwidth;
        tmp_y = hud_fontsize_y * RANKINGS_RECEIVED_CNT;
 
-       drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_hud_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+       if (teamplay)
+               drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_scoreboard_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+       else
+               drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
        drawborderlines(hud_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
 
        // row highlighting
index d7b9ee9d01960829aa3992dcebec4eb6bb7e84c8..a001732da2553a9411b4fdf4e09793dfe7d2ba7f 100644 (file)
@@ -436,11 +436,7 @@ void WaypointSprite_Load()
                for(i = 0; i < n; ++i)
                {
                        s = search_getfilename(dh, i);
-                       if(substring(s, 0, 15) != "models/sprites/")
-                               continue;
-                       if(substring(s, strlen(s) - 4, 4) != ".tga")
-                               continue;
-                       s = substring(s, 15, strlen(s) - 19);
+                       s = substring(s, 15, strlen(s) - 15 - 4); // strip models/sprites/ and .tga
 
                        o = strstrofs(s, "_frame", 0);
                        sname = strcat("/spriteframes/", substring(s, 0, o));
index cec73d6c0a2f146d89b9298e21723d0976694442..a33cac91633ea8016b622d148b6840f6a1673a86 100644 (file)
@@ -69,6 +69,8 @@ void draw_PreloadPicture(string pic)
 
 void draw_Picture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha)
 {
+       if(theSize_x == 0 || theSize_y <= 0) // no default sizing please
+               return;
        pic = draw_UseSkinFor(pic);
        drawpic(boxToGlobal(theOrigin, draw_shift, draw_scale), pic, boxToGlobalSize(theSize, draw_scale), theColor, theAlpha * draw_alpha, 0);
 }
@@ -174,11 +176,40 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the
        theAlpha *= draw_alpha;
        width = eX * theSize_x;
        height = eY * theSize_y;
-       if(theSize_x <= theBorderSize_x * 2)
+       // zero size? bail out, we cannot handle this
+       if(theSize_x <= 0 || theSize_y <= 0)
+               return;
+       if(theBorderSize_x <= 0) // no x border
+       {
+               if(theBorderSize_y <= 0)
+               {
+                       drawsubpic(theOrigin,                            width          + height,          pic, '0.25 0.25 0', '0.5  0.5  0', theColor, theAlpha, 0);
+               }
+               else if(theSize_y <= theBorderSize_y * 2)
+               {
+                       // not high enough... draw just top and bottom then
+                       bH = eY * (0.25 * theSize_y / (theBorderSize_y * 2));
+                       drawsubpic(theOrigin,                             width          + height * 0.5, pic, '0.25 0 0',           '0.5  0 0' + bH, theColor, theAlpha, 0);
+                       drawsubpic(theOrigin              + height * 0.5, width          + height * 0.5, pic, '0.25 0 0' + eY - bH, '0.5  0 0' + bH, theColor, theAlpha, 0);
+               }
+               else
+               {
+                       dY = theBorderSize_y * eY;
+                       drawsubpic(theOrigin,                            width                   +     dY, pic, '0.25 0    0', '0.5  0.25 0', theColor, theAlpha, 0);
+                       drawsubpic(theOrigin          + dY,              width          + height - 2 * dY, pic, '0.25 0.25 0', '0.5  0.5  0', theColor, theAlpha, 0);
+                       drawsubpic(theOrigin + height - dY,              width                   +     dY, pic, '0.25 0.75 0', '0.5  0.25 0', theColor, theAlpha, 0);
+               }
+       }
+       else if(theSize_x <= theBorderSize_x * 2)
        {
                // not wide enough... draw just left and right then
                bW = eX * (0.25 * theSize_x / (theBorderSize_x * 2));
-               if(theSize_y <= theBorderSize_y * 2)
+               if(theBorderSize_y <= 0)
+               {
+                       drawsubpic(theOrigin,                             width * 0.5 + height,          pic, '0 0.25 0',           '0 0.5  0' + bW, theColor, theAlpha, 0);
+                       drawsubpic(theOrigin + width * 0.5,               width * 0.5 + height,          pic, '0 0.25 0' + eX - bW, '0 0.5  0' + bW, theColor, theAlpha, 0);
+               }
+               else if(theSize_y <= theBorderSize_y * 2)
                {
                        // not high enough... draw just corners
                        bH = eY * (0.25 * theSize_y / (theBorderSize_y * 2));
@@ -189,7 +220,7 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the
                }
                else
                {
-                       dY = theBorderSize_x * eY;
+                       dY = theBorderSize_y * eY;
                        drawsubpic(theOrigin,                             width * 0.5          +     dY, pic, '0 0    0',           '0 0.25 0' + bW, theColor, theAlpha, 0);
                        drawsubpic(theOrigin + width * 0.5,               width * 0.5          +     dY, pic, '0 0    0' + eX - bW, '0 0.25 0' + bW, theColor, theAlpha, 0);
                        drawsubpic(theOrigin                        + dY, width * 0.5 + height - 2 * dY, pic, '0 0.25 0',           '0 0.5  0' + bW, theColor, theAlpha, 0);
@@ -200,7 +231,14 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the
        }
        else
        {
-               if(theSize_y <= theBorderSize_y * 2)
+               if(theBorderSize_y <= 0)
+               {
+                       dX = theBorderSize_x * eX;
+                       drawsubpic(theOrigin,                                        dX + height,          pic, '0    0.25 0', '0.25 0.5  0', theColor, theAlpha, 0);
+                       drawsubpic(theOrigin                       + dX, width - 2 * dX + height,          pic, '0.25 0.25 0', '0.5  0.5  0', theColor, theAlpha, 0);
+                       drawsubpic(theOrigin               + width - dX,             dX + height,          pic, '0.75 0.25 0', '0.25 0.5  0', theColor, theAlpha, 0);
+               }
+               else if(theSize_y <= theBorderSize_y * 2)
                {
                        // not high enough... draw just top and bottom then
                        bH = eY * (0.25 * theSize_y / (theBorderSize_y * 2));
@@ -215,7 +253,7 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the
                else
                {
                        dX = theBorderSize_x * eX;
-                       dY = theBorderSize_x * eY;
+                       dY = theBorderSize_y * eY;
                        drawsubpic(theOrigin,                                        dX          +     dY, pic, '0    0    0', '0.25 0.25 0', theColor, theAlpha, 0);
                        drawsubpic(theOrigin                  + dX,      width - 2 * dX          +     dY, pic, '0.25 0    0', '0.5  0.25 0', theColor, theAlpha, 0);
                        drawsubpic(theOrigin          + width - dX,                  dX          +     dY, pic, '0.75 0    0', '0.25 0.25 0', theColor, theAlpha, 0);
index 05ed89887d3ce94f165028a286896b37addb89e3..bd54aa219400ad57f61fe675d8666e8c31e5062a 100644 (file)
@@ -163,6 +163,5 @@ void XonoticMapInfoDialog_fill(entity me)
                me.TD(me, 1, me.columns - 5.5, me.startButton = e = makeXonoticButton("Play", '0 0 0'));
                        me.startButton.onClick = MapList_LoadMap;
                        me.startButton.onClickEntity = NULL; // filled later
-               me.TDempty(me, 0.5);
 }
 #endif
index 8c75c1f469f84a3c0b6c524d8f3d226a043cc04e..754da256a9ffc3f44a2165339fc62aec8f6140c1 100644 (file)
@@ -151,7 +151,7 @@ void XonoticPlayerSettingsTab_fill(entity me)
                me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1.25", "Enemies"));
        me.TR(me);
                me.TDempty(me, 0.4);
-               me.TD(me, 1, 2.2, e = makeXonoticButton("Waypoints Setup", '0 0 0'));
+               me.TD(me, 1, 2.2, e = makeXonoticButton("Waypoints setup...", '0 0 0'));
                        e.onClick = DialogOpenButton_Click;
                        e.onClickEntity = main.waypointDialog;
                me.TDempty(me, 0.5);
@@ -178,7 +178,6 @@ void XonoticPlayerSettingsTab_fill(entity me)
                        e.addValue(e, "Lots", "0");
                        e.configureXonoticTextSliderValues(e);
                        setDependent(e, "cl_gentle", 0, 0);
-       me.TR(me);
 
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "color -1 -1;name \"$_cl_name\";cl_cmd sendcvar cl_weaponpriority;sendcvar cl_zoomfactor;sendcvar cl_zoomspeed;sendcvar cl_autoswitch;sendcvar cl_shownames;sendcvar cl_forceplayermodelsfromxonotic;sendcvar cl_forceplayermodels;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY));
index 7d1f17f0f2c51609f13d2af59e5129594dba87a2..62506a6435572292890e90bd28862f85549074f4 100644 (file)
@@ -155,7 +155,8 @@ void XonoticAudioSettingsTab_fill(entity me)
                if(sl.value != e.savedValue)
                        e.savedValue = 0.65; // default
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticTextLabel(0.1, "Frequency:"));
+               me.TDempty(me, 0.2);
+               me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Frequency:"));
                me.TD(me, 1, 2, sl);
        me.TR(me);
        me.TR(me);
index 2dcf83f1f044ac34658d21819637cfd90bc57442..89c8471ca7229651062577bf6dbc506a8be09fa1 100644 (file)
@@ -66,13 +66,12 @@ void XonoticMiscSettingsTab_fill(entity me)
        me.TR(me);
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "host_sleep", "Minimize input latency"));
+               me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_maxfps_alwayssleep", "Minimize input latency"));
        me.TR(me);
        me.TR(me);
                me.TDempty(me, 0.5);
                me.TD(me, 1, 2, e = makeXonoticButton("Advanced settings...", '0 0 0'));
                        e.onClick = DialogOpenButton_Click;
                        e.onClickEntity = main.cvarsDialog;
-               me.TDempty(me, 0.5);
 }
 #endif
index 3b729ca48c85e4251f1ac0181485431eea95c1d1..5e7eb707565c6ed0d54eaf9bee4442afb74632b6 100644 (file)
@@ -70,11 +70,11 @@ void anticheat_physics()
                MEAN_ACCUMULATE(anticheat_div0_evade, 1 - (self.anticheat_div0_evade_forward_initial * v_forward), 1);
        }
 
-       MEAN_ACCUMULATE(anticheat_div0_strafebot_old, movement_oddity(self.movement, self.anticheat_div0_strafebot_movement_prev), max(0, 0.05 - frametime));
+       MEAN_ACCUMULATE(anticheat_div0_strafebot_old, movement_oddity(self.movement, self.anticheat_div0_strafebot_movement_prev), max(0, sys_frametime - frametime));
        self.anticheat_div0_strafebot_movement_prev = self.movement;
 
        if(vlen(self.anticheat_div0_strafebot_forward_prev))
-               MEAN_ACCUMULATE(anticheat_div0_strafebot_new, 1 - (self.anticheat_div0_strafebot_forward_prev * v_forward), max(0, 0.05 - frametime));
+               MEAN_ACCUMULATE(anticheat_div0_strafebot_new, 1 - (self.anticheat_div0_strafebot_forward_prev * v_forward), max(0, sys_frametime - frametime));
        self.anticheat_div0_strafebot_forward_prev = v_forward;
 
        // generic speedhack detection: correlate anticheat_speedhack_movetime (UPDATED BEFORE THIS) and server time
index a75537907d7560e43e833221663c6659f20cd47c..8d837b801453091e65b6443b00ea3a1ed4991721 100644 (file)
@@ -672,6 +672,7 @@ float CheatCommand(float argc)
        END_CHEAT_FUNCTION();
 }
 
+void crosshair_trace_plusvisibletriggers(entity pl);
 void Drag_Begin(entity dragger, entity draggee, vector touchpoint);
 void Drag_Finish(entity dragger);
 float Drag_IsDraggable(entity draggee);
@@ -725,7 +726,7 @@ float CheatFrame()
                if(Drag_CanDrag(self))
                        if(self.BUTTON_DRAG)
                        {
-                               crosshair_trace(self);
+                               crosshair_trace_plusvisibletriggers(self);
                                if(trace_ent)
                                        if(Drag_IsDraggable(trace_ent))
                                                switch(0)
@@ -752,6 +753,22 @@ float CheatFrame()
 
 // ENTITY DRAGGING
 
+void crosshair_trace_plusvisibletriggers(entity pl)
+{
+       entity first;
+       entity e;
+       first = findchainfloat(solid, SOLID_TRIGGER);
+
+       for (e = first; e; e = e.chain)
+               if (e.model != "")
+                       e.solid = SOLID_BSP;
+
+       crosshair_trace(pl);
+
+       for (e = first; e; e = e.chain)
+               e.solid = SOLID_TRIGGER;
+}
+
 // on dragger:
 .float draggravity;
 .float dragspeed; // speed of mouse wheel action
@@ -828,14 +845,16 @@ float Drag_IsDraggable(entity draggee)
                return FALSE;
        if(draggee.classname == "func_button")
                return FALSE;
-       if(draggee.model == "")
-               return FALSE;
+//     if(draggee.model == "")
+//             return FALSE;
        if(draggee.classname == "spectator")
                return FALSE;
        if(draggee.classname == "observer")
                return FALSE;
        if(draggee.classname == "exteriorweaponentity")
                return FALSE;
+       if(draggee.classname == "weaponentity")
+               return FALSE;
 
        return TRUE;
 }
index b31e477d784bfe56b6b216e180c73b4f97611784..2df6c1c4fefb2ffbad069cb587cd27e82f22bdff 100644 (file)
@@ -103,7 +103,7 @@ void PlayerJump (void)
 
                                        curspeed = max(
                                                vlen(vec2(self.velocity)), // current xy speed
-                                               vlen(vec2(antilag_takebackavgvelocity(self, max(self.lastteleporttime + 0.05, time - 0.25), time))) // average xy topspeed over the last 0.25 secs
+                                               vlen(vec2(antilag_takebackavgvelocity(self, max(self.lastteleporttime + sys_frametime, time - 0.25), time))) // average xy topspeed over the last 0.25 secs
                                        );
                                        makevectors(self.v_angle_y * '0 1 0');
                                        wishvel = v_forward * self.movement_x + v_right * self.movement_y;
index 74b4ecea88c17683996b4b65aacca357f00b10fb..d4ee31d802d475ba8aedb5be65ec4aa6aa6e188c 100644 (file)
@@ -635,3 +635,5 @@ string deathmessage;
 .float selectweapon; // last selected weapon of the player
 
 .float ballistics_density; // wall piercing factor, larger = bullet can pass through more
+
+.entity realowner;
index 5bf2b9ad86c531a5c611761c74341ec4fdb382ce..3e5bed8b25f23c35247fa2cf1c50c14da053dc3c 100644 (file)
@@ -77,7 +77,10 @@ void dompoint_captured ()
                wait_time = self.wait;
 
        bprint("^3", head.netname, "^3", self.message);
-       bprint(" ^7(", ftos(points), " points every ", ftos(wait_time), " seconds)\n");
+       if (points != 1)
+               bprint(" ^7(", ftos(points), " points every ", ftos(wait_time), " seconds)\n");
+       else
+               bprint(" ^7(", ftos(points), " point every ", ftos(wait_time), " seconds)\n");
 
        if(self.enemy.playerid == self.enemy_playerid)
                PlayerScore_Add(self.enemy, SP_DOM_TAKES, 1);
index eb4c8b4de64f5b7dedf6a42a83c677c8a2575aa6..44605ddeee793899a83ad425d6ed0182a4a856e2 100644 (file)
@@ -31,8 +31,6 @@
 //   Otherwise mdl_dead will be displayed at the map origin, and nobody would
 //   want that!
 
-.vector mins_save, maxs_save;
-
 void func_breakable_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
 
 //
@@ -87,15 +85,18 @@ void func_breakable_look_destroyed()
 {
        local float floor_z;
 
+       if(self.solid == SOLID_BSP) // in case a misc_follow moved me, save the current origin first
+               self.dropped_origin = self.origin;
+
        if(self.mdl_dead == "")
                self.model = "";
        else {
-               setmodel(self, self.mdl_dead);
                if (self.origin == '0 0 0')     {       // probably no origin brush, so don't spawn in the middle of the map..
                        floor_z = self.absmin_z;
                        setorigin(self,((self.absmax+self.absmin)*.5));
                        self.origin_z = floor_z;
                }
+               setmodel(self, self.mdl_dead);
        }
 
        self.solid = SOLID_NOT;
@@ -104,6 +105,8 @@ void func_breakable_look_destroyed()
 void func_breakable_look_restore()
 {
        setmodel(self, self.mdl);
+       if(self.mdl_dead != "") // only do this if we use mdl_dead, to behave better with misc_follow
+               setorigin(self, self.dropped_origin);
        self.solid = SOLID_BSP;
 }
 
@@ -113,7 +116,6 @@ void func_breakable_behave_destroyed()
        self.takedamage = DAMAGE_NO;
        self.event_damage = SUB_Null;
        self.state = 1;
-       setsize(self, '0 0 0', '0 0 0');
        func_breakable_colormod();
 }
 
@@ -123,7 +125,6 @@ void func_breakable_behave_restore()
        self.takedamage = DAMAGE_AIM;
        self.event_damage = func_breakable_damage;
        self.state = 0;
-       setsize(self, self.mins_save, self.maxs_save);
        func_breakable_colormod();
 }
 
@@ -145,6 +146,7 @@ void func_breakable_destroy() {
        string oldmsg;
 
        activator = self.owner;
+       self.owner = world; // set by W_PrepareExplosionByDamage
 
        // now throw around the debris
        n = tokenize_console(self.debris);
@@ -232,8 +234,6 @@ void spawnfunc_func_breakable() {
 
        self.mdl = self.model;
        SetBrushEntityModel();
-       self.mins_save = self.mins;
-       self.maxs_save = self.maxs;
 
        self.use = func_breakable_restore;
 
@@ -247,6 +247,7 @@ void spawnfunc_func_breakable() {
                precache_sound(self.noise);
 
        self.team_saved = self.team;
+       self.dropped_origin = self.origin;
 
        self.reset = func_breakable_reset;
        func_breakable_reset();
index 52214c2a6d276958dd933731fa16a487589e26f0..cffe88bd7fff5acfe21bc2ca98f26af4ffe99bcf 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 c929bcf6f1367763c83848de39fe15802a6e18b6..8a28216c9c520289e1140c2d7a053aebd6fd39c7 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 4427320586988352ab039c04810e2fbeeced5fdf..99df7041baf7196e83f4016123a2075ef6b30295 100644 (file)
@@ -511,6 +511,7 @@ void W_PrepareExplosionByDamage(entity attacker, void() explode)
        self.takedamage = DAMAGE_NO;
        self.event_damage = SUB_Null;
        self.owner = attacker;
+       self.realowner = attacker;
 
        // do not explode NOW but in the NEXT FRAME!
        // because recursive calls to RadiusDamage are not allowed
index e9015f5806e4ec5124ae3c9e75187e7b74b57714..5d1721f78f7def80f188107343408d8cb5d98d87 100644 (file)
@@ -4,8 +4,6 @@ REGISTER_WEAPON(CRYLINK, w_crylink, IT_CELLS, 6, WEP_FLAG_NORMAL | WEP_TYPE_SPLA
 #ifdef SVQC
 .float gravity;
 
-.entity realowner;
-
 .entity queuenext;
 .entity queueprev;
 
index 6848b2a5ad90a8fdd3bef7a70c86f1f22138845e..64a987047c0307d0380e671d32910396b1faa33b 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 b186230ecf5b5f36b7b506717edf3f1d31a4840a..65812153318e1ff2919d56e3e336e2dabede09cc 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
index 360652d6f24eafa9b4d2b708f8dcf1543e47cf67..9eb74988610b468e6db59e1fa01947dede0bb62a 100644 (file)
@@ -132,6 +132,8 @@ entity WarpZone_Find(vector mi, vector ma)
 {
        // if we are near any warpzone planes - MOVE AWAY (work around nearclip)
        entity e;
+       if(!warpzone_warpzones_exist)
+               return world;
        for(e = world; (e = find(e, classname, "trigger_warpzone")); )
                if(WarpZoneLib_BoxTouchesBrush(mi, ma, e, world))
                        return e;
@@ -141,6 +143,8 @@ entity WarpZone_Find(vector mi, vector ma)
 void WarpZone_MakeAllSolid()
 {
        entity e;
+       if(!warpzone_warpzones_exist)
+               return;
        for(e = world; (e = find(e, classname, "trigger_warpzone")); )
                e.solid = SOLID_BSP;
 }
@@ -148,6 +152,8 @@ void WarpZone_MakeAllSolid()
 void WarpZone_MakeAllOther()
 {
        entity e;
+       if(!warpzone_warpzones_exist)
+               return;
        for(e = world; (e = find(e, classname, "trigger_warpzone")); )
                e.solid = SOLID_TRIGGER;
 }
@@ -303,6 +309,9 @@ void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZo
        vector vf, vr, vu, v0, o0;
        entity wz;
 
+       o0 = e.origin;
+       v0 = e.velocity;
+
        WarpZone_Trace_InitTransform();
        WarpZone_tracetoss_time = 0;
        if(!warpzone_warpzones_exist)
@@ -312,14 +321,15 @@ void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZo
                        cb(e.origin, trace_endpos, trace_endpos);
                dt = vlen(e.origin - o0) / vlen(e.velocity);
                WarpZone_tracetoss_time += dt;
+               e.velocity_z -= dt * g;
+               WarpZone_tracetoss_velocity = e.velocity;
+               e.velocity = v0;
                return;
        }
 
        vf = v_forward;
        vr = v_right;
        vu = v_up;
-       o0 = e.origin;
-       v0 = e.velocity;
 
        // if starting in warpzone, first transform
        wz = WarpZone_Find(e.origin + e.mins, e.origin + e.maxs);
@@ -354,7 +364,7 @@ void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZo
                e.origin = trace_endpos;
                dt = vlen(e.origin - o0) / vlen(e.velocity);
                WarpZone_tracetoss_time += dt;
-               e.velocity_z -= WarpZone_tracetoss_time * g;
+               e.velocity_z -= dt * g;
                if(trace_fraction >= 1)
                        break;
                if(trace_ent.classname != "trigger_warpzone")