Skip to content

Commit 4daed55

Browse files
committed
Merge branch 'build-better' into staging
2 parents eed7134 + 98c394e commit 4daed55

File tree

3 files changed

+83
-85
lines changed

3 files changed

+83
-85
lines changed

csqc/menu.qc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ var fo_menu FO_MENU_SENTRY_MAINTAIN = {
327327
{"1","Anticlockwise","","",FO_MENU_STATE_NORMAL,{localcmd("cmd sentry rotate 45\n");Menu_Cancel();},MENU_BUTTON},
328328
{"2","180 Degrees","","",FO_MENU_STATE_NORMAL,{localcmd("cmd sentry rotate 180\n");Menu_Cancel();},MENU_BUTTON},
329329
{"3","Clockwise","","",FO_MENU_STATE_NORMAL,{localcmd("cmd sentry rotate -45\n");Menu_Cancel();},MENU_BUTTON},
330-
{"4","With Mouse","","",FO_MENU_STATE_NORMAL,{localcmd("cmd sentry rotate mouse\n");Menu_Cancel();},MENU_BUTTON},
330+
MenuSpacer,
331+
/* {"4","With Mouse","","",FO_MENU_STATE_NORMAL,{localcmd("cmd sentry rotate mouse\n");Menu_Cancel();},MENU_BUTTON}, */
331332
{"5","Nothing","","",FO_MENU_STATE_NORMAL,{Menu_Cancel();},MENU_BUTTON},
332333
}, 5, TRUE, {
333334
if(vlen(PM_Org() - sentry_pos) > ENG_BUILDING_MAINT_DISTANCE) {
@@ -342,7 +343,8 @@ var fo_menu FO_MENU_SENTRY_ROTATE = {
342343
{"1","Anticlockwise","","",FO_MENU_STATE_NORMAL,{localcmd("cmd sentry rotate 45\n");Menu_Cancel();},MENU_BUTTON},
343344
{"2","180 Degrees","","",FO_MENU_STATE_NORMAL,{localcmd("cmd sentry rotate 180\n");Menu_Cancel();},MENU_BUTTON},
344345
{"3","Clockwise","","",FO_MENU_STATE_NORMAL,{localcmd("cmd sentry rotate -45\n");Menu_Cancel();},MENU_BUTTON},
345-
{"4","With Mouse","","",FO_MENU_STATE_NORMAL,{localcmd("cmd sentry rotate mouse\n");Menu_Cancel();},MENU_BUTTON},
346+
MenuSpacer,
347+
/* {"4","With Mouse","","",FO_MENU_STATE_NORMAL,{localcmd("cmd sentry rotate mouse\n");Menu_Cancel();},MENU_BUTTON}, */
346348
{"5","Nothing","","",FO_MENU_STATE_NORMAL,{Menu_Cancel();},MENU_BUTTON},
347349
}, 5, TRUE, {
348350
if(vlen(PM_Org() - sentry_pos) > ENG_BUILDING_MAINT_DISTANCE) {

ssqc/commands.qc

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -740,22 +740,22 @@ float (string arg1, string arg2, string arg3, string arg4) ParseCmds = {
740740
break;
741741
}
742742

743-
if (arg2 && arg2 == "rotate" && arg3 && arg3 == "mouse" && arg4) {
744-
if (self.rotating_sentry == world)
745-
break;
743+
/* if (arg2 && arg2 == "rotate" && arg3 && arg3 == "mouse" && arg4) { */
744+
/* if (self.rotating_sentry == world) */
745+
/* break; */
746746

747-
self.dimension_see = (self.dimension_see & ~DMN_GHOST) | DMN_HIDDEN;
747+
/* self.dimension_see = (self.dimension_see & ~DMN_GHOST) | DMN_HIDDEN; */
748748

749-
local entity rs = self.rotating_sentry;
750-
rs.dimension_seen = (rs.dimension_seen & ~(DMN_HIDDEN | DMN_GHOST)) | DMN_NOFLASH;
751-
farg4 = stof(arg4);
752-
rs.angles_y = farg4;
753-
rs.waitmin = anglemod(farg4 - 50);
754-
rs.waitmax = anglemod(farg4 + 50);
755-
FO_Sound(self, CHAN_ITEM, "weapons/turridle.wav", 1, ATTN_NORM);
756-
self.rotating_sentry = world;
757-
break;
758-
}
749+
/* local entity rs = self.rotating_sentry; */
750+
/* rs.dimension_seen = (rs.dimension_seen & ~(DMN_HIDDEN | DMN_GHOST)) | DMN_NOFLASH; */
751+
/* farg4 = stof(arg4); */
752+
/* rs.angles_y = farg4; */
753+
/* rs.waitmin = anglemod(farg4 - 50); */
754+
/* rs.waitmax = anglemod(farg4 + 50); */
755+
/* FO_Sound(self, CHAN_ITEM, "weapons/turridle.wav", 1, ATTN_NORM); */
756+
/* self.rotating_sentry = world; */
757+
/* break; */
758+
/* } */
759759

760760
//find sentry first
761761
ent = findradius(self.origin, ENG_BUILDING_MAINT_DISTANCE);
@@ -767,18 +767,18 @@ float (string arg1, string arg2, string arg3, string arg4) ParseCmds = {
767767
ent = ent.chain;
768768
}
769769

770-
if (arg2 && arg2 == "rotate" && arg3 && arg3 == "mwheel" && arg4) {
771-
if (!arg4)
772-
break;
770+
/* if (arg2 && arg2 == "rotate" && arg3 && arg3 == "mwheel" && arg4) { */
771+
/* if (!arg4) */
772+
/* break; */
773773

774-
farg4 = stof(arg4);
775-
self.dimension_see = (self.dimension_see & ~DMN_HIDDEN) | DMN_GHOST;
776-
ent.dimension_seen = (ent.dimension_seen & ~DMN_NOFLASH) | DMN_HIDDEN | DMN_GHOST;
777-
if (self.rotating_sentry == world)
778-
self.rotating_sentry = ent;
779-
UpdateClientSentryRotateBy(self, self.rotating_sentry, farg4);
780-
break;
781-
}
774+
/* farg4 = stof(arg4); */
775+
/* self.dimension_see = (self.dimension_see & ~DMN_HIDDEN) | DMN_GHOST; */
776+
/* ent.dimension_seen = (ent.dimension_seen & ~DMN_NOFLASH) | DMN_HIDDEN | DMN_GHOST; */
777+
/* if (self.rotating_sentry == world) */
778+
/* self.rotating_sentry = ent; */
779+
/* UpdateClientSentryRotateBy(self, self.rotating_sentry, farg4); */
780+
/* break; */
781+
/* } */
782782

783783
if (!ent) {
784784
sprint(self, PRINT_HIGH, "No sentry in range\n");
@@ -793,23 +793,19 @@ float (string arg1, string arg2, string arg3, string arg4) ParseCmds = {
793793
sprint(self, PRINT_HIGH, "Sentry detection issue!\n");
794794
break;
795795
}
796-
if (arg3 == "mouse" && !arg4) {
797-
if (!self.rotating_sentry == world)
798-
break;
796+
/* if (arg3 == "mouse" && !arg4) { */
797+
/* if (!self.rotating_sentry == world) */
798+
/* break; */
799799

800-
self.dimension_see = (self.dimension_see & ~DMN_HIDDEN) | DMN_GHOST;
801-
ent.dimension_seen = (ent.dimension_seen & ~DMN_NOFLASH) | DMN_HIDDEN | DMN_GHOST;
802-
self.rotating_sentry = ent;
803-
UpdateClientSentryRotate(self, ent);
804-
break;
805-
}
806-
if(farg3 < 0) {
807-
sprint(self, PRINT_HIGH, "Rotating ",ftos(farg3 * -1)," degrees clockwise...\n");
808-
} else {
809-
sprint(self, PRINT_HIGH, "Rotating ",ftos(farg3)," degrees anticlockwise...\n");
810-
}
800+
/* self.dimension_see = (self.dimension_see & ~DMN_HIDDEN) | DMN_GHOST; */
801+
/* ent.dimension_seen = (ent.dimension_seen & ~DMN_NOFLASH) | DMN_HIDDEN | DMN_GHOST; */
802+
/* self.rotating_sentry = ent; */
803+
/* UpdateClientSentryRotate(self, ent); */
804+
/* break; */
805+
/* } */
811806
ent.waitmin = anglemod(ent.waitmin + farg3);
812807
ent.waitmax = anglemod(ent.waitmax + farg3);
808+
ent.angles_y += farg3;
813809
break;
814810
}
815811
sprint(self, PRINT_HIGH, "Invalid choice.\n");

ssqc/status.qc

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -767,50 +767,50 @@ void UpdateClientBuilding(entity pl) {
767767
multicast('0 0 0', MULTICAST_ONE_NOSPECS);
768768
}
769769

770-
void UpdateClientSentryRotate(entity pl, entity sentry) {
771-
if(!infokeyf(pl, INFOKEY_P_CSQCACTIVE))
772-
return;
773-
774-
msg_entity = pl;
775-
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
776-
WriteByte(MSG_MULTICAST, MSG_SENTRY_ROTATE);
777-
WriteEntity(MSG_MULTICAST, sentry);
778-
779-
local float frame_no;
780-
if (sentry.frame >= 6) {
781-
frame_no = 6;
782-
} else if (sentry.frame >= 3) {
783-
frame_no = 3;
784-
} else {
785-
frame_no = 0;
786-
}
787-
788-
WriteFloat(MSG_MULTICAST, frame_no);
789-
multicast('0 0 0', MULTICAST_ONE_NOSPECS);
790-
}
791-
792-
void UpdateClientSentryRotateBy(entity pl, entity sentry, float offset) {
793-
if(!infokeyf(pl, INFOKEY_P_CSQCACTIVE))
794-
return;
795-
796-
msg_entity = pl;
797-
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
798-
WriteByte(MSG_MULTICAST, MSG_SENTRY_ROTATE_BY);
799-
WriteEntity(MSG_MULTICAST, sentry);
800-
801-
local float frame_no;
802-
if (sentry.frame >= 6) {
803-
frame_no = 6;
804-
} else if (sentry.frame >= 3) {
805-
frame_no = 3;
806-
} else {
807-
frame_no = 0;
808-
}
809-
810-
WriteFloat(MSG_MULTICAST, frame_no);
811-
WriteFloat(MSG_MULTICAST, offset);
812-
multicast('0 0 0', MULTICAST_ONE_NOSPECS);
813-
}
770+
/* void UpdateClientSentryRotate(entity pl, entity sentry) { */
771+
/* if(!infokeyf(pl, INFOKEY_P_CSQCACTIVE)) */
772+
/* return; */
773+
774+
/* msg_entity = pl; */
775+
/* WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET); */
776+
/* WriteByte(MSG_MULTICAST, MSG_SENTRY_ROTATE); */
777+
/* WriteEntity(MSG_MULTICAST, sentry); */
778+
779+
/* local float frame_no; */
780+
/* if (sentry.frame >= 6) { */
781+
/* frame_no = 6; */
782+
/* } else if (sentry.frame >= 3) { */
783+
/* frame_no = 3; */
784+
/* } else { */
785+
/* frame_no = 0; */
786+
/* } */
787+
788+
/* WriteFloat(MSG_MULTICAST, frame_no); */
789+
/* multicast('0 0 0', MULTICAST_ONE_NOSPECS); */
790+
/* } */
791+
792+
/* void UpdateClientSentryRotateBy(entity pl, entity sentry, float offset) { */
793+
/* if(!infokeyf(pl, INFOKEY_P_CSQCACTIVE)) */
794+
/* return; */
795+
796+
/* msg_entity = pl; */
797+
/* WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET); */
798+
/* WriteByte(MSG_MULTICAST, MSG_SENTRY_ROTATE_BY); */
799+
/* WriteEntity(MSG_MULTICAST, sentry); */
800+
801+
/* local float frame_no; */
802+
/* if (sentry.frame >= 6) { */
803+
/* frame_no = 6; */
804+
/* } else if (sentry.frame >= 3) { */
805+
/* frame_no = 3; */
806+
/* } else { */
807+
/* frame_no = 0; */
808+
/* } */
809+
810+
/* WriteFloat(MSG_MULTICAST, frame_no); */
811+
/* WriteFloat(MSG_MULTICAST, offset); */
812+
/* multicast('0 0 0', MULTICAST_ONE_NOSPECS); */
813+
/* } */
814814

815815
void UpdateClientSentryDie(entity pl) {
816816
if(!infokeyf(pl, INFOKEY_P_CSQCACTIVE))

0 commit comments

Comments
 (0)