]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/terencehill/misc_hud_fixes'
authorSamual Lenks <samual@xonotic.org>
Mon, 25 Feb 2013 18:32:54 +0000 (13:32 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 25 Feb 2013 18:32:54 +0000 (13:32 -0500)
56 files changed:
_hud_descriptions.cfg
balance25.cfg
balanceFruitieX.cfg
balanceXDF.cfg
balanceXPM.cfg
balanceXonotic.cfg
defaultXonotic.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
models/player/template.md3.animinfo [deleted file]
mutator_new_toys.cfg
qcsrc/client/Main.qc
qcsrc/client/announcer.qc
qcsrc/client/autocvars.qh
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/hook.qc
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/laser.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/player_skeleton.qc
qcsrc/client/player_skeleton.qh
qcsrc/client/projectile.qc
qcsrc/client/teamradar.qc
qcsrc/client/wall.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/constants.qh
qcsrc/common/csqcmodel_settings.qh
qcsrc/csqcmodellib/cl_model.qc
qcsrc/csqcmodellib/cl_player.qc
qcsrc/csqcmodellib/interpolate.qc
qcsrc/csqcmodellib/interpolate.qh
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c
qcsrc/menu/xonotic/maplist.c
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/tturrets/units/unit_machinegun.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/w_common.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_rifle.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_tuba.qc
qcsrc/server/w_uzi.qc

index 4c832ef1e9b9a6208be14c874f302a93528ff300..90ae7a3743785d0b034e7d4a9e8234f09e5d857d 100644 (file)
@@ -156,6 +156,8 @@ seta hud_panel_radar_zoommode "" "zoom mode: 0 = zoomed by default, 1 = zoomed w
 seta hud_panel_radar_scale "" "distance you can see on the team radar"
 seta hud_panel_radar_maximized_scale "" "distance you can see on the radar when maximized"
 seta hud_panel_radar_maximized_size "" "size of the radar when maximized"
+seta hud_panel_radar_maximized_rotation "" "rotation mode: you set what points up. 0 = player, 1 = west, 2 = south, 3 = east, 4 = north"
+seta hud_panel_radar_maximized_zoommode "" "zoom mode: 0 = zoomed by default, 1 = zoomed when +zoom, 2 = always zoomed, 3 = always zoomed out"
 
 seta hud_panel_score "" "enable/disable this panel"
 seta hud_panel_score_pos "" "position of this base of the panel"
index 068f650f8f443e841deb73004c25874a35495653..666482f4a365423b4a47dbed4e0a1b5866711b19 100644 (file)
@@ -306,14 +306,12 @@ set g_balance_uzi_burst_ammo 3
 
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 30
-set g_balance_uzi_first_headshotaddeddamage 0
 set g_balance_uzi_first_force 50
 set g_balance_uzi_first_spread 0.015
 set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 1
 
 set g_balance_uzi_sustained_damage 15
-set g_balance_uzi_sustained_headshotaddeddamage 0
 set g_balance_uzi_sustained_force 27
 set g_balance_uzi_sustained_spread 0.05
 set g_balance_uzi_sustained_refire 0.1
index 5ccd6827b60626eb3574fa740d4ee2a46fdd8c15..cd73187ec8daa95f35912c92d17c4bb24bc1a86a 100644 (file)
@@ -306,14 +306,12 @@ set g_balance_uzi_burst_ammo 3
 
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 15 / f/ LOG: 22 -> 15
-set g_balance_uzi_first_headshotaddeddamage 0
 set g_balance_uzi_first_force 50
 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 12   // 120 dps
-set g_balance_uzi_sustained_headshotaddeddamage 0
 set g_balance_uzi_sustained_force 12
 set g_balance_uzi_sustained_spread 0.06
 set g_balance_uzi_sustained_refire 0.1
index 543a5c6176909d0ad811e91727d4a456931c86a9..514433c3269bc782851bf842e054aa95456c71b9 100644 (file)
@@ -306,14 +306,12 @@ set g_balance_uzi_burst_ammo 3
 
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 14
-set g_balance_uzi_first_headshotaddeddamage 0
 set g_balance_uzi_first_force 5
 set g_balance_uzi_first_spread 0.03
 set g_balance_uzi_first_refire 0.4
 set g_balance_uzi_first_ammo 1
 
 set g_balance_uzi_sustained_damage 12
-set g_balance_uzi_sustained_headshotaddeddamage 0
 set g_balance_uzi_sustained_force 5
 set g_balance_uzi_sustained_spread 0
 set g_balance_uzi_sustained_refire 0.1
index cd440294c054be3d391685f4107a3e604979a08c..fc02dc9cb2779daa53589b7916de455efcc60756 100644 (file)
@@ -306,14 +306,12 @@ set g_balance_uzi_burst_ammo 3
 
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 14
-set g_balance_uzi_first_headshotaddeddamage 0
 set g_balance_uzi_first_force 5
 set g_balance_uzi_first_spread 0.03
 set g_balance_uzi_first_refire 0.125
 set g_balance_uzi_first_ammo 1
 
 set g_balance_uzi_sustained_damage 10 // 100 dps
-set g_balance_uzi_sustained_headshotaddeddamage 0
 set g_balance_uzi_sustained_force 5
 set g_balance_uzi_sustained_spread 0.03
 set g_balance_uzi_sustained_refire 0.1
index 871b9a390f2a39fc8daa1b59d6f0bbe34f3b50fa..a0252cb48bfdbf89b048af8063580be3fa9c8a58 100644 (file)
@@ -306,14 +306,12 @@ set g_balance_uzi_burst_ammo 3
 
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 14
-set g_balance_uzi_first_headshotaddeddamage 0
 set g_balance_uzi_first_force 5
 set g_balance_uzi_first_spread 0.03
 set g_balance_uzi_first_refire 0.125
 set g_balance_uzi_first_ammo 1
 
 set g_balance_uzi_sustained_damage 10 // 100 dps
-set g_balance_uzi_sustained_headshotaddeddamage 0
 set g_balance_uzi_sustained_force 5
 set g_balance_uzi_sustained_spread 0.03
 set g_balance_uzi_sustained_refire 0.1
index 4c5339bb8132e92ddd4f08202148ee9e0b24ed65..8e9798c8983925ec78ada995c940dcfe18b27590 100644 (file)
@@ -244,7 +244,6 @@ set sv_friction_on_land 0
 set sv_player_viewoffset "0 0 35" "view offset of the player model"
 set sv_player_mins "-16 -16 -24" "playermodel mins"
 set sv_player_maxs "16 16 45" "playermodel maxs"
-set sv_player_headsize "24 24 12" "playermodel headshot bbox size (centered at top of player bbox, preview with r_showbboxes)" // actually SHOULD be 19.2 19.2 10 according to docs
 set sv_player_crouch_viewoffset "0 0 20" "view offset of the player model when crouched"
 set sv_player_crouch_mins "-16 -16 -24" "mins of a crouched playermodel"
 set sv_player_crouch_maxs "16 16 25" "maxs of a crouched playermodel"
@@ -584,6 +583,7 @@ seta cl_announcer_maptime 3 "play announcer sound telling you the remaining mapt
 
 // startmap_dm is used when running with the -listen or -dedicated commandline options
 set serverconfig server.cfg
+alias loadconfig "cvar_resettodefaults_saveonly; exec ${* !}"
 set _sv_init 0
 alias startmap_dm "set _sv_init 0; map _init/_init; exec $serverconfig; set _sv_init 1"
 
@@ -1318,14 +1318,13 @@ set developer_csqcentities 0 "csqc entity spam"
 set waypoint_benchmark 0 "quit after waypoint loading to benchmark bot navigation code"
 set g_debug_bot_commands 0 "print scripted bot commands before executing"
 set g_debug_defaultsounds 0 "always use default sounds"
-set sv_use_csqc_players 1 "set to 0 to disable CSQC players for better Xonotic 0.5 compat"
 set cl_precacheplayermodels 0 "TODO please check if this needs to be 1 or if precaching a model the server already requested is fast enough to do it at runtime"
-seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_use_csqc_players 1 and sv_defaultcharacter 0)"
-seta cl_forceplayercolors 0 "make everyone look like your own color (requires server to have sv_use_csqc_players 1 and sv_defaultcharacter 0, and is ignored in teamplay with more than two teams)"
-seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (requires server to have sv_use_csqc_players 1; does not affect how enemies look with cl_forceplayermodels)"
-seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (requires server to have sv_use_csqc_players 1; does not affect how enemies look with cl_forceplayermodels)"
-seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (requires server to have sv_use_csqc_players 1, and is ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"
-seta cl_movement_errorcompensation 1 "try to compensate for prediction errors and reduce preceived lag (requires server to have sv_use_csqc_players 1)"
+seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_defaultcharacter 0)"
+seta cl_forceplayercolors 0 "make everyone look like your own color (requires server to have sv_defaultcharacter 0, and is ignored in teamplay with more than two teams)"
+seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
+seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
+seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"
+seta cl_movement_errorcompensation 1 "try to compensate for prediction errors and reduce preceived lag"
 
 // debug cvars for keyhunt attaching
 set _angles "0 0 0"
index c70e1b103a79bfe75504c9c8a86c4696b28f0387..ac5c3d3101d1a8e17642ad5ca14d63fee7e257df 100644 (file)
@@ -154,6 +154,8 @@ seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
 seta hud_panel_radar_maximized_scale "8192"
 seta hud_panel_radar_maximized_size "0.5 0.5"
+seta hud_panel_radar_maximized_rotation "1"
+seta hud_panel_radar_maximized_zoommode "3"
 
 seta hud_panel_score 1
 seta hud_panel_score_pos "0.890000 0.030000"
index 4c0a7f46d06ad9159dce70b715d982dfd8abb5b1..9296ef25ececa5745c4be498dc87aa2595a31a87 100644 (file)
@@ -154,6 +154,8 @@ seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
 seta hud_panel_radar_maximized_scale "8192"
 seta hud_panel_radar_maximized_size "0.5 0.5"
+seta hud_panel_radar_maximized_rotation "1"
+seta hud_panel_radar_maximized_zoommode "3"
 
 seta hud_panel_score 1
 seta hud_panel_score_pos "0.465000 0.045000"
index 56ec31c8091c5566957fcb7f2112cd9f8ef7a398..af661303a3b68735529e4e85e8340eba40f53f28 100644 (file)
@@ -154,6 +154,8 @@ seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
 seta hud_panel_radar_maximized_scale "8192"
 seta hud_panel_radar_maximized_size "0.5 0.5"
+seta hud_panel_radar_maximized_rotation "1"
+seta hud_panel_radar_maximized_zoommode "3"
 
 seta hud_panel_score 1
 seta hud_panel_score_pos "0.465000 0.045000"
index 263412734311e3e73c1015f5b90596674257da7c..50a04c3f7d219d18dd4a7429d5ff24c052a16661 100644 (file)
@@ -154,6 +154,8 @@ seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
 seta hud_panel_radar_maximized_scale "8192"
 seta hud_panel_radar_maximized_size "0.5 0.5"
+seta hud_panel_radar_maximized_rotation "1"
+seta hud_panel_radar_maximized_zoommode "3"
 
 seta hud_panel_score 1
 seta hud_panel_score_pos "0.020000 0.920000"
index 42a0571bb3d96f3d92e7c87ff965f60ff982177c..4e2f7a1f58dcb8a86c8a8fe36374e5e86e00e959 100644 (file)
@@ -154,6 +154,8 @@ seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
 seta hud_panel_radar_maximized_scale "8192"
 seta hud_panel_radar_maximized_size "0.5 0.5"
+seta hud_panel_radar_maximized_rotation "1"
+seta hud_panel_radar_maximized_zoommode "3"
 
 seta hud_panel_score 1
 seta hud_panel_score_pos "0.760000 0.910000"
diff --git a/models/player/template.md3.animinfo b/models/player/template.md3.animinfo
deleted file mode 100644 (file)
index 7eda007..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-  0 40 20 // die1         : die
- 40 40 20 // die2         : die differently
- 80  6 20 // draw         : raise weapon
- 86  6 20 // duck         : crouch quickly
- 92 12 20 // duckwalk     : crouch walking
-104 10 20 // duckjump     : jump from crouching position, stays on last frame until you land
-114 20 20 // duckidle     : crouched
-134 30 20 // idle         : standing
-164 10 20 // jump         : jump, stays on last frame until you land
-174 10 20 // pain1        : flinch from pain
-184 10 20 // pain2        : flinch differently
-194  6 20 // shoot        : 300ms shooting anim, may be played faster/slower by code, used for all weapons
-200  1 20 // taunt        : not used
-201 10 20 // run          : run forward
-211 10 20 // runbackwards : run backwards
-221 10 20 // strafeleft   : fast shuffling to the left
-231 10 20 // straferight  : fast shuffling to the right
-241 10 20 // forwardright : running forward and right
-251 10 20 // forwardleft  : running forward and left
-261 10 20 // backright    : running backward and right
-271 10 20 // backleft     : running backward and left
\ No newline at end of file
index c4f20995affc7901dbebc125a2357e2265a6a45e..7b4a9ab9fa9b3ab86d51d7e94ef328f295506fb5 100644 (file)
@@ -76,8 +76,7 @@ set g_balance_minelayer_reload_time 2
 set g_balance_rifle_bursttime 0
 set g_balance_rifle_primary_tracer 1
 set g_balance_rifle_primary_shots 1
-set g_balance_rifle_primary_damage 40
-set g_balance_rifle_primary_headshotaddeddamage 40
+set g_balance_rifle_primary_damage 80
 set g_balance_rifle_primary_spread 0
 set g_balance_rifle_primary_force 100
 set g_balance_rifle_primary_speed 40000
@@ -92,8 +91,7 @@ set g_balance_rifle_secondary 1
 set g_balance_rifle_secondary_reload 0
 set g_balance_rifle_secondary_tracer 0
 set g_balance_rifle_secondary_shots 4
-set g_balance_rifle_secondary_damage 10
-set g_balance_rifle_secondary_headshotaddeddamage 20
+set g_balance_rifle_secondary_damage 20
 set g_balance_rifle_secondary_spread 0.04
 set g_balance_rifle_secondary_force 50
 set g_balance_rifle_secondary_speed 20000
index 47d0e37d6a903f78268480795a1d1579d7fbe471..d7f65c6ecdc4369988dbca5f08c08618362f0859 100644 (file)
@@ -445,6 +445,7 @@ void Ent_ReadEntCS()
 
        entcs_receiver[self.sv_entnum] = self;
        self.entremove = Ent_RemoveEntCS;
+       self.iflags |= IFLAG_ORIGIN;
 
        InterpolateOrigin_Note();
 }
index ec4cc78f6a06da63fa26b78cc92a2d414d1575b2..ce7077e4369b9a5c24131edbeea9a91f59163f21 100644 (file)
@@ -158,7 +158,6 @@ void Announcer_Precache ()
        precache_sound (strcat("announcer/", autocvar_cl_announcer, "/yoda.wav"));
        precache_sound (strcat("announcer/", autocvar_cl_announcer, "/amazing.wav"));
        precache_sound (strcat("announcer/", autocvar_cl_announcer, "/awesome.wav"));
-       precache_sound (strcat("announcer/", autocvar_cl_announcer, "/headshot.wav"));
        precache_sound (strcat("announcer/", autocvar_cl_announcer, "/impressive.wav"));
 
        precache_sound (strcat("announcer/", autocvar_cl_announcer, "/prepareforbattle.wav"));
index cb4fa4f8176bb7981bd434f55baaa2998f4c1e62..c7f7e9f279dd8c7806da4a85de89c51f78ceb39b 100644 (file)
@@ -293,6 +293,8 @@ vector autocvar_hud_panel_radar_maximized_size;
 float autocvar_hud_panel_radar_rotation;
 float autocvar_hud_panel_radar_scale;
 float autocvar_hud_panel_radar_zoommode;
+float autocvar_hud_panel_radar_maximized_rotation;
+float autocvar_hud_panel_radar_maximized_zoommode;
 float autocvar_hud_panel_score;
 float autocvar_hud_panel_score_rankings;
 float autocvar_hud_panel_timer;
index 3b4c95c1620da79c509552d6e06bcf37e0729775..1f8306e7675f4609b13f75777821ff12ad27902f 100644 (file)
@@ -623,8 +623,8 @@ void CSQCModel_Hook_PreDraw(float isplayer)
                        }
                        else
                        {
-                               traceline(self.origin + '0 0 1' * self.maxs_z, self.origin + '0 0 1' * (self.mins_z - 4), MOVE_NOMONSTERS, self);
-                               if(trace_startsolid || trace_fraction < 1)
+                               tracebox(self.origin + '0 0 1', self.mins, self.maxs, self.origin - '0 0 1', MOVE_NORMAL, self);
+                               if(trace_fraction < 1 && trace_plane_normal_z > 0.7)
                                        onground = 1;
                        }
                        animdecide_init(self);
@@ -652,7 +652,7 @@ void CSQCModel_Hook_PreDraw(float isplayer)
                        CSQCModel_InterpolateAnimation_2To4_Do();
                        if(doblend)
                        {
-                               skeleton_from_frames(self);
+                               skeleton_from_frames(self, self.csqcmodel_isdead);
                        }
                        else
                        {
@@ -671,6 +671,8 @@ void CSQCModel_Hook_PreDraw(float isplayer)
 
 void CSQCModel_Hook_PreUpdate(float isnew, float isplayer, float islocalplayer)
 {
+       // interpolate v_angle
+       self.iflags |= IFLAG_V_ANGLE_X;
        // revert to values from server
        CSQCModel_Effects_PreUpdate();
        if(self.isplayermodel)
index 641d50d634fee10abbb0abacbef4d30943df4eb0..1c2894afa2bf1e00bd548260b33f6534729985a8 100644 (file)
@@ -226,7 +226,7 @@ void Ent_ReadHook(float bIsNew, float type)
        sf = ReadByte();
 
        self.HookSilent = (sf & 0x80);
-       self.iflags = IFLAG_VELOCITY;
+       self.iflags = IFLAG_VELOCITY | IFLAG_ORIGIN;
 
        InterpolateOrigin_Undo();
 
index 77516699ef58da836c9b428b1e9a90b311ba52c0..afa6f23da9c88865623443d1cc94364fa9d17662 100644 (file)
@@ -2387,10 +2387,6 @@ void HUD_Notify (void)
                        {
                                s = "notify_melee_shotgun";
                        }
-                       else if(type & HITTYPE_HEADSHOT && (w == WEP_RIFLE || w == WEP_MINSTANEX)) // all headshot weapons go here
-                       {
-                               s = "notify_headshot";
-                       }
                        else if(WEP_VALID(w))
                        {
                                self = get_weaponinfo(w);
@@ -2560,6 +2556,8 @@ void HUD_Radar(void)
 
        HUD_Panel_UpdateCvars(radar);
        HUD_Panel_ApplyFadeAlpha();
+       
+       float f = 0;
 
        if (hud_panel_radar_maximized && !autocvar__hud_configure)
        {
@@ -2571,6 +2569,62 @@ void HUD_Radar(void)
                
                panel_bg = strcat(hud_skin_path, "/border_default"); // always use the default border when maximized
                if(precache_pic(panel_bg) == "") { panel_bg = "gfx/hud/default/border_default"; } // fallback
+               
+               switch(hud_panel_radar_maximized_zoommode)
+               {
+                       default:
+                       case 0:
+                               f = current_zoomfraction;
+                               break;
+                       case 1:
+                               f = 1 - current_zoomfraction;
+                               break;
+                       case 2:
+                               f = 0;
+                               break;
+                       case 3:
+                               f = 1;
+                               break;
+               }
+               
+               switch(hud_panel_radar_maximized_rotation)
+               {
+                       case 0:
+                               teamradar_angle = view_angles_y - 90;
+                               break;
+                       default:
+                               teamradar_angle = 90 * hud_panel_radar_maximized_rotation;
+                               break;
+               }
+       }
+       if (!hud_panel_radar_maximized && !autocvar__hud_configure)
+       {
+               switch(hud_panel_radar_zoommode)
+               {
+                       default:
+                       case 0:
+                               f = current_zoomfraction;
+                               break;
+                       case 1:
+                               f = 1 - current_zoomfraction;
+                               break;
+                       case 2:
+                               f = 0;
+                               break;
+                       case 3:
+                               f = 1;
+                               break;
+               }
+               
+               switch(hud_panel_radar_rotation)
+               {
+                       case 0:
+                               teamradar_angle = view_angles_y - 90;
+                               break;
+                       default:
+                               teamradar_angle = 90 * hud_panel_radar_rotation;
+                               break;
+               }
        }
 
        vector pos, mySize;
@@ -2587,7 +2641,6 @@ void HUD_Radar(void)
        float color2;
        entity tm;
        float scale2d, normalsize, bigsize;
-       float f;
 
        teamradar_origin2d = pos + 0.5 * mySize;
        teamradar_size2d = mySize;
@@ -2597,40 +2650,13 @@ void HUD_Radar(void)
 
        teamradar_loadcvars();
 
-       switch(hud_panel_radar_zoommode)
-       {
-               default:
-               case 0:
-                       f = current_zoomfraction;
-                       break;
-               case 1:
-                       f = 1 - current_zoomfraction;
-                       break;
-               case 2:
-                       f = 0;
-                       break;
-               case 3:
-                       f = 1;
-                       break;
-       }
-
-       switch(hud_panel_radar_rotation)
-       {
-               case 0:
-                       teamradar_angle = view_angles_y - 90;
-                       break;
-               default:
-                       teamradar_angle = 90 * hud_panel_radar_rotation;
-                       break;
-       }
-
        scale2d = vlen_maxnorm2d(mi_picmax - mi_picmin);
        teamradar_size2d = mySize;
 
        teamradar_extraclip_mins = teamradar_extraclip_maxs = '0 0 0'; // we always center
 
        // pixels per world qu to match the teamradar_size2d_x range in the longest dimension
-       if(hud_panel_radar_rotation == 0)
+       if((hud_panel_radar_rotation == 0 && !hud_panel_radar_maximized) || (hud_panel_radar_maximized_rotation == 0 && hud_panel_radar_maximized))
        {
                // max-min distance must fit the radar in any rotation
                bigsize = vlen_minnorm2d(teamradar_size2d) * scale2d / (1.05 * vlen2d(mi_scale));
index da56e00cc20c8386ea5c6c9bbae32476752b648d..ea9fd93facb8c9af1bec780938ad681a3b573e4a 100644 (file)
@@ -131,6 +131,8 @@ void HUD_Panel_ExportCfg(string cfgname)
                                        HUD_Write_PanelCvar_q("_scale");
                                        HUD_Write_PanelCvar_q("_maximized_scale");
                                        HUD_Write_PanelCvar_q("_maximized_size");
+                                       HUD_Write_PanelCvar_q("_maximized_rotation");
+                                       HUD_Write_PanelCvar_q("_maximized_zoommode"); 
                                        break;
                                case HUD_PANEL_SCORE:
                                        HUD_Write_PanelCvar_q("_rankings");
index c5475d7a63a3cb738f1cb387930169794f233a6f..03ea99303297efc1605599b11fe622017fe60334 100644 (file)
@@ -76,9 +76,9 @@ void Ent_Laser()
        self.count = (f & 0xF0);
 
        if(self.count & 0x80)
-               self.iflags = IFLAG_VELOCITY;
+               self.iflags = IFLAG_VELOCITY | IFLAG_ORIGIN;
        else
-               self.iflags = IFLAG_ANGLES;
+               self.iflags = IFLAG_ANGLES | IFLAG_ORIGIN;
 
        if(f & 1)
        {
index 9e5505b0a5bb5c47c0b1af68e5ff225623332985..7edabdfc524bbcc5fecc5636d936e5bac72f0343 100644 (file)
@@ -574,19 +574,12 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
 const vector GETPLAYERORIGIN_ERROR = '1123581321 2357111317 3141592653'; // way out of bounds for anything on the map
 vector getplayerorigin(float pl)
 {
-       string s;
        entity e;
 
        e = CSQCModel_server2csqc(pl + 1);
        if(e)
                return e.origin;
 
-#ifndef NO_LEGACY_NETWORKING
-       s = getplayerkeyvalue(pl, "TEMPHACK_origin");
-       if(s != "")
-               return stov(s);
-#endif
-
        e = entcs_receiver[pl];
        if(e)
                return e.origin;
index fbbbb94a994f0a11d542f10981800db96aab80e0..7784fc1f693fe2bb54674220bb47c4ace5f57162 100644 (file)
@@ -19,8 +19,8 @@ void skeleton_loadinfo(entity e)
                e.bone_weapon = gettagindex(e, "bip01 r hand");
        for(i = 0; i < MAX_AIM_BONES; ++i)
        {
-               e.bone_aim[i] = 0;
-               e.bone_aimweight[i] = 0;
+               e.(bone_aim[i]) = 0;
+               e.(bone_aimweight[i]) = 0;
        }
        e.fixbone = 0;
        if(get_model_parameters(e.model, e.skin))
@@ -34,9 +34,9 @@ void skeleton_loadinfo(entity e)
                for(i = 0; i < MAX_AIM_BONES; ++i)
                {
                        if(get_model_parameters_bone_aim[i])
-                               e.bone_aim[i] = gettagindex(e, get_model_parameters_bone_aim[i]);
+                               e.(bone_aim[i]) = gettagindex(e, get_model_parameters_bone_aim[i]);
                        if(e.bone_aim[i])
-                               e.bone_aimweight[i] = get_model_parameters_bone_aimweight[i];
+                               e.(bone_aimweight[i]) = get_model_parameters_bone_aimweight[i];
                }
        }
        else
@@ -98,7 +98,7 @@ void free_skeleton_from_frames(entity e)
        }
 }
 
-void skeleton_from_frames(entity e)
+void skeleton_from_frames(entity e, float is_dead)
 {
        float i;
        float m = e.modelindex;
@@ -166,16 +166,19 @@ void skeleton_from_frames(entity e)
                skel_set_boneabs(s, e.bone_upperbody, org);
        }
 
-       for(i = 0; i < MAX_AIM_BONES; ++i)
+       if(!is_dead)
        {
-               if(e.bone_aim[i])
+               for(i = 0; i < MAX_AIM_BONES; ++i)
                {
-                       vector aim = '1 0 0' * bound(-90, self.v_angle_x, 90) * e.bone_aimweight[i];
-                       vector org = skel_get_boneabs(s, e.bone_aim[i]);
-                       vector ang_cur = fixedvectoangles2(v_forward, v_up);
-                       vector ang = AnglesTransform_Multiply(aim, ang_cur);
-                       fixedmakevectors(ang);
-                       skel_set_boneabs(s, e.bone_aim[i], org);
+                       if(e.(bone_aim[i]))
+                       {
+                               vector aim = '1 0 0' * bound(-90, self.v_angle_x, 90) * e.(bone_aimweight[i]);
+                               vector org = skel_get_boneabs(s, e.(bone_aim[i]));
+                               vector ang_cur = fixedvectoangles2(v_forward, v_up);
+                               vector ang = AnglesTransform_Multiply(aim, ang_cur);
+                               fixedmakevectors(ang);
+                               skel_set_boneabs(s, e.(bone_aim[i]), org);
+                       }
                }
        }
 }
index 047a15671f1e29e51417ee4cb3be37de5d1fa86f..d369bac4ec192db99f04978d17c38c28128015b4 100644 (file)
@@ -1,5 +1,5 @@
 void free_skeleton_from_frames(entity e);
-void skeleton_from_frames(entity e);
+void skeleton_from_frames(entity e, float is_dead);
 void skeleton_loadinfo(entity e);
 
 .float bone_upperbody;
index 25032806eb9df5029a3066f69eb5b4aacf643cde..fb4fdd5ef24e1fd245486a58d3a69ecf5fae33a8 100644 (file)
@@ -192,7 +192,7 @@ void Ent_Projectile()
 
        f = ReadByte();
        self.count = (f & 0x80);
-       self.iflags = (self.iflags & IFLAG_INTERNALMASK) | IFLAG_AUTOANGLES | IFLAG_ANGLES;
+       self.iflags = (self.iflags & IFLAG_INTERNALMASK) | IFLAG_AUTOANGLES | IFLAG_ANGLES | IFLAG_ORIGIN;
        self.solid = SOLID_TRIGGER;
        //self.effects = EF_NOMODELFLAGS;
 
index e5dcc00f2c911ffe2d650ed83007d309aa0f6f22..0c0f10204a4773c2da21e2aa6669a46a88d4740a 100644 (file)
@@ -172,6 +172,8 @@ float hud_panel_radar_foreground_alpha;
 float hud_panel_radar_rotation;
 noref vector hud_panel_radar_size; // fteqcc sucks
 float hud_panel_radar_zoommode;
+float hud_panel_radar_maximized_zoommode;
+float hud_panel_radar_maximized_rotation;
 
 void teamradar_loadcvars()
 {
@@ -185,6 +187,8 @@ void teamradar_loadcvars()
        hud_panel_radar_foreground_alpha = autocvar_hud_panel_radar_foreground_alpha * panel_fg_alpha;
        hud_panel_radar_rotation = autocvar_hud_panel_radar_rotation;
        hud_panel_radar_zoommode = autocvar_hud_panel_radar_zoommode;
+       hud_panel_radar_maximized_rotation = autocvar_hud_panel_radar_maximized_rotation;
+       hud_panel_radar_maximized_zoommode = autocvar_hud_panel_radar_maximized_zoommode;
 
        // others default to 0
        // match this to defaultXonotic.cfg!
@@ -203,7 +207,7 @@ void Ent_RadarLink()
 
        InterpolateOrigin_Undo();
 
-       self.iflags = IFLAG_VELOCITY;
+       self.iflags = IFLAG_VELOCITY | IFLAG_ORIGIN;
        self.classname = "radarlink";
 
        if(sendflags & 1)
index 3d5aa138ffb07f0689dd544db9919f1a9e092301..211af4cb0889593380acdfa9785149ae76a5d52d 100644 (file)
@@ -75,7 +75,7 @@ void Ent_Wall()
        var .vector fld;
 
        InterpolateOrigin_Undo();
-       self.iflags = IFLAG_ANGLES;
+       self.iflags = IFLAG_ANGLES | IFLAG_ORIGIN;
 
        if(self.bgmscriptangular)
                fld = angles;
index 39b60a66b0c767d1342bec2dcb5e8645d6cd332a..7e9b91d6b81d65daa657a544410ce25fb87e97f9 100644 (file)
@@ -656,6 +656,7 @@ void Ent_WaypointSprite()
        self.draw2d = Draw_WaypointSprite;
 
        InterpolateOrigin_Undo();
+       self.iflags |= IFLAG_ORIGIN;
 
        if(sendflags & 0x80)
        {
index 75f5a0bde762037387dbeb344989a47b1409bc01..cdc58cb55445fa99d28d899c5d5e3a464fab5f9e 100644 (file)
@@ -432,7 +432,7 @@ float DEATH_HITTYPEMASK = 0x1F00; // which is WAY below 10000 used for normal de
 float HITTYPE_SECONDARY = 0x100;
 float HITTYPE_SPLASH = 0x200; // automatically set by RadiusDamage
 float HITTYPE_BOUNCE = 0x400;
-float HITTYPE_HEADSHOT = 0x800; // automatically set by Damage (if headshotbonus is set)
+float HITTYPE_RESERVED2 = 0x800;
 float HITTYPE_RESERVED = 0x1000; // unused yet
 
 // macros to access these
index 3ade241aee26573fb11f19b203b20693cf24a894..a9ed986deef9e774a4a3c38b0eaaf50a30dfce82 100644 (file)
@@ -17,6 +17,9 @@
 # define TAG_ENTITY_TYPE entity
 #endif
 
+// new fields
+.vector v_angle;
+
 // add properties you want networked to CSQC here
 #define CSQCMODEL_EXTRAPROPERTIES \
        CSQCMODEL_PROPERTY(1, float, ReadShort, WriteShort, colormap) \
 //vector PL_CROUCH_VIEW_OFS  = ...;
 
 #ifdef SVQC
-# ifdef NO_LEGACY_NETWORKING
-#  define CSQCMODEL_AUTOINIT() CSQCModel_LinkEntity()
-#  define CSQCMODEL_AUTOUPDATE() CSQCModel_CheckUpdate()
-# else
-.float iscsqcmodel;
-float autocvar_sv_use_csqc_players;
-#  define CSQCMODEL_AUTOINIT() \
-       if(autocvar_sv_use_csqc_players) \
-       { \
-               CSQCModel_LinkEntity(); \
-               self.iscsqcmodel = 1; \
-       } \
-       else \
-               self.iscsqcmodel = 0
-#  define CSQCMODEL_AUTOUPDATE() \
-       if(autocvar_sv_use_csqc_players && !self.iscsqcmodel) \
-       { \
-               CSQCModel_LinkEntity(); \
-               self.iscsqcmodel = 1; \
-       } \
-       if(!autocvar_sv_use_csqc_players && self.iscsqcmodel) \
-       { \
-               CSQCModel_UnlinkEntity(); \
-               self.iscsqcmodel = 0; \
-       } \
-       if(self.iscsqcmodel) \
-               CSQCModel_CheckUpdate()
-# endif
+# define CSQCMODEL_AUTOINIT() CSQCModel_LinkEntity()
+# define CSQCMODEL_AUTOUPDATE() CSQCModel_CheckUpdate()
 #endif
 
 #define CSQCMODEL_EF_RESPAWNGHOST EF_SELECTABLE
index 85e2f15ee99ca82f51732b0ff8ca4faaaf09d61b..c4882d8d20c0c4da5a28e87a02adf6e22d7db6c7 100644 (file)
@@ -182,7 +182,6 @@ void CSQCModel_Draw()
        if(!CSQCPlayer_IsLocalPlayer())
                InterpolateOrigin_Do();
 
-       // TODO csqcplayers: run prediction here too
        CSQCModel_InterpolateAnimation_Do();
 
        { CSQCMODEL_HOOK_PREDRAW }
@@ -212,6 +211,7 @@ void CSQCModel_Read(float isnew)
        local noref float isnolocalplayer = (isplayer && (self.entnum != player_localnum + 1));
 
        self.classname = "csqcmodel";
+       self.iflags |= IFLAG_ORIGIN; // interpolate origin too
        self.iflags |= IFLAG_ANGLES; // interpolate angles too
        self.iflags |= IFLAG_VELOCITY | IFLAG_AUTOVELOCITY; // let's calculate velocity automatically
 
index f77f9512623e099cea3f7f4fecff98e762e5019c..2711867dbc445cb68f9930c4a81600d9d3601d14 100644 (file)
@@ -213,6 +213,11 @@ void CSQCPlayer_SetCamera()
                }
                else
                {
+                       float flg = self.iflags;
+                       self.iflags &~= IFLAG_ORIGIN | IFLAG_ANGLES;
+                       InterpolateOrigin_Do();
+                       self.iflags = flg;
+
                        if(csqcplayer_status == CSQCPLAYERSTATUS_FROMSERVER)
                        {
                                vector o, v;
index 2ed78fbd8c3b92247ecae15a36525358e9a2f7f7..c1626f816e3b395cb70fa9da1c0e07737ccb1ae0 100644 (file)
@@ -24,6 +24,8 @@
 .vector ivelocity1, ivelocity2;
 .vector iforward1, iforward2;
 .vector iup1, iup2;
+.vector ivforward1, ivforward2;
+.vector ivup1, ivup2;
 .float itime1, itime2;
 void InterpolateOrigin_Reset()
 {
@@ -43,8 +45,11 @@ void InterpolateOrigin_Note()
        else
                self.iflags |= IFLAG_PREVALID;
 
-       self.iorigin1 = self.iorigin2;
-       self.iorigin2 = self.origin;
+       if(self.iflags & IFLAG_ORIGIN)
+       {
+               self.iorigin1 = self.iorigin2;
+               self.iorigin2 = self.origin;
+       }
 
        if(self.iflags & IFLAG_AUTOANGLES)
                if(self.iorigin2 != self.iorigin1)
@@ -71,6 +76,28 @@ void InterpolateOrigin_Note()
                self.iup2 = v_up;
        }
 
+       if(self.iflags & IFLAG_V_ANGLE)
+       {
+               fixedmakevectors(self.v_angle);
+               if(f0 & IFLAG_VALID)
+               {
+                       self.ivforward1 = self.ivforward2;
+                       self.ivup1 = self.ivup2;
+               }
+               else
+               {
+                       self.ivforward1 = v_forward;
+                       self.ivup1 = v_up;
+               }
+               self.ivforward2 = v_forward;
+               self.ivup2 = v_up;
+       }
+       else if(self.iflags & IFLAG_V_ANGLE_X)
+       {
+               self.ivforward1_x = self.ivforward2_x;
+               self.ivforward2_x = self.v_angle_x;
+       }
+
        if(self.iflags & IFLAG_VELOCITY)
        {
                self.ivelocity1 = self.ivelocity2;
@@ -107,22 +134,36 @@ void InterpolateOrigin_Do()
        {
                float f;
                f = bound(0, (time - self.itime1) / (self.itime2 - self.itime1), 1 + autocvar_cl_lerpexcess);
-               self.origin = (1 - f) * self.iorigin1 + f * self.iorigin2;
+               if(self.iflags & IFLAG_ORIGIN)
+                       setorigin(self, (1 - f) * self.iorigin1 + f * self.iorigin2);
                if(self.iflags & IFLAG_ANGLES)
                {
                        forward = (1 - f) * self.iforward1 + f * self.iforward2;
                        up = (1 - f) * self.iup1 + f * self.iup2;
                        self.angles = fixedvectoangles2(forward, up);
                }
+               if(self.iflags & IFLAG_V_ANGLE)
+               {
+                       forward = (1 - f) * self.ivforward1 + f * self.ivforward2;
+                       up = (1 - f) * self.ivup1 + f * self.ivup2;
+                       self.v_angle = fixedvectoangles2(forward, up);
+               }
+               else if(self.iflags & IFLAG_V_ANGLE_X)
+                       self.v_angle_x = (1 - f) * self.ivforward1_x + f * self.ivforward2_x;
                if(self.iflags & IFLAG_VELOCITY)
                        self.velocity = (1 - f) * self.ivelocity1 + f * self.ivelocity2;
        }
 }
 void InterpolateOrigin_Undo()
 {
-       setorigin(self, self.iorigin2);
+       if(self.iflags & IFLAG_ORIGIN)
+               setorigin(self, self.iorigin2);
        if(self.iflags & IFLAG_ANGLES)
                self.angles = fixedvectoangles2(self.iforward2, self.iup2);
+       if(self.iflags & IFLAG_V_ANGLE)
+               self.v_angle = fixedvectoangles2(self.ivforward2, self.ivup2);
+       else if(self.iflags & IFLAG_V_ANGLE_X)
+               self.v_angle_x = self.ivforward2_x;
        if(self.iflags & IFLAG_VELOCITY)
                self.velocity = self.ivelocity2;
 }
index c69c90dde9f53f9dcd1eea3587c463a59baf8eab..66bf491e57dd745378e9d939bf65b80e88d4d80e 100644 (file)
@@ -28,6 +28,9 @@
 #define IFLAG_PREVALID 16
 #define IFLAG_TELEPORTED 32
 #define IFLAG_AUTOVELOCITY 64
+#define IFLAG_V_ANGLE 128
+#define IFLAG_V_ANGLE_X 256
+#define IFLAG_ORIGIN 512
 #define IFLAG_INTERNALMASK (IFLAG_VALID | IFLAG_PREVALID)
 
 // call this BEFORE reading an entity update
@@ -41,3 +44,6 @@ void InterpolateOrigin_Reset();
 
 // call this BEFORE drawing
 void InterpolateOrigin_Do();
+
+// in case we interpolate that:
+.vector v_angle;
index 25b0fcb191d6ab2e41922c8ef9a63715a085077e..c55d4d488ba4ebcf37f2fd096fcf27a81e5c79ba 100644 (file)
@@ -37,12 +37,6 @@ void XonoticModelDialog_fill(entity me)
                        e.configureXonoticTextSliderValues(e);
                        setDependent(e, "cl_gentle", 0, 0);
        me.TR(me);
-       #ifdef ALLOW_FORCEMODELS
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Force models:")));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, string_null, string_null, ZCTX(_("MDL^None"))));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodelsfromxonotic", string_null, ZCTX(_("MDL^Custom"))));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodels", string_null, ZCTX(_("MDL^All"))));
-       #endif
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayermodels", _("Force player models to mine")));
        me.TR(me);
index c37481b9763763ea066f942639a01604a7f0e050..b5af66126f7fbec2e6b6d3b93c77077eaa678cbf 100644 (file)
@@ -244,7 +244,7 @@ void MapList_All(entity btn, entity me)
 {
        float i;
        string s;
-       MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MAPINFO_FLAG_FORBIDDEN | MAPINFO_FLAG_HIDDEN, 0); // all
+       MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MapInfo_ForbiddenFlags(), 0); // all
        s = "";
        for(i = 0; i < MapInfo_count; ++i)
                s = strcat(s, " ", MapInfo_BSPName_ByID(i));
index 7747e0dffe5431a3c53e96c25e329805e02d0681..08a6297ad44cf21e793edfc86e4949bb474dd0e4 100644 (file)
@@ -94,7 +94,6 @@ float autocvar_g_balance_rifle_primary_bullethail;
 float autocvar_g_balance_rifle_primary_burstcost;
 float autocvar_g_balance_rifle_primary_damage;
 float autocvar_g_balance_rifle_primary_force;
-float autocvar_g_balance_rifle_primary_headshotaddeddamage;
 float autocvar_g_balance_rifle_primary_lifetime;
 float autocvar_g_balance_rifle_primary_refire;
 float autocvar_g_balance_rifle_primary_shots;
@@ -109,7 +108,6 @@ float autocvar_g_balance_rifle_secondary_bullethail;
 float autocvar_g_balance_rifle_secondary_burstcost;
 float autocvar_g_balance_rifle_secondary_damage;
 float autocvar_g_balance_rifle_secondary_force;
-float autocvar_g_balance_rifle_secondary_headshotaddeddamage;
 float autocvar_g_balance_rifle_secondary_lifetime;
 float autocvar_g_balance_rifle_secondary_reload;
 float autocvar_g_balance_rifle_secondary_refire;
@@ -704,7 +702,6 @@ float autocvar_g_balance_uzi_burst_spread;
 float autocvar_g_balance_uzi_first;
 float autocvar_g_balance_uzi_first_ammo;
 float autocvar_g_balance_uzi_first_damage;
-float autocvar_g_balance_uzi_first_headshotaddeddamage;
 float autocvar_g_balance_uzi_first_force;
 float autocvar_g_balance_uzi_first_refire;
 float autocvar_g_balance_uzi_first_spread;
@@ -715,7 +712,6 @@ float autocvar_g_balance_uzi_spread_max;
 float autocvar_g_balance_uzi_spread_min;
 float autocvar_g_balance_uzi_sustained_ammo;
 float autocvar_g_balance_uzi_sustained_damage;
-float autocvar_g_balance_uzi_sustained_headshotaddeddamage;
 float autocvar_g_balance_uzi_sustained_force;
 float autocvar_g_balance_uzi_sustained_refire;
 float autocvar_g_balance_uzi_sustained_spread;
index 1078eea1308df0c90c4d2f00b07710568894a118..be5138c92d41af91bc93571431ac9f6df2757582 100644 (file)
@@ -618,8 +618,11 @@ void FixPlayermodel()
                self.skin = stof(self.playerskin);
        }
 
-       if(chmdl || oldskin != self.skin)
-               self.species = player_getspecies(); // model or skin has changed
+       if(chmdl || oldskin != self.skin) // model or skin has changed
+       {
+               self.species = player_getspecies(); // update species
+               UpdatePlayerSounds(); // update skin sounds
+       }
 
        if(!teamplay)
                if(strlen(autocvar_sv_defaultplayercolors))
@@ -2660,10 +2663,6 @@ void PlayerPreThink (void)
 
                if(frametime)
                {
-#ifndef NO_LEGACY_NETWORKING
-                       self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;
-#endif
-
                        if(self.weapon == WEP_NEX && autocvar_g_balance_nex_charge)
                        {
                                self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
@@ -2965,18 +2964,6 @@ Called every frame for each client after the physics are run
 =============
 */
 .float idlekick_lasttimeleft;
-.entity showheadshotbbox;
-void showheadshotbbox_think()
-{
-       if(self.owner.showheadshotbbox != self)
-       {
-               remove(self);
-               return;
-       }
-       self.nextthink = time;
-       setorigin(self, self.owner.origin);
-       setsize(self, GetHeadshotMins(self.owner), GetHeadshotMaxs(self.owner));
-}
 void PlayerPostThink (void)
 {
        // Savage: Check for nameless players
@@ -3066,27 +3053,6 @@ void PlayerPostThink (void)
        if(self.waypointsprite_attachedforcarrier)
                WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent));
 
-       if(self.classname == "player" && self.deadflag == DEAD_NO && autocvar_r_showbboxes)
-       {
-               if(!self.showheadshotbbox)
-               {
-                       self.showheadshotbbox = spawn();
-                       self.showheadshotbbox.classname = "headshotbbox";
-                       self.showheadshotbbox.owner = self;
-                       self.showheadshotbbox.think = showheadshotbbox_think;
-                       self.showheadshotbbox.nextthink = time;
-                       self = self.showheadshotbbox;
-                       self.think();
-                       self = self.owner;
-               }
-       }
-       else
-       {
-               if(self.showheadshotbbox)
-                       if(self.showheadshotbbox && !wasfreed(self.showheadshotbbox))
-                remove(self.showheadshotbbox);
-       }
-
        playerdemo_write();
 
        if((g_cts || g_race) && self.cvar_cl_allow_uidtracking == 1 && self.cvar_cl_allow_uid2name == 1)
index 03347a9c86d2cb718abae96a77c1eb855feb38a6..e81b08e58e73094a76f7c8c3e0fc1d84b757140a 100644 (file)
@@ -252,11 +252,6 @@ void player_anim (void)
        animdecide_setstate(self, animbits, FALSE);
        animdecide_setimplicitstate(self, (self.flags & FL_ONGROUND));
 
-#ifndef NO_LEGACY_NETWORKING
-       if(!self.iscsqcmodel)
-               animdecide_setframes(self, FALSE, frame, frame1time, frame2, frame2time);
-#endif
-
        if (self.weaponentity)
        {
                updateanim(self.weaponentity);
index ca01caf9ca3098c855a0d716c01fdba697488ad4..2f3eeaa4f3994f3f976dc1fc567dd21efaebb6e7 100644 (file)
@@ -253,8 +253,6 @@ float nJoinAllowed(entity ignore);
 
 .entity flagcarried;
 
-.entity lastrocket;
-
 .float playerid;
 float playerid_last;
 .float noalign;                // if set to 1, the item or spawnpoint won't be dropped to the floor
@@ -277,11 +275,6 @@ float default_weapon_alpha;
 .string cvar_g_xonoticversion;
 .string cvar_cl_weaponpriority;
 .string cvar_cl_weaponpriorities[10];
-#ifdef ALLOW_FORCEMODELS
-.float cvar_cl_forceplayermodels;
-.float cvar_cl_forceplayermodelsfromxonotic;
-float sv_clforceplayermodels;
-#endif
 .float cvar_cl_gunalign;
 .float cvar_cl_noantilag;
 
@@ -552,7 +545,13 @@ float client_cefc_accumulatortime;
 .float clip_load;
 .float old_clip_load;
 .float clip_size;
+
+.entity lastrocket;
 .float minelayer_mines;
+.float nex_charge;
+.float nex_charge_rottime;
+.float nex_chargepool_ammo;
+.float hagar_load;
 
 .float grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
 
@@ -589,12 +588,6 @@ string deathmessage;
 .void (float act_state) setactive;
 .entity realowner;
 
-.float nex_charge;
-.float nex_charge_rottime;
-.float nex_chargepool_ammo;
-
-.float hagar_load;
-
 float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended)
 
 float serverflags;
index a3eeefb73033ce71cfa2532ce575378af314904e..e779ff45357bce54c3907b5aced103c70b308738 100644 (file)
@@ -47,8 +47,6 @@ float checkrules_firstblood;
 float yoda;
 float damage_goodhits;
 float damage_gooddamage;
-float headshot;
-float damage_headshotbonus; // bonus multiplier for head shots, set to 0 after use
 
 .float dmg_team;
 .float teamkill_complain;
@@ -86,15 +84,6 @@ float IsFlying(entity a)
        return 1;
 }
 
-vector GetHeadshotMins(entity targ)
-{
-       return '-0.5 0 0' * PL_HEAD_x + '0 -0.5 0' * PL_HEAD_y + '0 0 1' * (targ.maxs_z - PL_HEAD_z);
-}
-vector GetHeadshotMaxs(entity targ)
-{
-       return '0.5 0 0' * PL_HEAD_x + '0 0.5 0' * PL_HEAD_y + '0 0 1' * targ.maxs_z;
-}
-
 void UpdateFrags(entity player, float f)
 {
        PlayerTeamScore_AddScore(player, f);
@@ -538,7 +527,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 {
        float mirrordamage;
        float mirrorforce;
-       float teamdamage0;
+       float complainteamdamage = 0; 
        entity attacker_save;
        mirrordamage = 0;
        mirrorforce = 0;
@@ -618,10 +607,10 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                        {
                                                if(targ.classname == "player" && targ.deadflag == DEAD_NO)
                                                {
-                                                       teamdamage0 = max(attacker.dmg_team, autocvar_g_teamdamage_threshold);
                                                        attacker.dmg_team = attacker.dmg_team + damage;
-                                                       if(attacker.dmg_team > teamdamage0 && !g_ca)
-                                                               mirrordamage = autocvar_g_mirrordamage * (attacker.dmg_team - teamdamage0);
+                                                       complainteamdamage = attacker.dmg_team - autocvar_g_teamdamage_threshold;
+                                                       if(complainteamdamage > 0 && !g_ca) // FIXME why is g_ca ruled out here? Why not just g_mirrordamage 0 on CA servers?
+                                                               mirrordamage = autocvar_g_mirrordamage * complainteamdamage;
                                                        mirrorforce = autocvar_g_mirrordamage * vlen(force);
                                                        if(g_minstagib)
                                                        {
@@ -696,6 +685,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                        {
                                damage = 0;
                                mirrordamage = 0;
+                               complainteamdamage = 0;
                                if (targ != attacker)
                                {
                                        if ((targ.health >= 1) && (targ.classname == "player"))
@@ -711,6 +701,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                {
                        damage *= g_weapondamagefactor;
                        mirrordamage *= g_weapondamagefactor;
+                       complainteamdamage *= g_weapondamagefactor;
                        force = force * g_weaponforcefactor;
                        mirrorforce *= g_weaponforcefactor;
                }
@@ -792,31 +783,6 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                if(targ.takedamage == DAMAGE_AIM)
                if(targ != attacker)
                {
-                       if(damage_headshotbonus)
-                       {
-                               if(targ.classname == "player")
-                               {
-                                       // HEAD SHOT:
-                                       // find height of hit on player axis
-                                       // if above view_ofs and below maxs, and also in the middle half of the bbox, it is head shot
-                                       vector headmins, headmaxs, org;
-                                       org = antilag_takebackorigin(targ, time - ANTILAG_LATENCY(attacker));
-                                       headmins = org + GetHeadshotMins(targ);
-                                       headmaxs = org + GetHeadshotMaxs(targ);
-                                       if(trace_hits_box(railgun_start, railgun_end, headmins, headmaxs))
-                                       {
-                                               deathtype |= HITTYPE_HEADSHOT;
-                                       }
-                               }
-                               else if(targ.classname == "turret_head")
-                               {
-                                       deathtype |= HITTYPE_HEADSHOT;
-                               }
-                               if(deathtype & HITTYPE_HEADSHOT)
-                                       if(damage_headshotbonus > 0)
-                                               damage *= 1 + damage_headshotbonus;
-                       }
-
                        entity victim;
                        if((targ.vehicle_flags & VHF_ISVEHICLE) && targ.owner)
                                victim = targ.owner;
@@ -850,9 +816,6 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                                        if(g_minstagib)
                                                        if(victim.items & IT_STRENGTH)
                                                                yoda = 1;
-
-                                                       if(deathtype & HITTYPE_HEADSHOT)
-                                                               headshot = 1;
                                                }
                                        }
                                }
@@ -862,7 +825,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                        {
                                                attacker.typehitsound += 1;
                                        }
-                                       if(mirrordamage > 0)
+                                       if(complainteamdamage > 0)
                                                if(time > attacker.teamkill_complain)
                                                {
                                                        attacker.teamkill_complain = time + 5;
index 680afbc8909a2ffeaa9d3880a0bf48f5ad16aba6..d67ef26eba5ca4904655eab2fb73fd0e0c08f549 100644 (file)
@@ -340,9 +340,6 @@ void cvar_changes_init()
                BADCVAR("gameversion");
                BADPREFIX("gameversion_");
                BADCVAR("sv_namechangetimer");
-#ifndef NO_LEGACY_NETWORKING
-               BADCVAR("sv_use_csqc_players"); // transition
-#endif
 
                // allowed changes to server admins (please sync this to server.cfg)
                // vi commands:
@@ -841,7 +838,7 @@ void spawnfunc_worldspawn (void)
        for(i = 0, j = 0; i < MapInfo_count; ++i)
        {
                if(MapInfo_Get_ByID(i))
-                       if not(MapInfo_Map_flags & (MAPINFO_FLAG_HIDDEN | MAPINFO_FLAG_FORBIDDEN))
+                       if not(MapInfo_Map_flags & MapInfo_ForbiddenFlags())
                        {
                                if(mod(i, 2))
                                        col = "^2";
index e8972ca8e4c75c317bbfceea7495d2e80451abaa..e3689cc3d3337d7ced4df19b02ab9c6053b50697 100644 (file)
@@ -574,10 +574,6 @@ void GetCvars(float f)
        self.cvar_cl_accuracy_data_share = boolean(self.cvar_cl_accuracy_data_share);
        self.cvar_cl_accuracy_data_receive = boolean(self.cvar_cl_accuracy_data_receive);
 
-#ifdef ALLOW_FORCEMODELS
-       GetCvars_handleFloat(s, f, cvar_cl_forceplayermodels, "cl_forceplayermodels");
-       GetCvars_handleFloat(s, f, cvar_cl_forceplayermodelsfromxonotic, "cl_forceplayermodelsfromxonotic");
-#endif
        GetCvars_handleFloatOnce(s, f, cvar_cl_gunalign, "cl_gunalign");
        GetCvars_handleFloat(s, f, cvar_cl_allow_uid2name, "cl_allow_uid2name");
        GetCvars_handleFloat(s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking");
@@ -1164,10 +1160,6 @@ void readlevelcvars(void)
     g_touchexplode_edgedamage = cvar("g_touchexplode_edgedamage");
     g_touchexplode_force = cvar("g_touchexplode_force");
 
-#ifdef ALLOW_FORCEMODELS
-       sv_clforceplayermodels = cvar("sv_clforceplayermodels");
-#endif
-
        sv_clones = cvar("sv_clones");
        sv_gentle = cvar("sv_gentle");
        sv_foginterval = cvar("sv_foginterval");
index f96d3b93cc79911ba5e7036da81f49a92858f6ec..9358cd7baf1bff223a7e90334e52ba02e690900f 100644 (file)
@@ -5,7 +5,7 @@ void turret_machinegun_attack();
 //.float bulletcounter;
 void turret_machinegun_attack()
 {
-    fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET_MACHINEGUN, 0, 1, autocvar_g_balance_uzi_bulletconstant);
+    fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, self.shot_force, DEATH_TURRET_MACHINEGUN, 0, 1, autocvar_g_balance_uzi_bulletconstant);
     endFireBallisticBullet();
 
     UziFlash();
index 041c16929ebdd16b18a232649b36468e5325cd34..4bd1d0760b96128192ebeb0f585f9fb44b3a8515 100644 (file)
@@ -515,7 +515,7 @@ void walker_postthink()
 void walker_attack()
 {
     sound (self, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
-    fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET_WALKER_GUN, 0, 1, autocvar_g_balance_uzi_bulletconstant);
+    fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, self.shot_speed, 5, self.shot_dmg, self.shot_force, DEATH_TURRET_WALKER_GUN, 0, 1, autocvar_g_balance_uzi_bulletconstant);
     endFireBallisticBullet();
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 }
index 9bbdd096a259e609b5aa3bfdb46cc485f7393569..de12407f558d9347c561ef77e8339ca3b35536f9 100644 (file)
@@ -495,10 +495,10 @@ float spiderbot_frame()
             v_forward = normalize(v_forward);
             v += v_forward * 50;
 
-//void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float headshotbonus, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant)
+//void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant)
 
             fireBallisticBullet(v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_speed,
-                                5, autocvar_g_vehicle_spiderbot_minigun_damage, 0, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_SBMINIGUN, 0, 1, autocvar_g_vehicle_spiderbot_minigun_bulletconstant);
+                                5, autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_SBMINIGUN, 0, 1, autocvar_g_vehicle_spiderbot_minigun_bulletconstant);
             endFireBallisticBullet();
 
 //            fireBullet (v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_damage,
index bbd9c647bcc8f578e6f5cd0a1e09652f281620ef..67f5b3356b056b0d63c071877068247b87376897 100644 (file)
@@ -167,7 +167,6 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
        trace_dphitq3surfaceflags = endq3surfaceflags;
 }
 
-.float dmg_edge;
 .float dmg_force;
 .float dmg_radius;
 .float dmg_total;
@@ -185,24 +184,14 @@ void W_BallisticBullet_Hit (void)
        {
                endzcurveparticles();
 
-               headshot = 0;
                yoda = 0;
-               damage_headshotbonus = self.dmg_edge * f;
                railgun_start = self.origin - 2 * frametime * self.velocity;
                railgun_end = self.origin + 2 * frametime * self.velocity;
                g = accuracy_isgooddamage(self.realowner, other);
                Damage(other, self, self.realowner, self.dmg * f, self.projectiledeathtype, self.origin, self.dmg_force * normalize(self.velocity) * f);
-               damage_headshotbonus = 0;
 
-               if(headshot)
-                       f *= q;
-               if(self.dmg_edge > 0)
-               {
-                       if(headshot)
-                               AnnounceTo(self.realowner, "headshot");
-                       if(yoda)
-                               AnnounceTo(self.realowner, "awesome");
-               }
+               if(yoda)
+                       AnnounceTo(self.realowner, "awesome");
 
                // calculate hits for ballistic weapons
                if(g)
@@ -398,7 +387,7 @@ void fireBallisticBullet_trace_callback(vector start, vector hit, vector end)
        self.owner = world;
 }
 
-void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float headshotbonus, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant)
+void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant)
 {
        float lag, dt, savetime; //, density;
        entity pl, oldself;
@@ -434,7 +423,6 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f
 
        proj.touch = W_BallisticBullet_Touch;
        proj.dmg = damage;
-       proj.dmg_edge = headshotbonus;
        proj.dmg_force = force;
        proj.projectiledeathtype = dtype;
 
index 02557ad94e0da5db1a889ed76bb4abc2afe2fd7a..508a8ba1a04123726fcc8b4ce490ed684f1404ef 100644 (file)
@@ -234,7 +234,7 @@ void W_Firemine_Touch (void)
 {
        PROJECTILE_TOUCH;
        if (other.takedamage == DAMAGE_AIM)
-       if(Fire_AddDamage(other, self.realowner, autocvar_g_balance_fireball_secondary_damage, autocvar_g_balance_fireball_secondary_damagetime, self.projectiledeathtype | HITTYPE_HEADSHOT) >= 0)
+       if(Fire_AddDamage(other, self.realowner, autocvar_g_balance_fireball_secondary_damage, autocvar_g_balance_fireball_secondary_damagetime, self.projectiledeathtype) >= 0)
        {
                remove(self);
                return;
@@ -410,10 +410,7 @@ float w_fireball(float req)
        {
                if(w_deathtype & HITTYPE_SECONDARY)
                {
-                       if(w_deathtype & HITTYPE_HEADSHOT)
-                               w_deathtypestring = _("%s tried to catch %s's firemine");
-                       else
-                               w_deathtypestring = _("%s fatefully ignored %s's firemine");
+                       w_deathtypestring = _("%s fatefully ignored %s's firemine");
                }
                else
                {
index 1b4f7c6cd06aa232811c06b67617006ba6f031d2..85ffa6399ff0555edb84717ee346f4c56e37c10e 100644 (file)
@@ -5,6 +5,7 @@ REGISTER_WEAPON(MINE_LAYER, w_minelayer, IT_ROCKETS, 4, WEP_FLAG_MUTATORBLOCKED
 void W_Mine_Think (void);
 .float minelayer_detonate, mine_explodeanyway;
 .float mine_time;
+.vector mine_orientation;
 
 void spawnfunc_weapon_minelayer (void)
 {
@@ -31,7 +32,7 @@ void W_Mine_Stick (entity to)
        setmodel(newmine, "models/mine.md3");
        newmine.angles = vectoangles(-trace_plane_normal); // face against the surface
 
-       newmine.oldvelocity = self.velocity;
+       newmine.mine_orientation = -trace_plane_normal;
 
        newmine.takedamage = self.takedamage;
        newmine.damageforcescale = self.damageforcescale;
@@ -95,7 +96,7 @@ void W_Mine_DoRemoteExplode ()
        self.takedamage = DAMAGE_NO;
 
        if(self.movetype == MOVETYPE_NONE || self.movetype == MOVETYPE_FOLLOW)
-               self.velocity = self.oldvelocity;
+               self.velocity = self.mine_orientation; // particle fx and decals need .velocity
 
        RadiusDamage (self, self.realowner, autocvar_g_balance_minelayer_remote_damage, autocvar_g_balance_minelayer_remote_edgedamage, autocvar_g_balance_minelayer_remote_radius, world, autocvar_g_balance_minelayer_remote_force, self.projectiledeathtype | HITTYPE_BOUNCE, world);
 
@@ -153,7 +154,7 @@ float W_Mine_Count(entity e)
        entity mine;
        for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.realowner == e)
                minecount += 1;
-               
+
        return minecount;
 }
 
@@ -225,7 +226,12 @@ void W_Mine_Touch (void)
        if(self.movetype == MOVETYPE_NONE || self.movetype == MOVETYPE_FOLLOW)
                return; // we're already a stuck mine, why do we get called? TODO does this even happen?
 
-       PROJECTILE_TOUCH;
+       if(WarpZone_Projectile_Touch())
+       {
+               if(wasfreed(self))
+                       self.realowner.minelayer_mines -= 1;
+               return;
+       }
 
        if(other && other.classname == "player" && other.deadflag == DEAD_NO)
        {
@@ -263,8 +269,7 @@ void W_Mine_Attack (void)
        // scan how many mines we placed, and return if we reached our limit
        if(autocvar_g_balance_minelayer_limit)
        {
-       
-               if(W_Mine_Count(self) >= autocvar_g_balance_minelayer_limit)
+               if(self.minelayer_mines >= autocvar_g_balance_minelayer_limit)
                {
                        // the refire delay keeps this message from being spammed
                        sprint(self, strcat("minelayer: You cannot place more than ^2", ftos(autocvar_g_balance_minelayer_limit), " ^7mines at a time\n") );
@@ -355,7 +360,10 @@ float w_minelayer(float req)
        if (req == WR_AIM)
        {
                // aim and decide to fire if appropriate
-               self.BUTTON_ATCK = bot_aim(autocvar_g_balance_minelayer_speed, 0, autocvar_g_balance_minelayer_lifetime, FALSE);
+               if(self.minelayer_mines >= autocvar_g_balance_minelayer_limit)
+                       self.BUTTON_ATCK = FALSE;
+               else
+                       self.BUTTON_ATCK = bot_aim(autocvar_g_balance_minelayer_speed, 0, autocvar_g_balance_minelayer_lifetime, FALSE);
                if(skill >= 2) // skill 0 and 1 bots won't detonate mines!
                {
                        // decide whether to detonate mines
@@ -505,6 +513,10 @@ float w_minelayer(float req)
                else
                        return FALSE;
        }
+       else if (req == WR_RESETPLAYER)
+       {
+               self.minelayer_mines = 0;
+       }
        else if (req == WR_RELOAD)
        {
                W_Reload(autocvar_g_balance_minelayer_ammo, autocvar_g_balance_minelayer_reload_ammo, autocvar_g_balance_minelayer_reload_time, "weapons/reload.wav");
index a2d3b988734a6d75e9ff2c3fd3db737573821e30..4031ca8a9d14e53a2bf47569a253237b6dc2f319 100644 (file)
@@ -14,10 +14,7 @@ void W_MinstaNex_Attack (void)
 
        yoda = 0;
        damage_goodhits = 0;
-       headshot = 0;
-       damage_headshotbonus = -1; // no extra damage, just count
        FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, 10000, 800, 0, 0, 0, 0, WEP_MINSTANEX);
-       damage_headshotbonus = 0;
 
        if(g_minstagib)
        {
@@ -28,10 +25,6 @@ void W_MinstaNex_Attack (void)
        {
                if(yoda && flying)
                        AnnounceTo(self, "yoda");
-               if(headshot)
-               {
-                       AnnounceTo(self, "headshot");
-               }
                if(damage_goodhits && self.minstanex_lasthit)
                {
                        AnnounceTo(self, "impressive");
index 1c5f766d7dbf2240ce03ee0bce3e149db4c48489..f707bbd6525aacfdf2dc239ae7445b27ab257136 100644 (file)
@@ -5,13 +5,13 @@ REGISTER_WEAPON(RIFLE, w_rifle, IT_NAILS, 7, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_
 
 .float rifle_accumulator;
 
-void W_Rifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant, float pTracer, float pShots, string pSound)
+void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant, float pTracer, float pShots, string pSound)
 {
        float i;
 
        W_DecreaseAmmo(ammo_nails, pAmmo, autocvar_g_balance_rifle_reload_ammo);
 
-       W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, pSound, CH_WEAPON_A, (pDamage + pHeadshotAddedDamage) * pShots);
+       W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, pSound, CH_WEAPON_A, pDamage * pShots);
 
        pointparticles(particleeffectnum("rifle_muzzleflash"), w_shotorg, w_shotdir * 2000, 1);
 
@@ -22,7 +22,7 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage
        }
 
        for(i = 0; i < pShots; ++i)
-               fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (pTracer ? EF_RED : EF_BLUE), 1, pBulletConstant);
+               fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pForce, deathtype, (pTracer ? EF_RED : EF_BLUE), 1, pBulletConstant);
        endFireBallisticBullet();
 
        if (autocvar_g_casings >= 2)
@@ -31,12 +31,12 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage
 
 void W_Rifle_Attack()
 {
-       W_Rifle_FireBullet(autocvar_g_balance_rifle_primary_spread, autocvar_g_balance_rifle_primary_damage, autocvar_g_balance_rifle_primary_headshotaddeddamage, autocvar_g_balance_rifle_primary_force, autocvar_g_balance_rifle_primary_speed, autocvar_g_balance_rifle_primary_lifetime, autocvar_g_balance_rifle_primary_ammo, WEP_RIFLE, autocvar_g_balance_rifle_primary_bulletconstant, autocvar_g_balance_rifle_primary_tracer, autocvar_g_balance_rifle_primary_shots, "weapons/campingrifle_fire.wav");
+       W_Rifle_FireBullet(autocvar_g_balance_rifle_primary_spread, autocvar_g_balance_rifle_primary_damage, autocvar_g_balance_rifle_primary_force, autocvar_g_balance_rifle_primary_speed, autocvar_g_balance_rifle_primary_lifetime, autocvar_g_balance_rifle_primary_ammo, WEP_RIFLE, autocvar_g_balance_rifle_primary_bulletconstant, autocvar_g_balance_rifle_primary_tracer, autocvar_g_balance_rifle_primary_shots, "weapons/campingrifle_fire.wav");
 }
 
 void W_Rifle_Attack2()
 {
-       W_Rifle_FireBullet(autocvar_g_balance_rifle_secondary_spread, autocvar_g_balance_rifle_secondary_damage, autocvar_g_balance_rifle_secondary_headshotaddeddamage, autocvar_g_balance_rifle_secondary_force, autocvar_g_balance_rifle_secondary_speed, autocvar_g_balance_rifle_secondary_lifetime, autocvar_g_balance_rifle_secondary_ammo, WEP_RIFLE | HITTYPE_SECONDARY, autocvar_g_balance_rifle_secondary_bulletconstant, autocvar_g_balance_rifle_secondary_tracer, autocvar_g_balance_rifle_secondary_shots, "weapons/campingrifle_fire2.wav");
+       W_Rifle_FireBullet(autocvar_g_balance_rifle_secondary_spread, autocvar_g_balance_rifle_secondary_damage, autocvar_g_balance_rifle_secondary_force, autocvar_g_balance_rifle_secondary_speed, autocvar_g_balance_rifle_secondary_lifetime, autocvar_g_balance_rifle_secondary_ammo, WEP_RIFLE | HITTYPE_SECONDARY, autocvar_g_balance_rifle_secondary_bulletconstant, autocvar_g_balance_rifle_secondary_tracer, autocvar_g_balance_rifle_secondary_shots, "weapons/campingrifle_fire2.wav");
 }
 
 void spawnfunc_weapon_rifle (void)
@@ -243,17 +243,9 @@ float w_rifle(float req)
                else
                {
                        if(w_deathtype & HITTYPE_BOUNCE)
-                       {
-                               // TODO special headshot message here too?
                                w_deathtypestring = _("%s failed to hide from %s's rifle");
-                       }
                        else
-                       {
-                               if(w_deathtype & HITTYPE_HEADSHOT)
-                                       w_deathtypestring = _("%s got shot in the head with a rifle by %s");
-                               else
-                                       w_deathtypestring = _("%s was sniped with a rifle by %s");
-                       }
+                               w_deathtypestring = _("%s was sniped with a rifle by %s");
                }
        }
        return TRUE;
index 975449f5d10c723c5fb765204c66641ae277e0c8..cd9088e03a54a4d9910f94b4bd074f0b43f71657 100644 (file)
@@ -427,7 +427,7 @@ void Seeker_Tag_Touch()
        te_knightspike(org2);
 
        self.event_damage = func_null;
-       Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_HEADSHOT, other.species, self);
+       Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_BOUNCE | HITTYPE_SECONDARY, other.species, self);
 
        if (other.takedamage == DAMAGE_AIM && other.deadflag == DEAD_NO)
        {
@@ -624,21 +624,24 @@ float w_seeker(float req)
                org2 = w_org + w_backoff * 6;
                if(w_deathtype & HITTYPE_BOUNCE)
                {
-                       pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
-                       if(!w_issilent)
+                       if(w_deathtype & HITTYPE_SECONDARY)
                        {
-                               if (w_random<0.15)
-                                       sound(self, CH_SHOTS, "weapons/tagexp1.wav", 1, ATTN_NORM);
-                               else if (w_random<0.7)
-                                       sound(self, CH_SHOTS, "weapons/tagexp2.wav", 1, ATTN_NORM);
-                               else
-                                       sound(self, CH_SHOTS, "weapons/tagexp3.wav", 1, ATTN_NORM);
+                               if(!w_issilent)
+                                       sound(self, CH_SHOTS, "weapons/tag_impact.wav", 1, ATTN_NORM);
+                       }
+                       else
+                       {
+                               pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+                               if(!w_issilent)
+                               {
+                                       if (w_random<0.15)
+                                               sound(self, CH_SHOTS, "weapons/tagexp1.wav", 1, ATTN_NORM);
+                                       else if (w_random<0.7)
+                                               sound(self, CH_SHOTS, "weapons/tagexp2.wav", 1, ATTN_NORM);
+                                       else
+                                               sound(self, CH_SHOTS, "weapons/tagexp3.wav", 1, ATTN_NORM);
+                               }
                        }
-               }
-               else if(w_deathtype & HITTYPE_HEADSHOT)
-               {
-                       if(!w_issilent)
-                               sound(self, CH_SHOTS, "weapons/tag_impact.wav", 1, ATTN_NORM);
                }
                else
                {
index fdfa6af382c27a48347689016cc92a161cb9c36d..a4d4139700d8315d7d0afa53c88095590a0588a1 100644 (file)
@@ -27,7 +27,7 @@ void W_Shotgun_Attack (void)
 
        W_SetupShot (self, autocvar_g_antilag_bullets && bulletspeed >= autocvar_g_antilag_bullets, 5, "weapons/shotgun_fire.wav", CH_WEAPON_A, d * bullets);
        for (sc = 0;sc < bullets;sc = sc + 1)
-               fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, 0, f, WEP_SHOTGUN, 0, 1, bulletconstant);
+               fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, f, WEP_SHOTGUN, 0, 1, bulletconstant);
        endFireBallisticBullet();
 
        pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 1000, autocvar_g_balance_shotgun_primary_ammo);
index 5f2dc5adbbf1a4ab01eb7ff64e06f2f8c0533e63..d8d53f2bf4927065df81df3f2a750c4296bae899 100644 (file)
@@ -290,8 +290,6 @@ void W_Tuba_NoteOn(float hittype)
                hittype |= HITTYPE_SECONDARY;
        if(self.tuba_instrument & 2)
                hittype |= HITTYPE_BOUNCE;
-       if(self.tuba_instrument & 4)
-               hittype |= HITTYPE_HEADSHOT;
 
        if(self.tuba_note)
        {
@@ -447,8 +445,6 @@ float w_tuba(float req)
                        instr |= 1;
                if(w_deathtype & HITTYPE_BOUNCE)
                        instr |= 2;
-               if(w_deathtype & HITTYPE_HEADSHOT)
-                       instr |= 4;
                switch(instr)
                {
                        default:
@@ -471,8 +467,6 @@ float w_tuba(float req)
                        instr |= 1;
                if(w_deathtype & HITTYPE_BOUNCE)
                        instr |= 2;
-               if(w_deathtype & HITTYPE_HEADSHOT)
-                       instr |= 4;
                switch(instr)
                {
                        default:
index 77d8b4aee562215cec57fa4a1021857d41be4ca0..525beeacaafa846b49279d945be8def74aedce61 100644 (file)
@@ -52,9 +52,9 @@ void W_UZI_Attack (float deathtype)
        ATTACK_FINISHED(self) = time + autocvar_g_balance_uzi_first_refire * W_WeaponRateFactor();
 
        if (self.misc_bulletcounter == 1)
-               fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_first_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_first_damage, autocvar_g_balance_uzi_first_headshotaddeddamage, autocvar_g_balance_uzi_first_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant);
+               fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_first_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_first_damage, autocvar_g_balance_uzi_first_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant);
        else
-               fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_sustained_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_headshotaddeddamage, autocvar_g_balance_uzi_sustained_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant);
+               fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_sustained_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant);
        endFireBallisticBullet();
 
        pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
@@ -126,7 +126,7 @@ void uzi_mode1_fire_auto()
        }
 
        uzi_spread = bound(autocvar_g_balance_uzi_spread_min, autocvar_g_balance_uzi_spread_min + (autocvar_g_balance_uzi_spread_add * self.misc_bulletcounter), autocvar_g_balance_uzi_spread_max);
-       fireBallisticBullet(w_shotorg, w_shotdir, uzi_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_headshotaddeddamage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, 1, autocvar_g_balance_uzi_bulletconstant);
+       fireBallisticBullet(w_shotorg, w_shotdir, uzi_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, 1, autocvar_g_balance_uzi_bulletconstant);
        endFireBallisticBullet();
 
        self.misc_bulletcounter = self.misc_bulletcounter + 1;
@@ -152,7 +152,7 @@ void uzi_mode1_fire_burst()
                self.punchangle_y = random () - 0.5;
        }
 
-       fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_burst_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_headshotaddeddamage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, 1, autocvar_g_balance_uzi_bulletconstant);
+       fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_burst_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, 1, autocvar_g_balance_uzi_bulletconstant);
        endFireBallisticBullet();