Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Jones
EDuke32
Commits
1f5a4cfa
Commit
1f5a4cfa
authored
Apr 11, 2020
by
NY00123
Browse files
SW (DoPlayerTurn): The 180-degrees turns should be clockwise
parent
62c2ab05
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/sw/src/player.cpp
View file @
1f5a4cfa
...
...
@@ -1576,7 +1576,9 @@ DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16avel)
if
(
PEDANTIC_MODE
)
*
pq16ang
=
fix16_from_int
(
NORM_ANGLE
(
fix16_to_int
(
*
pq16ang
)
+
(
labs
(
delta_ang
)
>>
TURN_SHIFT
)));
else
*
pq16ang
=
NORM_Q16ANGLE
(
fix16_sadd
(
*
pq16ang
,
fix16_from_float
(
scaleAdjustmentToInterval
(
labs
(
delta_ang
)
>>
TURN_SHIFT
))));
// Add at least 1 unit to ensure the turn direction is clockwise
*
pq16ang
=
NORM_Q16ANGLE
(
fix16_sadd
(
*
pq16ang
,
fix16_max
(
fix16_one
,
fix16_from_float
(
scaleAdjustmentToInterval
(
labs
(
delta_ang
)
>>
TURN_SHIFT
)))));
SET
(
pp
->
Flags
,
PF_TURN_180
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment