Skip to content

Commit

Permalink
Remove vec_t
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeSlave committed Nov 8, 2024
1 parent c8a3562 commit 3722964
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion common/com_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ typedef struct model_s

} model_t;

typedef vec_t vec4_t[4];
typedef float vec4_t[4];

typedef struct alight_s
{
Expand Down
2 changes: 0 additions & 2 deletions common/mathlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#if !defined(MATHLIB_H)
#define MATHLIB_H

typedef float vec_t;

#include "vector.h"
#include "pi_constant.h"

Expand Down
6 changes: 3 additions & 3 deletions dlls/bmodels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ void CFuncRotating::HurtTouch( CBaseEntity *pOther )
void CFuncRotating::RampPitchVol( int fUp )
{
Vector vecAVel = pev->avelocity;
vec_t vecCur;
vec_t vecFinal;
float vecCur;
float vecFinal;
float fpct;
float fvol;
float fpitch;
Expand Down Expand Up @@ -632,7 +632,7 @@ void CFuncRotating::SpinUp( void )
void CFuncRotating::SpinDown( void )
{
Vector vecAVel;//rotational velocity
vec_t vecdir;
float vecdir;

pev->nextthink = pev->ltime + 0.1f;

Expand Down
4 changes: 2 additions & 2 deletions dlls/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Vector2D
}
}

vec_t x, y;
float x, y;
};

inline float DotProduct( const Vector2D& a, const Vector2D& b ) { return( a.x * b.x + a.y * b.y ); }
Expand Down Expand Up @@ -99,7 +99,7 @@ class Vector // same data-layout as engine's vec3_t,
inline float Length2D( void ) const { return sqrt( x * x + y * y ); }

// Members
vec_t x = 0, y = 0, z = 0;
float x = 0, y = 0, z = 0;
};
constexpr Vector operator*( float fl, const Vector& v ) { return v * fl; }
constexpr float DotProduct( const Vector& a, const Vector& b ) { return( a.x * b.x + a.y * b.y + a.z * b.z); }
Expand Down

0 comments on commit 3722964

Please sign in to comment.