Fix the teamkills when teamplay == 0 bug

This commit is contained in:
Adam Olsen 2001-07-19 12:27:22 +00:00
parent 1d4aa3b4eb
commit 30ab9edcf3
3 changed files with 6 additions and 4 deletions

1
BUGS
View file

@ -1,3 +1,2 @@
- info string length exceeded :/
- still get teamkill curse with teamplay 0
- duplicate connects

View file

@ -71,6 +71,7 @@ float(float targteam, float attackteam) Teammate =
{
local float teammask;
if ( !teamplay ) return #FALSE;
if ( !targteam ) return #FALSE;
if ( targteam == attackteam ) return #TRUE;
if ( number_of_teams < 3 ) return #FALSE;

View file

@ -1465,15 +1465,17 @@ void(entity person, string build) Add_Building_Teamkill =
st = infokey(world, "curse");
if (st != string_null)
threshold = stof(st);
threshold = stof(st);
person.ff_count = person.ff_count + 2; //Increase their bastard rating
//Increase the engineers bastard rating so they
//can't block everyone.
person.building.real_owner.ff_count = person.building.real_owner.ff_count + 0.5;
if (threshold >= 1)
{
if (person.ff_count >= threshold) createBastard(person,threshold);
if (person.building.real_owner.ff_count >= threshold) createBastard(person.building.real_owner,threshold);
if (person.ff_count >= threshold)
createBastard(person,threshold);
if (person.building.real_owner.ff_count >= threshold)
createBastard(person.building.real_owner,threshold);
if ((person.ff_count == threshold - 2) || (person.ff_count == threshold - 1.5) || (person.ff_count == threshold - 1) || (person.ff_count == threshold - 0.5))
{
sprint (person, #PRINT_MEDIUM, "One more dismantling and you will be cursed.\n");