if(histime < 0)
return strcat(col, cpname);
else if(hisname == "")
- return strcat(col, sprintf(_("%s (%s)")), cpname, timestr);
+ return strcat(col, sprintf(_("%s (%s)"), cpname, timestr));
else
- return strcat(col, sprintf(_("%s (%s %s)")), cpname, timestr, strcat(hisname, col, lapstr));
+ return strcat(col, sprintf(_("%s (%s %s)"), cpname, timestr, strcat(hisname, col, lapstr)));
}
// Check if the given name already exist in race rankings? In that case, where? (otherwise return 0)
switch(l)
{
case "bckills": return CTX(_("SCO^bckills"));
+ case "bctime": return CTX(_("SCO^bctime"));
case "caps": return CTX(_("SCO^caps"));
case "deaths": return CTX(_("SCO^deaths"));
case "destroyed": return CTX(_("SCO^destroyed"));
print(_("^3frags^7 kills - suicides\n"));
print(_("^3kd^7 The kill-death ratio\n"));
print(_("^3caps^7 How often a flag (CTF) or a key (KeyHunt) was captured\n"));
- print(_("^3pickups^7 How often a flag (CTF) or a key (KeyHunt) was picked up\n"));
+ print(_("^3pickups^7 How often a flag (CTF) or a key (KeyHunt) or a ball (Keepaway) was picked up\n"));
print(_("^3fckills^7 Number of flag carrier kills\n"));
print(_("^3returns^7 Number of flag returns\n"));
print(_("^3drops^7 Number of flag drops\n"));
print(_("^3fastest^7 Time of fastest lap (race/cts)\n"));
print(_("^3ticks^7 Number of ticks (DOM)\n"));
print(_("^3takes^7 Number of domination points taken (DOM)\n"));
+ print(_("^3bckills^7 Number of ball carrier kills\n"));
+ print(_("^3bctime^7 Total amount of time holding the ball in Keepaway\n"));
print(_("^3score^7 Total score\n\n"));
print(_("Before a field you can put a + or - sign, then a comma separated list\n"
"+lms/lives +lms/rank ",
"+kh/caps +kh/pushes +kh/destroyed ",
"?+race/laps ?+race/time ?+race/fastest ",
- "+as/objectives +nexball/faults +nexball/goals +ka/drops +ka/pickups +ka/bckills +ka/time +freezetag/revivals ",
+ "+as/objectives +nexball/faults +nexball/goals +ka/pickups +ka/bckills +ka/bctime +freezetag/revivals ",
"-lms,race,nexball/score");
}
e.model2 = strzone(strcat("wpn-", e.mdl));
e.impulse = i;
e.bot_pickupbasevalue = pickupbasevalue;
+ if(ammotype & IT_SHELLS)
+ e.ammo_field = ammo_shells;
+ else if(ammotype & IT_NAILS)
+ e.ammo_field = ammo_nails;
+ else if(ammotype & IT_ROCKETS)
+ e.ammo_field = ammo_rockets;
+ else if(ammotype & IT_CELLS)
+ e.ammo_field = ammo_cells;
+ else if(ammotype & IT_FUEL)
+ e.ammo_field = ammo_fuel;
+ else
+ e.ammo_field = ammo_batteries;
}
float w_null(float dummy)
{
string W_NameWeaponOrder(string order);
string W_NumberWeaponOrder(string order);
+// ammo types
+.float ammo_shells;
+.float ammo_nails;
+.float ammo_rockets;
+.float ammo_cells;
+.float ammo_fuel;
+.float ammo_batteries; // dummy
+
// entity properties of weaponinfo:
.float weapon; // WEP_...
.float weapons; // WEPBIT_...
.float impulse; // weapon impulse
.float bot_pickupbasevalue; // bot weapon priority
.string model2; // wpn- sprite name
-
-
+..float ammo_field; // main ammo field
// dynamic weapon adding
float w_null(float dummy);
case MAPINFO_TYPE_NEXBALL: return "5 20 0";
case MAPINFO_TYPE_CTS: return "20 0 0";
case MAPINFO_TYPE_FREEZETAG: return "10 20 0";
- case MAPINFO_TYPE_KEEPAWAY: return "30 20 0";
// NOTE: DO NOT ADD ANY MORE GAME TYPES HERE
// THIS IS JUST LEGACY SUPPORT FOR NEXUIZ MAPS
// ONLY ADD NEW STUFF TO _MapInfo_GetDefaultEx
s = cdr(s);
}
+ /* keepaway wuz here
if(pWantedType == MAPINFO_TYPE_KEEPAWAY)
{
sa = car(s);
cvar_set("fraglimit", sa);
s = cdr(s);
}
-
+ */
+
// rc = timelimit timelimit_qualification laps laps_teamplay
if(pWantedType == MAPINFO_TYPE_RACE)
{
{
if(damage > 0)
{
- if(attacker.weapon != WEP_LASER
- && (attacker.weapon != WEP_ELECTRO || !autocvar_g_balance_electro_lightning)
- && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+ if(deathtype != DEATH_FIRE)
+ if(attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
{
if(targ.BUTTON_CHAT)
attacker.typehitsound += 1;
}
else
{
- if(deathtype != DEATH_FIRE
- && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+ if(deathtype != DEATH_FIRE)
+ if(attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
{
attacker.typehitsound += 1;
attacker.prevhitsound = time;
sound(other, CHAN_AUTO, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere)
// scoring
- PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1);
+ // PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1); Not anymore, this is 100% the same as pickups and is useless.
// waypoints
WaypointSprite_Spawn("ka-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, FALSE);
if(autocvar_g_keepaway_score_timepoints)
PlayerScore_Add(self.owner, SP_SCORE, autocvar_g_keepaway_score_timepoints);
- PlayerScore_Add(self.owner, SP_KEEPAWAY_TIME, (autocvar_g_keepaway_score_timeinterval / 1)); // interval is divided by 1 so that time always shows "seconds"
+ PlayerScore_Add(self.owner, SP_KEEPAWAY_BCTIME, (autocvar_g_keepaway_score_timeinterval / 1)); // interval is divided by 1 so that time always shows "seconds"
self.nextthink = time + autocvar_g_keepaway_score_timeinterval;
}
}
// Keep Away stuff
#define SP_KEEPAWAY_PICKUPS 4
#define SP_KEEPAWAY_CARRIERKILLS 5
-#define SP_KEEPAWAY_DROPS 6
-#define SP_KEEPAWAY_TIME 7
+#define SP_KEEPAWAY_BCTIME 6
void ScoreRules_keepaway()
{
ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, 0, TRUE); // SFL_SORT_PRIO_PRIMARY
ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_PICKUPS, "pickups", 0);
ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_CARRIERKILLS, "bckills", 0);
- ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_DROPS, "drops", SFL_LOWER_IS_BETTER);
- ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_TIME, "time", SFL_SORT_PRIO_SECONDARY);
+ ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_BCTIME, "bctime", SFL_SORT_PRIO_SECONDARY);
ScoreRules_basics_end();
}
if(e == e.realowner.crylink_lastgroup)
e.realowner.crylink_lastgroup = world;
- RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_damage * a, autocvar_g_balance_crylink_primary_edgedamage * a, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * a, e.projectiledeathtype, other);
+ if(e.projectiledeathtype & HITTYPE_SECONDARY)
+ RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_damage * a, autocvar_g_balance_crylink_secondary_edgedamage * a, autocvar_g_balance_crylink_secondary_radius, world, autocvar_g_balance_crylink_secondary_force * a, e.projectiledeathtype, other);
+ else
+ RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_damage * a, autocvar_g_balance_crylink_primary_edgedamage * a, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * a, e.projectiledeathtype, other);
if(e.queuenext != e2)
W_Crylink_LinkExplode(e.queuenext, e2);
}
float a;
- a = 1 - (time - self.fade_time) * self.fade_rate;
+ a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
if(finalhit)