1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
diff -Naur gzdoom-g1.8.09/game-music-emu/CMakeLists.txt gzdoom-g1.8.09.patched/game-music-emu/CMakeLists.txt
--- gzdoom-g1.8.09/game-music-emu/CMakeLists.txt 2014-12-21 09:18:40.000000000 -0500
+++ gzdoom-g1.8.09.patched/game-music-emu/CMakeLists.txt 2021-10-09 16:57:46.630159506 -0400
@@ -84,7 +84,7 @@
if (__LIBGME_TEST_VISIBILITY)
# get the gcc version
exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info)
- string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
+ string (REGEX MATCH "[1-9][0-9]*\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
# gcc <4.1 had poor support for symbol visibility
if ((${_gcc_version} VERSION_GREATER "4.1") OR (${_gcc_version} VERSION_EQUAL "4.1"))
diff -Naur gzdoom-g1.8.09/src/b_func.cpp gzdoom-g1.8.09.patched/src/b_func.cpp
--- gzdoom-g1.8.09/src/b_func.cpp 2014-12-21 09:18:40.000000000 -0500
+++ gzdoom-g1.8.09.patched/src/b_func.cpp 2021-10-09 16:57:46.631159506 -0400
@@ -123,7 +123,7 @@
if (vangle == 0)
return false; //Looker seems to be blind.
- return (angle_t)abs (R_PointToAngle2 (player->mo->x, player->mo->y, to->x, to->y) - player->mo->angle) <= vangle/2;
+ return (angle_t)fabs (R_PointToAngle2 (player->mo->x, player->mo->y, to->x, to->y) - player->mo->angle) <= vangle/2;
}
//-------------------------------------
@@ -210,7 +210,7 @@
{
angle = an;
//have to be somewhat precise. to avoid suicide.
- if (abs (angle - player->mo->angle) < 12*ANGLE_1)
+ if (fabs (angle - player->mo->angle) < 12*ANGLE_1)
{
t_rocket = 9;
no_fire = false;
@@ -252,7 +252,7 @@
angle -= m;
}
- if (abs (angle - player->mo->angle) < 4*ANGLE_1)
+ if (fabs (angle - player->mo->angle) < 4*ANGLE_1)
{
increase = !increase;
}
diff -Naur gzdoom-g1.8.09/src/g_hexen/a_dragon.cpp gzdoom-g1.8.09.patched/src/g_hexen/a_dragon.cpp
--- gzdoom-g1.8.09/src/g_hexen/a_dragon.cpp 2014-12-21 09:18:40.000000000 -0500
+++ gzdoom-g1.8.09.patched/src/g_hexen/a_dragon.cpp 2021-10-09 17:06:47.628110327 -0400
@@ -79,7 +79,7 @@
{ // attack the destination mobj if it's attackable
AActor *oldTarget;
- if (abs(actor->angle-R_PointToAngle2(actor->x, actor->y,
+ if (fabs(actor->angle-R_PointToAngle2(actor->x, actor->y,
target->x, target->y)) < ANGLE_45/2)
{
oldTarget = actor->target;
@@ -121,9 +121,9 @@
}
angleToSpot = R_PointToAngle2(actor->x, actor->y,
mo->x, mo->y);
- if ((angle_t)abs(angleToSpot-angleToTarget) < bestAngle)
+ if ((angle_t)fabs(angleToSpot-angleToTarget) < bestAngle)
{
- bestAngle = abs(angleToSpot-angleToTarget);
+ bestAngle = fabs(angleToSpot-angleToTarget);
bestActor = mo;
}
}
@@ -198,14 +198,14 @@
}
angle = R_PointToAngle2(self->x, self->y, self->target->x,
self->target->y);
- if (abs(self->angle-angle) < ANGLE_45/2 && self->CheckMeleeRange())
+ if (fabs(self->angle-angle) < ANGLE_45/2 && self->CheckMeleeRange())
{
int damage = pr_dragonflight.HitDice (8);
int newdam = P_DamageMobj (self->target, self, self, damage, NAME_Melee);
P_TraceBleed (newdam > 0 ? newdam : damage, self->target, self);
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
}
- else if (abs(self->angle-angle) <= ANGLE_1*20)
+ else if (fabs(self->angle-angle) <= ANGLE_1*20)
{
self->SetState (self->MissileState);
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
diff -Naur gzdoom-g1.8.09/src/g_hexen/a_heresiarch.cpp gzdoom-g1.8.09.patched/src/g_hexen/a_heresiarch.cpp
--- gzdoom-g1.8.09/src/g_hexen/a_heresiarch.cpp 2014-12-21 09:18:40.000000000 -0500
+++ gzdoom-g1.8.09.patched/src/g_hexen/a_heresiarch.cpp 2021-10-09 17:06:55.063109651 -0400
@@ -314,7 +314,7 @@
case SORC_STOPPING: // Balls stopping
if ((parent->StopBall == RUNTIME_TYPE(actor)) &&
(parent->args[1] > SORCBALL_SPEED_ROTATIONS) &&
- (abs(angle - (parent->angle>>ANGLETOFINESHIFT)) < (30<<5)))
+ (fabs(angle - (parent->angle>>ANGLETOFINESHIFT)) < (30<<5)))
{
// Can stop now
actor->target->args[3] = SORC_FIRESPELL;
diff -Naur gzdoom-g1.8.09/src/g_hexen/a_hexenspecialdecs.cpp gzdoom-g1.8.09.patched/src/g_hexen/a_hexenspecialdecs.cpp
--- gzdoom-g1.8.09/src/g_hexen/a_hexenspecialdecs.cpp 2014-12-21 09:18:40.000000000 -0500
+++ gzdoom-g1.8.09.patched/src/g_hexen/a_hexenspecialdecs.cpp 2021-10-09 17:07:05.703108684 -0400
@@ -109,7 +109,7 @@
if (playeringame[i])
{
AActor *pmo = players[i].mo;
- if (P_CheckSight (self, pmo) && (abs (R_PointToAngle2 (pmo->x,
+ if (P_CheckSight (self, pmo) && (fabs (R_PointToAngle2 (pmo->x,
pmo->y, self->x, self->y) - pmo->angle) <= ANGLE_45))
{ // Previous state (pottery bit waiting state)
self->SetState (self->state - 1);
diff -Naur gzdoom-g1.8.09/src/p_enemy.cpp gzdoom-g1.8.09.patched/src/p_enemy.cpp
--- gzdoom-g1.8.09/src/p_enemy.cpp 2014-12-21 09:18:40.000000000 -0500
+++ gzdoom-g1.8.09.patched/src/p_enemy.cpp 2021-10-09 16:57:46.631159506 -0400
@@ -2738,7 +2738,7 @@
// 0 means no limit. Also, if we turn in a single step anyways, no need to go through the algorithms.
// It also means that there is no need to check for going past the other.
- if (max_turn && (max_turn < (angle_t)abs(self->angle - other_angle)))
+ if (max_turn && (max_turn < (angle_t)fabs(self->angle - other_angle)))
{
if (self->angle > other_angle)
{
diff -Naur gzdoom-g1.8.09/src/p_mobj.cpp gzdoom-g1.8.09.patched/src/p_mobj.cpp
--- gzdoom-g1.8.09/src/p_mobj.cpp 2014-12-21 09:18:40.000000000 -0500
+++ gzdoom-g1.8.09.patched/src/p_mobj.cpp 2021-10-09 16:59:08.847152032 -0400
@@ -2932,7 +2932,7 @@
if (thing->flags4&MF4_SHIELDREFLECT)
{
// Shield reflection (from the Centaur
- if (abs (angle - thing->angle)>>24 > 45)
+ if ((int)(fabs (angle - thing->angle))>>24 > 45)
return true; // Let missile explode
if (thing->IsKindOf (RUNTIME_CLASS(AHolySpirit))) // shouldn't this be handled by another flag???
diff -Naur gzdoom-g1.8.09/src/p_setup.cpp gzdoom-g1.8.09.patched/src/p_setup.cpp
--- gzdoom-g1.8.09/src/p_setup.cpp 2014-12-21 09:18:40.000000000 -0500
+++ gzdoom-g1.8.09.patched/src/p_setup.cpp 2021-10-09 17:02:30.783133675 -0400
@@ -1311,7 +1311,7 @@
ptp_angle = R_PointToAngle2 (li->v1->x, li->v1->y, li->v2->x, li->v2->y);
dis = 0;
- delta_angle = (abs(ptp_angle-(segangle<<16))>>ANGLETOFINESHIFT)*360/FINEANGLES;
+ delta_angle = ((int)fabs(ptp_angle-(segangle<<16))>>ANGLETOFINESHIFT)*360/FINEANGLES;
if (delta_angle != 0)
{
|