diff --git a/ReallifeGamemode.Server/Gangwar/Turf.cs b/ReallifeGamemode.Server/Gangwar/Turf.cs index b07103d8..f9a41bff 100644 --- a/ReallifeGamemode.Server/Gangwar/Turf.cs +++ b/ReallifeGamemode.Server/Gangwar/Turf.cs @@ -40,7 +40,7 @@ namespace ReallifeGamemode.Server.Gangwar this.maxValue = maxValue; this.surplus = surplus; this.Attacker = null; - this.Att_Score = 0; + this.Att_Score = 1; this.Def_Score = 0; this.status = "normal"; this.timer = null; @@ -154,44 +154,44 @@ namespace ReallifeGamemode.Server.Gangwar { gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score); } - if (this.Def_Score >= 5) + if (this.Att_Score >= 5) { this.takeOver(this.Attacker); } - else if (this.Att_Score >= 5) + else if (this.Def_Score >= 5) { this.takeOver(this.Owner); } timerCount += 1; if (timerCount >= 900) //change to 900 (seconds) before release for testing reasons change to whatever you like { - if (this.Def_Score > this.Att_Score) + if (this.Att_Score > this.Def_Score) { foreach (Player gangwarPlayer in this.playerInGangwar) { - gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 5, 5); - } - this.takeOver(this.Owner); - this.Att_Score = 5; - } - else if (this.Def_Score < this.Att_Score) - { - foreach (Player gangwarPlayer in this.playerInGangwar) - { - gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 5, 5); + gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 0, 0); } this.takeOver(this.Attacker); - this.Def_Score = 5; + this.Def_Score = 0; + } + else if (this.Att_Score < this.Def_Score) + { + foreach (Player gangwarPlayer in this.playerInGangwar) + { + gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 0, 0); + } + this.takeOver(this.Owner); + this.Att_Score = 0; return; } else if (this.Def_Score == this.Att_Score) { foreach (Player gangwarPlayer in this.playerInGangwar) { - gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 5, 5); + gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 0, 0); } - this.takeOver(this.Attacker); - this.Def_Score = 5; + this.takeOver(this.Owner); + this.Def_Score = 0; return; }