Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
drzel committed Apr 30, 2024
2 parents 95cd841 + 7d94dda commit f1bb88a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions csqc/events.qc
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ void() CSQC_Parse_Event = {
flag_team = readfloat();
pick_up_time = time;
break;
case MSG_FLAG_DROP:
pick_up_time = FALSE;
break;
case MSG_BUILDING:
SentryPreviewStop();
break;
Expand Down
3 changes: 2 additions & 1 deletion share/commondefs.qc
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ const float SERVER_FRAME_MS = SERVER_FRAME_DT * 1000.0;
#define MSG_HITFLAG 27
#define MSG_RELOADSOUND 28
#define MSG_FLAG_PICKUP 29
#define MSG_BUILDING 30
#define MSG_FLAG_DROP 30
#define MSG_BUILDING 31

#define FLAGINFO_HOME 1
#define FLAGINFO_CARRIED 2
Expand Down
10 changes: 10 additions & 0 deletions ssqc/status.qc
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,16 @@ void (entity pl, float flag_team) UpdateClientFlagPickUp = {
multicast('0 0 0', MULTICAST_ONE_NOSPECS);
}

void (entity pl) UpdateClientFlagDrop = {
if(!infokeyf(pl, INFOKEY_P_CSQCACTIVE))
return;

msg_entity = pl;
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, MSG_FLAG_DROP);
multicast('0 0 0', MULTICAST_ONE_NOSPECS);
}

void (entity pl) RefreshStatusBar = {
local string pad;
local string s1 = ""; // will be used for grenade timers
Expand Down
2 changes: 2 additions & 0 deletions ssqc/tfortmap.qc
Original file line number Diff line number Diff line change
Expand Up @@ -3003,4 +3003,6 @@ void () DropGoalItems = {
break;
}
}

UpdateClientFlagDrop(self);
};

0 comments on commit f1bb88a

Please sign in to comment.