From: Mario Date: Thu, 5 Mar 2015 08:01:18 +0000 (+1100) Subject: Some junk X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7d539a78a9d87ffc5d03902906e52f2adf3153fa;p=xonotic%2Fxonotic-data.pk3dir.git Some junk --- diff --git a/qcsrc/common/jeff.qh b/qcsrc/common/jeff.qh index 15bd633b7..e21c469b9 100644 --- a/qcsrc/common/jeff.qh +++ b/qcsrc/common/jeff.qh @@ -2,51 +2,57 @@ #define JEFF_H #define JEFF_ANCE_NOTIF \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BIOHAZARD, CH_INFO, "biohazard", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BLAZEOFGLORY, CH_INFO, "blazeofglory", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BLUESTREAK, CH_INFO, "bluestreak", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BOTTOMFEEDER, CH_INFO, "bottomfeeder", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BULLSEYE, CH_INFO, "bullseye", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_COMBOKING, CH_INFO, "comboking", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_DENIED, CH_INFO, "denied", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_DOUBLEKILL, CH_INFO, "doublekill", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_EAGLEEYE, CH_INFO, "eagleeye", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BOOSTER, CH_INFO, "booster", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BIOHAZARD, CH_INFO, "biohazard", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BLAZEOFGLORY, CH_INFO, "blazeofglory", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BLUESTREAK, CH_INFO, "bluestreak", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BOTTOMFEEDER, CH_INFO, "bottomfeeder", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_BULLSEYE, CH_INFO, "bullseye", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_CAMOUFLAGED, CH_INFO, "camouflaged", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_COMBOKING, CH_INFO, "comboking", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_DENIED, CH_INFO, "denied", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_DOUBLEKILL, CH_INFO, "doublekill", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_EAGLEEYE, CH_INFO, "eagleeye", VOL_BASEVOICE, ATTEN_NONE) \ MSG_ANNCE_NOTIF(1, ANNCE_JEFF_FIRSTBLOOD, CH_INFO, "firstblood", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_FLAKMASTER, CH_INFO, "flakmaster", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_GAMEOVER, CH_INFO, "gameover", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_GODLIKE, CH_INFO, "godlike", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_GUNSLINGER, CH_INFO, "gunslinger", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_HATTRICK, CH_INFO, "hattrick", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_HIJACKED, CH_INFO, "hijacked", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_HITANDRUN, CH_INFO, "hitandrun", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_HOLY, CH_INFO, "holyshit", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_HUMILIATION, CH_INFO, "humiliation", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_JACKHAMMER, CH_INFO, "jackhammer", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_JUGGERNAUT, CH_INFO, "juggernaut", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_LUDICROUSKILL, CH_INFO, "ludicrouskill", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_MANSLAUGHTER, CH_INFO, "vehicularmanslaughter", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_MEGAKILL, CH_INFO, "megakill", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_MONSTERKILL, CH_INFO, "monsterkill", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_MULTIKILL, CH_INFO, "multikill", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_MUTDESTRUCT, CH_INFO, "mutualdestruction", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_NODEBUSTER, CH_INFO, "nodebuster", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_OUTSTANDING, CH_INFO, "outstanding", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_NUKEMHOLY, CH_INFO, "nukemholy", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_PANCAKE, CH_INFO, "pancake", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_PAYBACK, CH_INFO, "payback", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_REJECTED, CH_INFO, "rejected", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_RETRIBUTION, CH_INFO, "retribution", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_ROCKETSCIENTIST, CH_INFO, "rocketscientist", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_ROADKILL, CH_INFO, "roadkill", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_ROADRAGE, CH_INFO, "roadrage", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_ROADRAMPAGE, CH_INFO, "roadrampage", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_SHAFTMASTER, CH_INFO, "shaftmaster", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_SLACKER, CH_INFO, "slacker", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_SPEED, CH_INFO, "speed", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_TEAMKILLER, CH_INFO, "teamkiller", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_TOPGUN, CH_INFO, "topgun", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_ULTRAKILL, CH_INFO, "ultrakill", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_VENGEANCE, CH_INFO, "vengeance", VOL_BASEVOICE, ATTEN_NONE) \ - MSG_ANNCE_NOTIF(1, ANNCE_JEFF_WICKEDSICK, CH_INFO, "wickedsick", VOL_BASEVOICE, ATTEN_NONE) + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_FLAKMASTER, CH_INFO, "flakmaster", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_GAMEOVER, CH_INFO, "gameover", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_GODLIKE, CH_INFO, "godlike", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_GUNSLINGER, CH_INFO, "gunslinger", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_HATTRICK, CH_INFO, "hattrick", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_HIJACKED, CH_INFO, "hijacked", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_HITANDRUN, CH_INFO, "hitandrun", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_HOLY, CH_INFO, "holyshit", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_HUMILIATION, CH_INFO, "humiliation", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_INSTAGIB, CH_INFO, "instagib", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_VAMPIRE, CH_INFO, "vampire", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_JACKHAMMER, CH_INFO, "jackhammer", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_JUGGERNAUT, CH_INFO, "juggernaut", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_LUDICROUSKILL, CH_INFO, "ludicrouskill", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_MANSLAUGHTER, CH_INFO, "vehicularmanslaughter", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_MEGAKILL, CH_INFO, "megakill", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_MONSTERKILL, CH_INFO, "monsterkill", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_MULTIKILL, CH_INFO, "multikill", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_MUTDESTRUCT, CH_INFO, "mutualdestruction", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_NODEBUSTER, CH_INFO, "nodebuster", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_OUTSTANDING, CH_INFO, "outstanding", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_NUKEMHOLY, CH_INFO, "nukemholy", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_PANCAKE, CH_INFO, "pancake", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_PAYBACK, CH_INFO, "payback", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_REJECTED, CH_INFO, "rejected", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_RETRIBUTION, CH_INFO, "retribution", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_ROCKETSCIENTIST, CH_INFO, "rocketscientist", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_ROADKILL, CH_INFO, "roadkill", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_ROADRAGE, CH_INFO, "roadrage", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_ROADRAMPAGE, CH_INFO, "roadrampage", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_SHAFTMASTER, CH_INFO, "shaftmaster", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_SLACKER, CH_INFO, "slacker", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_SPEED, CH_INFO, "speed", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_TEAMKILLER, CH_INFO, "teamkiller", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_TOPGUN, CH_INFO, "topgun", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_ULTRAKILL, CH_INFO, "ultrakill", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_VENGEANCE, CH_INFO, "vengeance", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_WICKEDSICK, CH_INFO, "wickedsick", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_WRECKER, CH_INFO, "wrecker", VOL_BASEVOICE, ATTEN_NONE) \ + MSG_ANNCE_NOTIF(1, ANNCE_JEFF_EXCELLENT, CH_INFO, "excellent", VOL_BASEVOICE, ATTEN_NONE) #endif diff --git a/qcsrc/server/jeff.qc b/qcsrc/server/jeff.qc index e422c4ce5..e4f256e30 100644 --- a/qcsrc/server/jeff.qc +++ b/qcsrc/server/jeff.qc @@ -3,50 +3,52 @@ #include "../common/buffs.qh" #include "miscfunctions.qh" -var float autocvar_jeff_announce_eagleeye_distance = 32768; -var float autocvar_jeff_announce_rocketscientist_count = 5; -var float autocvar_jeff_announce_shaftmaster_count = 5; -var float autocvar_jeff_announce_flakmaster_count = 5; -var float autocvar_jeff_announce_jackhammer_count = 5; -var float autocvar_jeff_announce_nodebuster_count = 5; -var float autocvar_jeff_announce_mutdestruct_time = 1.5; -var float autocvar_jeff_announce_multikill_time = 0.6; -var float autocvar_jeff_announce_roadrage_count = 6; -var float autocvar_jeff_announce_roadrampage_count = 12; -var float autocvar_jeff_announce_manslaughter_count = 20; -var float autocvar_jeff_announce_hattrick_count = 50; -var float autocvar_jeff_announce_denied_radius = 60; -var float autocvar_jeff_announce_bottomfeeder_count = 20; -var float autocvar_jeff_announce_wickedsick_count = 3; -var float autocvar_jeff_announce_bluestreak_distance = 400; -var float autocvar_jeff_announce_holy_distance = 800; -var float autocvar_jeff_announce_hitandrun_speed = 1000; -var float autocvar_jeff_announce_juggernaut_armor = 180; -var float autocvar_jeff_announce_juggernaut_health = 170; -var float autocvar_jeff_announce_slacker_time = 30; -var float autocvar_jeff_announce_comboking_count = 30; - -.float rocketkill_count; // counter for rocket scientist -.float arckill_count; // counter for shaft master -.float hagarkill_count; // counter for flak master -.float meleekill_count; // counter for flak master -.float electrokill_count; // counter for flak master -.float vkill_count; // counter for vehicle kills -.float minipickup_count; // counter for bottom feeder - -.float lastkiller_weapon; +float autocvar_jeff_announce_eagleeye_distance = 32768; +int autocvar_jeff_announce_rocketscientist_count = 5; +int autocvar_jeff_announce_shaftmaster_count = 5; +int autocvar_jeff_announce_flakmaster_count = 5; +int autocvar_jeff_announce_jackhammer_count = 5; +int autocvar_jeff_announce_nodebuster_count = 5; +float autocvar_jeff_announce_mutdestruct_time = 1.5; +float autocvar_jeff_announce_multikill_time = 0.6; +int autocvar_jeff_announce_roadrage_count = 6; +int autocvar_jeff_announce_roadrampage_count = 12; +int autocvar_jeff_announce_manslaughter_count = 20; +int autocvar_jeff_announce_hattrick_count = 50; +float autocvar_jeff_announce_denied_radius = 60; +int autocvar_jeff_announce_bottomfeeder_count = 20; +int autocvar_jeff_announce_wickedsick_count = 3; +float autocvar_jeff_announce_bluestreak_distance = 400; +float autocvar_jeff_announce_holy_distance = 800; +float autocvar_jeff_announce_hitandrun_speed = 1000; +float autocvar_jeff_announce_juggernaut_armor = 180; +float autocvar_jeff_announce_juggernaut_health = 170; +float autocvar_jeff_announce_slacker_time = 30; +int autocvar_jeff_announce_comboking_count = 30; +int autocvar_jeff_announce_wrecker_count = 30; + +.int rocketkill_count; // counter for rocket scientist +.int arckill_count; // counter for shaft master +.int hagarkill_count; // counter for flak master +.int meleekill_count; // counter for flak master +.int electrokill_count; // counter for flak master +.int vkill_count; // counter for vehicle kills +.int minipickup_count; // counter for bottom feeder +.int nadekill_count; // counter for wrecker + +.int lastkiller_weapon; .float lastkiller_time; .float lastkilled_time; .float lastkilled_flying; // actually a counter -.float jeff_weaponswitch_count; +.int jeff_weaponswitch_count; -.float annce_count; +.int annce_count; .float last_announcer; -float Fire_IsBurning(entity e); // defined later +bool Fire_IsBurning(entity e); // defined later -void jeff_Announcer_Send(entity player, float toall, float announce) +void jeff_Announcer_Send(entity player, bool toall, int announce) { if(player == world || !IS_PLAYER(player)) { return; } if(player.last_announcer > time) { return; } @@ -118,6 +120,9 @@ void jeff_Announcer_PlayerDies(entity attacker, float deathtype, entity targ, en break; } + if(deathtype == DEATH_NADE) { attacker.nadekill_count ++ 1; } + else { attacker.nadekill_count = 0; } + if(DEATH_ISWEAPON(deathtype, WEP_DEVASTATOR)) { attacker.rocketkill_count += 1; } else { attacker.rocketkill_count = 0; } @@ -279,8 +284,14 @@ void jeff_Announcer_PlayerDies(entity attacker, float deathtype, entity targ, en if(targ_flying && attacker_flying && (DEATH_ISWEAPON(deathtype, WEP_HAGAR) || DEATH_ISWEAPON(deathtype, WEP_SEEKER) || DEATH_ISWEAPON(deathtype, WEP_CRYLINK))) jeff_Announcer_Send(attacker, false, ANNCE_JEFF_OUTSTANDING); - if(targ.buffs & BUFF_SPEED) - jeff_Announcer_Send(attacker, true, ANNCE_JEFF_SPEED); + if(time - targ.spawnshieldtime <= 5) + jeff_Announcer_Send(attacker, false, ANNCE_JEFF_INSTAGIB); + + if(attacker.nadekill_count == autocvar_jeff_announce_wrecker_count && deathtype == DEATH_NADE) + jeff_Announcer_Send(attacker, false, ANNCE_JEFF_WRECKER); + + if(targ_flying && attacker_flying && DEATH_ISWEAPON(deathtype, WEP_FLAK)) + jeff_Announcer_Send(attacker, false, ANNCE_JEFF_EXCELLENT); attacker.jeff_weaponswitch_count = 0; @@ -322,6 +333,21 @@ void jeff_Announcer_FireBullet(entity targ, entity ent, vector hitloc, vector st jeff_Announcer_Send(ent, false, ANNCE_JEFF_BULLSEYE); } +void jeff_Annoncer_BuffPickup(entity player, entity item) +{ + if(item.buffs & BUFF_INVISIBLE) + jeff_Announcer_Send(player, true, ANNCE_JEFF_CAMOUFLAGED); + + if(item.buffs & BUFF_VAMPIRE) + jeff_Announcer_Send(player, true, ANNCE_JEFF_VAMPIRE); + + if(item.buffs & BUFF_BASH) + jeff_Announcer_Send(player, true, ANNCE_JEFF_BOOSTER); + + if(item.buffs & BUFF_SPEED) + jeff_Announcer_Send(player, true, ANNCE_JEFF_SPEED); +} + #else void jeff_Announcer_PlayerDies(entity attacker, float deathtype, entity targ, entity inflictor) { } @@ -329,5 +355,6 @@ void jeff_Announcer_MatchEnd() { } void jeff_Announcer_VehicleEnter(entity player, entity veh) { } void jeff_Announcer_ItemTouch(entity player, entity item) { } void jeff_Announcer_FireBullet(entity targ, entity ent, vector hitloc, vector start, vector end) { } +void jeff_Annoncer_BuffPickup(entity player, entity item) { } #endif diff --git a/qcsrc/server/jeff.qh b/qcsrc/server/jeff.qh index a0ad2f749..c5e1e45b9 100644 --- a/qcsrc/server/jeff.qh +++ b/qcsrc/server/jeff.qh @@ -11,4 +11,6 @@ void jeff_Announcer_ItemTouch(entity player, entity item); void jeff_Announcer_FireBullet(entity targ, entity ent, vector hitloc, vector start, vector end); +void jeff_Annoncer_BuffPickup(entity player, entity item); + #endif \ No newline at end of file diff --git a/qcsrc/server/mutators/mutator_buffs.qc b/qcsrc/server/mutators/mutator_buffs.qc index 84b400dae..f710e89c5 100644 --- a/qcsrc/server/mutators/mutator_buffs.qc +++ b/qcsrc/server/mutators/mutator_buffs.qc @@ -175,6 +175,8 @@ void buff_Touch() Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(self), '0 0 0', 1); sound(other, CH_TRIGGER, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM); other.buffs |= (self.buffs); + + jeff_Annoncer_BuffPickup(other, self); } float buff_Available(float buffid)