mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-09 03:58:14 +03:00
Reversing Actor Final Part
This commit is contained in:
parent
cb239c3c7f
commit
6528ba4dac
40 changed files with 3983 additions and 779 deletions
|
@ -924,6 +924,61 @@ float LerpAngle (float from, float to, float frac) {
|
|||
|
||||
return a;
|
||||
}
|
||||
static float fNoise1Arr[514];
|
||||
static int iNoise1Arr[256];
|
||||
|
||||
static void init(void)
|
||||
{
|
||||
//This is an ugly func I wont bother variable naming.
|
||||
int i;
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
iNoise1Arr[i] = i;
|
||||
fNoise1Arr[i] = (rand() % 512 - 256) * 0.00390625;
|
||||
}
|
||||
int v21, v22;
|
||||
for (int j = i - 1; j; iNoise1Arr[v22 % 256] = v21)
|
||||
{
|
||||
v21 = iNoise1Arr[j];
|
||||
v22 = rand();
|
||||
iNoise1Arr[j--] = iNoise1Arr[v22 % 256];
|
||||
}
|
||||
|
||||
for (size_t k = 0; k < 258; k++)
|
||||
{
|
||||
fNoise1Arr[k + 256] = fNoise1Arr[k];
|
||||
}
|
||||
|
||||
}
|
||||
static int start = 1;
|
||||
|
||||
float noise1(float arg)
|
||||
{
|
||||
/*
|
||||
* This is an ugly func I wont bother variable naming.
|
||||
*vec_t vec;
|
||||
float u, t, sx, rx1, rx0;
|
||||
int bx0;*/
|
||||
|
||||
|
||||
if (start)
|
||||
{
|
||||
init();
|
||||
start = 0;
|
||||
}
|
||||
|
||||
double v1; // st7
|
||||
int v2; // eax
|
||||
double v3; // st7
|
||||
float v5; // [esp+4h] [ebp+4h]
|
||||
|
||||
v1 = arg + 4096.0;
|
||||
v2 = (unsigned __int8)(signed __int64)v1;
|
||||
v3 = v1 - (double)(signed int)(signed __int64)v1;
|
||||
v5 = v3 * fNoise1Arr[iNoise1Arr[v2]];
|
||||
return ((v3 - 1.0) * fNoise1Arr[iNoise1Arr[(unsigned __int8)(v2 + 1)]] - v5) * ((3.0 - (v3 + v3)) * (v3 * v3))
|
||||
+ v5;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
|
|
|
@ -794,6 +794,8 @@ float erandom( float mean );
|
|||
void vectoangles( const vec3_t value1, vec3_t angles );
|
||||
void VectorToAngles( const vec3_t vec, vec3_t angles );
|
||||
void AnglesToAxis( const vec3_t angles, vec3_t axis[3] );
|
||||
static void init( void );
|
||||
float noise1(float arg);
|
||||
|
||||
void R_ConcatRotations( float in1[ 3 ][ 3 ], float in2[ 3 ][ 3 ], float out[ 3 ][ 3 ] );
|
||||
void R_ConcatTransforms( float in1[ 3 ][ 4 ], float in2[ 3 ][ 4 ], float out[ 3 ][ 4 ] );
|
||||
|
|
|
@ -166,9 +166,9 @@ typedef enum {
|
|||
} netadrtype_t;
|
||||
|
||||
typedef enum {
|
||||
// NS_MASTER,
|
||||
NS_SERVER,
|
||||
NS_CLIENT
|
||||
//NS_MASTER,
|
||||
NS_CLIENT,
|
||||
NS_SERVER
|
||||
} netsrc_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue