mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-10 07:11:51 +00:00
Fix the teamkills when teamplay == 0 bug
This commit is contained in:
parent
1d4aa3b4eb
commit
30ab9edcf3
3 changed files with 6 additions and 4 deletions
1
BUGS
1
BUGS
|
@ -1,3 +1,2 @@
|
|||
- info string length exceeded :/
|
||||
- still get teamkill curse with teamplay 0
|
||||
- duplicate connects
|
||||
|
|
|
@ -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;
|
||||
|
|
8
menu.qc
8
menu.qc
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue