mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Don't cast the array itself but it's content.
This was so broken... Casting the type of an array to silence a warning... It worked on x86, of course. But gave a SIGBUS on ARM. Do it right, cast / copy the content of the array into another array of the correct type. Yeah. This fixes issue #231.
This commit is contained in:
parent
82616d0992
commit
e30f824944
1 changed files with 3 additions and 1 deletions
|
@ -231,6 +231,7 @@ CL_PredictMovement(void)
|
|||
pmove_t pm;
|
||||
int i;
|
||||
int step;
|
||||
vec3_t tmp;
|
||||
|
||||
if (cls.state != ca_active)
|
||||
{
|
||||
|
@ -296,9 +297,10 @@ CL_PredictMovement(void)
|
|||
}
|
||||
|
||||
step = pm.s.origin[2] - (int)(cl.predicted_origin[2] * 8);
|
||||
VectorCopy(tmp, pm.s.velocity);
|
||||
|
||||
if (((step > 126 && step < 130))
|
||||
&& !VectorCompare((float *)pm.s.velocity, vec3_origin)
|
||||
&& !VectorCompare(tmp, vec3_origin)
|
||||
&& (pm.s.pm_flags & PMF_ON_GROUND))
|
||||
{
|
||||
cl.predicted_step = step * 0.125f;
|
||||
|
|
Loading…
Reference in a new issue