X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_common.qc;h=e68a417e00de6855f4bbfce117ce244b4de3a5f1;hb=332b1bfac54491c16e6ef8a806fcc1d5dd768ef6;hp=a2f23956eed6f4f3f7b0389d523e8062555fb2d1;hpb=e16c21c64c076a70c353b56f0e24b93af3eb3978;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index a2f23956e..e68a417e0 100644 --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@ -1,5 +1,5 @@ -void W_GiveWeapon (entity e, float wep, string name) +void W_GiveWeapon (entity e, float wep) { entity oldself; @@ -12,12 +12,8 @@ void W_GiveWeapon (entity e, float wep, string name) self = e; if not(g_minstagib) - if (other.classname == "player") - { - sprint (other, "You got the ^2"); - sprint (other, name); - sprint (other, "\n"); - } + if(other.classname == "player") + { Send_Notification(NOTIF_ONE, other, MSG_MULTI, ITEM_WEAPON_GOT, wep); } self = oldself; } @@ -167,7 +163,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 +180,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) @@ -229,7 +214,7 @@ void W_BallisticBullet_LeaveSolid_think() self.think = self.W_BallisticBullet_LeaveSolid_think_save; self.nextthink = max(time, self.W_BallisticBullet_LeaveSolid_nextthink_save); - self.W_BallisticBullet_LeaveSolid_think_save = SUB_Null; + self.W_BallisticBullet_LeaveSolid_think_save = func_null; self.flags &~= FL_ONGROUND; @@ -339,7 +324,7 @@ float W_BallisticBullet_LeaveSolid(float eff) void W_BallisticBullet_Touch (void) { - float density; + //float density; if(self.think == W_BallisticBullet_LeaveSolid_think) // skip this! return; @@ -398,9 +383,9 @@ 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; + float lag, dt, savetime; //, density; entity pl, oldself; float antilagging; @@ -434,7 +419,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; @@ -628,7 +612,7 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp void W_PrepareExplosionByDamage(entity attacker, void() explode) { self.takedamage = DAMAGE_NO; - self.event_damage = SUB_Null; + self.event_damage = func_null; if((attacker.flags & FL_CLIENT) && !autocvar_g_projectiles_keep_owner) {