Skip to content

Commit d5f0cc5

Browse files
committed
Clean up
1 parent e24f5fb commit d5f0cc5

File tree

1 file changed

+4
-25
lines changed

1 file changed

+4
-25
lines changed

csqc/main.qc

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,6 @@ void GetSelf() = {
2929
self = findfloat(world, entnum, player_localentnum);
3030
}
3131

32-
/* vector AnglesToVector(vector angles) { */
33-
/* float pitch, yaw, roll; */
34-
/* vector dir; */
35-
36-
/* pitch = angles_x * (M_PI / 180.0); */
37-
/* yaw = angles_y * (M_PI / 180.0); */
38-
/* roll = angles_z * (M_PI / 180.0); */
39-
40-
/* dir_x = cos(yaw) * cos(pitch); */
41-
/* dir_y = sin(yaw) * cos(pitch); */
42-
/* dir_z = -sin(pitch); */
43-
44-
/* return dir; */
45-
/* } */
46-
47-
/* vector GetNewPosition(entity ent, vector angle_offsets, float distance) { */
48-
/* vector dir = AnglesToVector(ent.angles + angle_offsets); */
49-
/* vector new_position = ent.origin + dir * distance; */
50-
/* return new_position; */
51-
/* } */
52-
5332
void PushToSlotHistory(float value) {
5433
if (slot_history_top >= MAX_SLOT_HISTORY_SIZE) {
5534
// Stack is full
@@ -333,8 +312,8 @@ noref float(string cmd) CSQC_ConsoleCommand = {
333312
switch (WP_PlayerClass()) {
334313
case PC_ENGINEER:
335314
if (previewing_sentry) {
336-
sentry_preview.angles_y -= 15;
337-
sentry_preview_offset -= 15;
315+
anglemod(sentry_preview.angles_y -= 15);
316+
anglemod(sentry_preview_offset -= 15);
338317
} else {
339318
localcmd("cmd sentry rotate 15\n");
340319
}
@@ -345,8 +324,8 @@ noref float(string cmd) CSQC_ConsoleCommand = {
345324
switch (WP_PlayerClass()) {
346325
case PC_ENGINEER:
347326
if (previewing_sentry) {
348-
sentry_preview.angles_y += 15;
349-
sentry_preview_offset += 15;
327+
anglemod(sentry_preview.angles_y += 15);
328+
anglemod(sentry_preview_offset += 15);
350329
} else {
351330
localcmd("cmd sentry rotate -15\n");
352331
}

0 commit comments

Comments
 (0)