Browse Source

remove mag2lk

master
Alison Watson 2 months ago
parent
commit
363478018e
3 changed files with 1 additions and 8 deletions
  1. +0
    -1
      source/include/m_math.h
  2. +0
    -6
      source/m_math.c
  3. +1
    -1
      source/p_ren_view.c

+ 0
- 1
source/include/m_math.h View File

@@ -60,7 +60,6 @@ stkcall i32 fastabs(i32 n);
stkcall k32 fastabsk(k32 n);
stkcall k32 fastroundk(k32 k, i32 n);
stkcall k64 powlk(k64 x, i32 y);
stkcall k64 mag2lk(k64 x, k64 y);
stkcall k32 mag2k(k32 x, k32 y);
stkcall i32 mag2i(i32 x, i32 y);
stkcall k32 lerpk(k32 a, k32 b, k32 t);


+ 0
- 6
source/m_math.c View File

@@ -130,12 +130,6 @@ k64 powlk(k64 x, i32 y)
return z;
}

alloc_aut(0) stkcall
k64 mag2lk(k64 x, k64 y)
{
return ACS_FixedSqrt(x * x + y * y);
}

alloc_aut(0) stkcall
k32 mag2k(k32 x, k32 y)
{


+ 1
- 1
source/p_ren_view.c View File

@@ -23,7 +23,7 @@ script static void P_Ren_DamageBob(struct player *p)
if(p->bobyaw + p->bobpitch > 0.05)
angle = lerplk(angle, atan2f(p->bobpitch, p->bobyaw), 0.25lk);

distance = mag2lk(p->bobyaw, p->bobpitch);
distance = mag2k(p->bobyaw, p->bobpitch);
distance += (p->oldhealth - p->health) / (k64)p->maxhealth;
distance *= 0.2lk;



Loading…
Cancel
Save