From 98ac7c7bf3fb240c95e5e30e2f6aa4bb5275e14c Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 30 Jul 2020 21:02:56 +0200 Subject: [PATCH] change gangwar --- ReallifeGamemode.Client/Gui/infobox.ts | 2 +- ReallifeGamemode.Client/util/Gangwar.ts | 22 ++++++++++++++-------- ReallifeGamemode.Server/Gangwar/Turf.cs | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ReallifeGamemode.Client/Gui/infobox.ts b/ReallifeGamemode.Client/Gui/infobox.ts index cc75a211..135d11d8 100644 --- a/ReallifeGamemode.Client/Gui/infobox.ts +++ b/ReallifeGamemode.Client/Gui/infobox.ts @@ -258,7 +258,7 @@ export default function (globalData: IGlobalData): void { }) } - if (att_score > 0 && def_score > 0) { + if (att_score >= 1 && def_score < 200) { mp.game.graphics.drawText("~y~" + def + " " + def_score + " : " + att_score + " " + att, [0.07, 0.55], { font: 4, diff --git a/ReallifeGamemode.Client/util/Gangwar.ts b/ReallifeGamemode.Client/util/Gangwar.ts index a1689a8e..06788682 100644 --- a/ReallifeGamemode.Client/util/Gangwar.ts +++ b/ReallifeGamemode.Client/util/Gangwar.ts @@ -241,24 +241,25 @@ self._status = "attack"; self.attacker = args[1]; //self.blip.setFlashes(true); - mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, true); + //mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, true); return; } if (status == "normal") { self._status = "normal"; //self.blip.setFlashes(false); - mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false); + //mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false); return; } if (status == "conquered") { - mp.game.graphics.stopScreenEffect("MinigameTransitionIn"); + //mp.game.graphics.stopScreenEffect("MinigameTransitionIn"); self._status = "normal"; self.owner = args[0]; self.attacker = null; //self.blip.setFlashes(false); - mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false); + //mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false); + self.setColor(self.owner) - //self.blip.setColour(self.color); + self.blip.setColour(self.color) mp.game.invoke(Natives.SET_BLIP_COLOUR, self.blip, self.color); self.setLeaderColShape(); return; @@ -333,8 +334,8 @@ self._entered = true; if (self._status == "attack") { mp.game.audio.playSoundFrontend(1, "Enter_Capture_Zone", "DLC_Apartments_Drop_Zone_Sounds", true); - mp.game.graphics.stopScreenEffect("MinigameTransitionIn"); - mp.game.graphics.startScreenEffect("MinigameTransitionOut", 500, false); + //mp.game.graphics.stopScreenEffect("MinigameTransitionIn"); + //mp.game.graphics.startScreenEffect("MinigameTransitionOut", 500, false); } mp.events.callRemote("Gangarea:Enter", JSON.stringify(self.id)); } @@ -343,7 +344,7 @@ self._entered = false; if (self._status === "attack") { mp.game.audio.playSoundFrontend(1, "Exit_Capture_Zone", "DLC_Apartments_Drop_Zone_Sounds", true); - mp.game.graphics.startScreenEffect("MinigameTransitionIn", 500, false); + //mp.game.graphics.startScreenEffect("MinigameTransitionIn", 500, false); } mp.events.callRemote("Gangarea:Leave", JSON.stringify(self.id)); } @@ -473,7 +474,12 @@ mp.game.invoke(Natives.SET_BLIP_SPRITE, last_leaderBlip, -1); mp.game.ui.removeBlip(last_leaderBlip); last_leaderBlip = mp.game.invoke(Natives.GET_NEXT_BLIP_INFO_ID, 437); + mp.game.invoke(Natives.SET_BLIP_SPRITE, last_attackBlip, -1); + mp.game.ui.removeBlip(last_attackBlip); + last_attackBlip = mp.game.invoke(Natives.GET_NEXT_BLIP_INFO_ID, 378); + y++ z++ + } mp.gui.chat.push("DEBUG: Turf blips not removed: " + x); mp.gui.chat.push("DEBUG: Attack blips not removed: " + y); diff --git a/ReallifeGamemode.Server/Gangwar/Turf.cs b/ReallifeGamemode.Server/Gangwar/Turf.cs index ee9be72e..130169b8 100644 --- a/ReallifeGamemode.Server/Gangwar/Turf.cs +++ b/ReallifeGamemode.Server/Gangwar/Turf.cs @@ -163,7 +163,7 @@ namespace ReallifeGamemode.Server.Gangwar this.takeOver(this.Owner); } timerCount += 1; - if (timerCount >= 900) //change to 900 (seconds) before release for testing reasons change to whatever you like + if (timerCount >= 10) //change to 900 (seconds) before release for testing reasons change to whatever you like { if (this.Att_Score > this.Def_Score) {