X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fserver%2Fw_common.qc;h=d755f68dfc7dbb182b52f7e8c970b3e84eb896f4;hb=b2c2d31803d0620b3af3cb1e792cfbd60732155f;hp=a2f23956eed6f4f3f7b0389d523e8062555fb2d1;hpb=14d52331c099f8ad672f5ab28ada4dc50243230c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index a2f23956e..d755f68df 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; @@ -11,13 +11,8 @@ void W_GiveWeapon (entity e, float wep, string name) oldself = self; 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 +162,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 +179,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 +213,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 +323,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 +382,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 +418,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 +611,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) {