Skip to content

Commit

Permalink
Merge branch 'build-better' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
drzel committed Apr 30, 2024
2 parents 08fd6ff + 0d1785d commit 95cd841
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
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_BUILDING:
SentryPreviewStop();
break;
}
}

Expand Down
1 change: 1 addition & 0 deletions share/commondefs.qc
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ 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 FLAGINFO_HOME 1
#define FLAGINFO_CARRIED 2
Expand Down
2 changes: 2 additions & 0 deletions ssqc/engineer.qc
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@ void (float objtobuild, float offset) TeamFortress_Build = {
return;
}
}

UpdateClientBuilding(self);
self.is_building = 1;
if (!engineer_move) {
self.immune_to_check = time + 5;
Expand Down
10 changes: 10 additions & 0 deletions ssqc/status.qc
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,16 @@ string GetSBClassInfo(entity pl, float csqcactive)
return st1;
}

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

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

void UpdateClientReloadSound(entity pl, float weapon) {
if(!infokeyf(pl, INFOKEY_P_CSQCACTIVE))
return;
Expand Down

0 comments on commit 95cd841

Please sign in to comment.