Skip to content

Commit 98c394e

Browse files
committed
Comment out mouse rotate for now
1 parent b876769 commit 98c394e

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
@@ -737,22 +737,22 @@ float (string arg1, string arg2, string arg3, string arg4) ParseCmds = {
737737
break;
738738
}
739739

740-
if (arg2 && arg2 == "rotate" && arg3 && arg3 == "mouse" && arg4) {
741-
if (self.rotating_sentry == world)
742-
break;
740+
/* if (arg2 && arg2 == "rotate" && arg3 && arg3 == "mouse" && arg4) { */
741+
/* if (self.rotating_sentry == world) */
742+
/* break; */
743743

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

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

757757
//find sentry first
758758
ent = findradius(self.origin, ENG_BUILDING_MAINT_DISTANCE);
@@ -764,18 +764,18 @@ float (string arg1, string arg2, string arg3, string arg4) ParseCmds = {
764764
ent = ent.chain;
765765
}
766766

767-
if (arg2 && arg2 == "rotate" && arg3 && arg3 == "mwheel" && arg4) {
768-
if (!arg4)
769-
break;
767+
/* if (arg2 && arg2 == "rotate" && arg3 && arg3 == "mwheel" && arg4) { */
768+
/* if (!arg4) */
769+
/* break; */
770770

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

780780
if (!ent) {
781781
sprint(self, PRINT_HIGH, "No sentry in range\n");
@@ -790,23 +790,19 @@ float (string arg1, string arg2, string arg3, string arg4) ParseCmds = {
790790
sprint(self, PRINT_HIGH, "Sentry detection issue!\n");
791791
break;
792792
}
793-
if (arg3 == "mouse" && !arg4) {
794-
if (!self.rotating_sentry == world)
795-
break;
793+
/* if (arg3 == "mouse" && !arg4) { */
794+
/* if (!self.rotating_sentry == world) */
795+
/* break; */
796796

797-
self.dimension_see = (self.dimension_see & ~DMN_HIDDEN) | DMN_GHOST;
798-
ent.dimension_seen = (ent.dimension_seen & ~DMN_NOFLASH) | DMN_HIDDEN | DMN_GHOST;
799-
self.rotating_sentry = ent;
800-
UpdateClientSentryRotate(self, ent);
801-
break;
802-
}
803-
if(farg3 < 0) {
804-
sprint(self, PRINT_HIGH, "Rotating ",ftos(farg3 * -1)," degrees clockwise...\n");
805-
} else {
806-
sprint(self, PRINT_HIGH, "Rotating ",ftos(farg3)," degrees anticlockwise...\n");
807-
}
797+
/* self.dimension_see = (self.dimension_see & ~DMN_HIDDEN) | DMN_GHOST; */
798+
/* ent.dimension_seen = (ent.dimension_seen & ~DMN_NOFLASH) | DMN_HIDDEN | DMN_GHOST; */
799+
/* self.rotating_sentry = ent; */
800+
/* UpdateClientSentryRotate(self, ent); */
801+
/* break; */
802+
/* } */
808803
ent.waitmin = anglemod(ent.waitmin + farg3);
809804
ent.waitmax = anglemod(ent.waitmax + farg3);
805+
ent.angles_y += farg3;
810806
break;
811807
}
812808
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)