From: Mario Date: Thu, 7 Mar 2013 06:22:48 +0000 (+1100) Subject: Merge branch 'master' into mario/mutator_minstagib X-Git-Tag: xonotic-v0.7.0~55^2~3^2~22 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b2c2d31803d0620b3af3cb1e792cfbd60732155f;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into mario/mutator_minstagib --- b2c2d31803d0620b3af3cb1e792cfbd60732155f diff --cc qcsrc/server/cl_client.qc index 19588c0b3,356d444c0..a2ee7ece3 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@@ -404,11 -404,14 +404,12 @@@ void PutObserverInServer (void DropAllRunes(self); MUTATOR_CALLHOOK(MakePlayerObserver); - minstagib_stop_countdown(self); - Portal_ClearAll(self); - + if(self.alivetime) { - PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime); + if(!inWarmupStage) + PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime); self.alivetime = 0; } diff --cc qcsrc/server/g_damage.qc index f014ed3d5,e86b148bc..859e52ae0 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@@ -618,12 -661,17 +661,12 @@@ void Damage (entity targ, entity inflic { 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) - { - if(autocvar_g_friendlyfire == 0) - damage = 0; - } - else if(g_ca) + if(g_ca) damage = 0; else damage = autocvar_g_friendlyfire * damage; @@@ -809,8 -866,10 +828,14 @@@ if(IsFlying(victim)) yoda = 1; ++<<<<<<< HEAD + if(deathtype & HITTYPE_HEADSHOT) + headshot = 1; ++======= + if(g_minstagib) + if(victim.items & IT_STRENGTH) + yoda = 1; ++>>>>>>> master } } } diff --cc qcsrc/server/g_world.qc index 313814c3e,894ffd615..3762e003e --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@@ -932,11 -939,12 +932,9 @@@ void spawnfunc_worldspawn (void modname = cvar_string("g_mod_balance"); if(cvar_string("g_mod_config") != cvar_defstring("g_mod_config")) modname = cvar_string("g_mod_config"); - // weird mutators that deserve to count as mod - if(autocvar_g_minstagib) - modname = "MinstaGib"; // extra mutators that deserve to count as mod MUTATOR_CALLHOOK(SetModname); - // weird game types that deserve to count as mod - if(g_cts) - modname = "CTS"; + // save it for later modname = strzone(modname); diff --cc qcsrc/server/t_items.qc index 3a0c0d12e,2ff925ca5..9e66df92b --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@@ -600,7 -614,72 +600,7 @@@ float Item_GiveTo(entity item, entity p // if nothing happens to player, just return without taking the item pickedup = FALSE; _switchweapon = FALSE; - + - if (g_minstagib) - { - float prevcells = player.ammo_cells; - - pickedup |= Item_GiveAmmoTo(item, player, ammo_fuel, g_pickup_fuel_max, ITEM_MODE_FUEL); - pickedup |= Item_GiveAmmoTo(item, player, ammo_cells, 999, ITEM_MODE_NONE); - - if(player.ammo_cells > prevcells) - { - _switchweapon = TRUE; - - // play some cool sounds ;) - if (clienttype(player) == CLIENTTYPE_REAL) - { - if(player.health <= 5) - AnnounceTo(player, "lastsecond"); - else if(player.health < 50) - AnnounceTo(player, "narrowly"); - } - // sound not available - // else if(item.items == IT_CELLS) - // AnnounceTo(player, "ammo"); - - if (WEPSET_CONTAINS_EW(item, WEP_MINSTANEX)) - W_GiveWeapon (player, WEP_MINSTANEX); - player.health = 100; - } - - if((it = (item.items - (item.items & player.items)) & IT_PICKUPMASK)) - { - pickedup = TRUE; - player.items |= it; - sprint (player, strcat("You got the ^2", item.netname, "\n")); - } - - // extralife powerup - if (item.max_health) - { - pickedup = TRUE; - // sound not available - // AnnounceTo(player, "_lives"); - player.armorvalue = bound(player.armorvalue, 999, player.armorvalue + autocvar_g_minstagib_extralives); - sprint(player, "^3You picked up some extra lives\n"); - } - - // invis powerup - if (item.strength_finished) - { - pickedup = TRUE; - // sound not available - // AnnounceTo(player, "invisible"); - player.strength_finished = max(player.strength_finished, time) + autocvar_g_balance_powerup_strength_time; - } - - // speed powerup - if (item.invincible_finished) - { - pickedup = TRUE; - // sound not available - // AnnounceTo(player, "speed"); - player.invincible_finished = max(player.invincible_finished, time) + autocvar_g_balance_powerup_invincible_time; - } - } - else - { // in case the player has autoswitch enabled do the following: // if the player is using their best weapon before items are given, they // probably want to switch to an even better weapon after items are given diff --cc qcsrc/server/w_common.qc index 9bae1b7ba,e68a417e0..d755f68df --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@@ -11,12 -11,9 +11,8 @@@ void W_GiveWeapon (entity e, float wep oldself = self; self = e; - if (other.classname == "player") - { - sprint (other, "You got the ^2"); - sprint (other, name); - sprint (other, "\n"); - } - if not(g_minstagib) + if(other.classname == "player") + { Send_Notification(NOTIF_ONE, other, MSG_MULTI, ITEM_WEAPON_GOT, wep); } self = oldself; } diff --cc qcsrc/server/w_minstanex.qc index 68d129168,c464af93a..041ed3caf --- a/qcsrc/server/w_minstanex.qc +++ b/qcsrc/server/w_minstanex.qc @@@ -14,21 -14,22 +14,21 @@@ 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(yoda && flying) - AnnounceTo(self, "yoda"); - if(g_minstagib) + if(headshot) { - if(yoda) - AnnounceTo(self, "yoda"); + AnnounceTo(self, "headshot"); } - else + if(damage_goodhits && self.minstanex_lasthit) { - AnnounceTo(self, "impressive"); - damage_goodhits = 0; // only every second time + if(yoda && flying) + AnnounceTo(self, "yoda"); + if(damage_goodhits && self.minstanex_lasthit) + { + AnnounceTo(self, "impressive"); + damage_goodhits = 0; // only every second time + } } self.minstanex_lasthit = damage_goodhits;