Skip to content

Commit 96faeb8

Browse files
authored
Merge pull request #1327 from drzel/flag-pickup-notification
Remove flag pickup notification when flag thrown
2 parents f33a8f7 + 7d94dda commit 96faeb8

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

csqc/events.qc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@ void() CSQC_Parse_Event = {
359359
flag_team = readfloat();
360360
pick_up_time = time;
361361
break;
362+
case MSG_FLAG_DROP:
363+
pick_up_time = FALSE;
364+
break;
362365
}
363366
}
364367

share/commondefs.qc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ const float SERVER_FRAME_MS = SERVER_FRAME_DT * 1000.0;
214214
#define MSG_HITFLAG 27
215215
#define MSG_RELOADSOUND 28
216216
#define MSG_FLAG_PICKUP 29
217+
#define MSG_FLAG_DROP 30
217218

218219
#define FLAGINFO_HOME 1
219220
#define FLAGINFO_CARRIED 2

ssqc/status.qc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,16 @@ void (entity pl, float flag_team) UpdateClientFlagPickUp = {
975975
multicast('0 0 0', MULTICAST_ONE_NOSPECS);
976976
}
977977

978+
void (entity pl) UpdateClientFlagDrop = {
979+
if(!infokeyf(pl, INFOKEY_P_CSQCACTIVE))
980+
return;
981+
982+
msg_entity = pl;
983+
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
984+
WriteByte(MSG_MULTICAST, MSG_FLAG_DROP);
985+
multicast('0 0 0', MULTICAST_ONE_NOSPECS);
986+
}
987+
978988
void (entity pl) RefreshStatusBar = {
979989
local string pad;
980990
local string s1 = ""; // will be used for grenade timers

ssqc/tfortmap.qc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3003,4 +3003,6 @@ void () DropGoalItems = {
30033003
break;
30043004
}
30053005
}
3006+
3007+
UpdateClientFlagDrop(self);
30063008
};

0 commit comments

Comments
 (0)