Skip to content

Commit 4800d8b

Browse files
committed
Merge branch 'build-better' into staging
2 parents d900619 + 5990a5d commit 4800d8b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

csqc/main.qc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ void _Sync_ServerCommandFrame() {
897897

898898
if (previewing_sentry) {
899899
if (game_state.is_alive) {
900-
sentry_fits = CheckArea(sentry_preview);
900+
sentry_fits = CheckArea(sentry_preview, player_localentnum);
901901
sentry_preview.colormod = sentry_fits ? '1 1 1' : '0.5 0.2 0.2';
902902
} else {
903903
SentryPreviewStop();

share/engineer.qc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
float (entity obj) CheckArea = {
1+
float (entity obj, float builder) CheckArea = {
22
local vector src;
33
local vector end;
44
local float pos;
@@ -51,7 +51,9 @@ float (entity obj) CheckArea = {
5151

5252
te = findradius(obj.origin, 64);
5353
if (te != world) {
54-
return (0);
54+
if !(te.movetype == MOVETYPE_WALK && builder && num_for_edict(te.owner) == builder) {
55+
return (0);
56+
}
5557
}
5658
return (1);
5759
};

ssqc/engineer.qc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ void (float objtobuild, float offset) TeamFortress_Build = {
612612
self.sentry_ticks = 0;
613613
}
614614

615-
if (!CheckArea(newmis)) {
615+
if (!CheckArea(newmis, 0)) {
616616
sprint(self, PRINT_HIGH, "You can't build here\n");
617617
dremove(newmis);
618618
return;

0 commit comments

Comments
 (0)