Add shared/include.src, so we touch gamename/include.src less for global

changes.
This commit is contained in:
Marco Cawthorne 2020-10-30 12:21:00 +01:00
parent c100554dcc
commit 97d19c1b37
32 changed files with 120 additions and 56 deletions

View File

@ -38,4 +38,5 @@
../cstrike/radio.c
../include.src
../../shared/include.src
#endlist

View File

@ -34,4 +34,5 @@
../valve/input.c
../include.src
../../shared/include.src
#endlist

View File

@ -34,5 +34,5 @@
../valve/input.c
../include.src
../../shared/include.src
#endlist

View File

@ -34,5 +34,5 @@
../valve/input.c
../include.src
../../shared/include.src
#endlist

View File

@ -34,5 +34,5 @@
../valve/input.c
../include.src
../../shared/include.src
#endlist

View File

@ -33,4 +33,5 @@
../valve/input.c
../include.src
../../shared/include.src
#endlist

View File

@ -33,4 +33,5 @@
../valve/input.c
../include.src
../../shared/include.src
#endlist

View File

@ -33,4 +33,5 @@
../valve/input.c
../include.src
../../shared/include.src
#endlist

View File

@ -5,6 +5,7 @@
#includelist
../shared/fteextensions.qc
../shared/math.h
../shared/math.c
defs.h
bitmaps.h
strings.h

View File

@ -57,4 +57,5 @@
../cstrike/spawn.c
../include.src
../../shared/include.src
#endlist

View File

@ -89,5 +89,6 @@
../valve/spawn.c
../include.src
../../shared/include.src
#endlist

View File

@ -86,4 +86,5 @@
../valve/spawn.c
../include.src
../../shared/include.src
#endlist

View File

@ -84,4 +84,5 @@
../valve/spawn.c
../include.src
../../shared/include.src
#endlist

View File

@ -49,4 +49,5 @@
../valve/spawn.c
../include.src
../../shared/include.src
#endlist

View File

@ -84,4 +84,5 @@
../valve/spawn.c
../include.src
../../shared/include.src
#endlist

View File

@ -40,5 +40,6 @@
../tfc/spawn.c
../include.src
../../shared/include.src
#endlist

View File

@ -84,4 +84,5 @@
../valve/spawn.c
../include.src
../../shared/include.src
#endlist

View File

@ -1,7 +1,6 @@
#includelist
../../shared/cstrike/defs.h
../../shared/cstrike/flags.h
../../shared/sound.c
../../shared/cstrike/animations.h
../../shared/cstrike/animations.c
../../shared/cstrike/player.h
@ -49,6 +48,5 @@
../../shared/cstrike/weapons.c
../../shared/valve/weapon_common.c
../../shared/cstrike/pmove.c
../../shared/pmove.c
../../shared/cstrike/item_c4bomb.cpp
#endlist

View File

@ -25,6 +25,7 @@
#include "materials.h"
#include "math.h"
#include "sound.h"
#include "pmove.h"
/* Those are constant for HL BSP and CANNOT be changed.
* Blame Valve for purchasing a Quake II license but not

View File

@ -1,13 +1,11 @@
#includelist
../../shared/valve/entities.h
../../shared/valve/flags.h
../../shared/sound.c
../../shared/gearbox/player.cpp
../../shared/valve/weapon_common.h
../../shared/valve/animations.h
../../shared/valve/animations.c
../../shared/valve/pmove.c
../../shared/pmove.c
../../shared/valve/fx_blood.c
../../shared/valve/fx_breakmodel.c

View File

@ -1,13 +1,11 @@
#includelist
../../shared/valve/entities.h
../../shared/valve/flags.h
../../shared/sound.c
../../shared/hunger/player.cpp
../../shared/valve/weapon_common.h
../../shared/valve/animations.h
../../shared/valve/animations.c
../../shared/valve/pmove.c
../../shared/pmove.c
../../shared/valve/fx_blood.c
../../shared/valve/fx_breakmodel.c

5
src/shared/include.src Normal file
View File

@ -0,0 +1,5 @@
#includelist
pmove.c
sound.c
math.c
#endlist

47
src/shared/math.c Normal file
View File

@ -0,0 +1,47 @@
/*
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#define MATH_PI 3.1415926
float
Math_LerpAngle(float fStart, float fEnd, float fAmount)
{
float shortest_angle = ((((fEnd - fStart) % 360) + 540) % 360) - 180;
return shortest_angle * fAmount;
}
float
Math_Lerp(float fA, float fB, float fPercent)
{
return (fA * (1 - fPercent)) + (fB * fPercent);
}
float
Math_FixDelta(float fDelta)
{
if (fDelta >= 180) {
fDelta -= 360;
} else if (fDelta <= -180) {
fDelta += 360;
}
return fDelta;
}
vector
Math_Reflect(vector v1, vector v2)
{
return v1 - 2 * dotproduct(v1, v2) * v2;
}

View File

@ -16,32 +16,7 @@
#define MATH_PI 3.1415926
float
Math_LerpAngle(float fStart, float fEnd, float fAmount)
{
float shortest_angle = ((((fEnd - fStart) % 360) + 540) % 360) - 180;
return shortest_angle * fAmount;
}
float
Math_Lerp(float fA, float fB, float fPercent)
{
return (fA * (1 - fPercent)) + (fB * fPercent);
}
float
Math_FixDelta(float fDelta)
{
if (fDelta >= 180) {
fDelta -= 360;
} else if (fDelta <= -180) {
fDelta += 360;
}
return fDelta;
}
vector
Math_Reflect(vector v1, vector v2)
{
return v1 - 2 * dotproduct(v1, v2) * v2;
}
float Math_LerpAngle(float fStart, float fEnd, float fAmount);
float Math_Lerp(float fA, float fB, float fPercent);
float Math_FixDelta(float fDelta);
vector Math_Reflect(vector v1, vector v2);

View File

@ -16,19 +16,14 @@
/* FIXME: jumptime should use the time global, as time intervals are not
* predictable - decrement it based upon input_timelength */
.float waterlevel;
.float watertype;
.float maxspeed;
.vector view_ofs;
int trace_endcontentsi;
.vector basevelocity;
/* serverinfo keys are the only way both client and server are kept in sync
* about physics variables. so none of the traditional cvars will work.
* otherwise we could not have reliable prediction code for player movement.
*/
void
PMove_Init(void) {
PMove_Init(void)
{
#ifdef SERVER
localcmd("serverinfo phy_stepheight 18\n");
localcmd("serverinfo phy_airstepheight 18\n");
@ -77,7 +72,6 @@ PMove_Gravity(entity ent)
}
}
.entity groundentity;
/* figure out where we are in the geometry. void, solid, liquid, etc. */
void
PMove_Categorize(void)

43
src/shared/pmove.h Normal file
View File

@ -0,0 +1,43 @@
/*
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
.float waterlevel;
.float watertype;
.float maxspeed;
.vector view_ofs;
int trace_endcontentsi;
.vector basevelocity;
.entity groundentity;
void PMove_Init(void);
int PMove_Contents(vector org);
float PMove_Gravity(entity ent);
void PMove_Categorize(void);
void PMove_WaterMove(void);
void PMove_CheckWaterJump(void);
int QPMove_IsStuck(entity eTarget, vector vOffset, vector vecMins, vector vecMaxs);
void PMove_AccelToss(float move_time, float premove);
void PMove_AccelMove(float move_time, float premove);
void PMove_AccelWater(float move_time, float premove);
void PMove_AccelLadder(float move_time, float premove, vector wish_dir, float wish_speed);
void PMove_AccelFriction(float move_time, float premove, vector wish_dir, float wish_speed);
void PMove_AccelGravity(float move_time, float premove, vector wish_dir, float wish_speed);
void PMove_AccelJump(float move_time, float premove);
void PMove_Acceleration(float move_time, float premove);
void PMove_DoTouch(entity tother);
float PMove_Fix_Origin(void);
void PMove_Move(void);
void PMove_Run(void);

View File

@ -1,12 +1,10 @@
#includelist
../../shared/valve/flags.h
../../shared/sound.c
../../shared/poke646/player.cpp
../../shared/valve/weapon_common.h
../../shared/valve/animations.h
../../shared/valve/animations.c
../../shared/valve/pmove.c
../../shared/pmove.c
../../shared/valve/fx_blood.c
../../shared/valve/fx_breakmodel.c

View File

@ -1,12 +1,10 @@
#includelist
../../shared/valve/flags.h
../../shared/sound.c
../../shared/rewolf/player.cpp
../../shared/valve/weapon_common.h
../../shared/valve/animations.h
../../shared/valve/animations.c
../../shared/valve/pmove.c
../../shared/pmove.c
../../shared/valve/fx_blood.c
../../shared/valve/fx_breakmodel.c

View File

@ -1,13 +1,11 @@
#includelist
../../shared/valve/entities.h
../../shared/valve/flags.h
../../shared/sound.c
../../shared/scihunt/player.cpp
../../shared/valve/weapon_common.h
../../shared/valve/animations.h
../../shared/valve/animations.c
../../shared/scihunt/pmove.c
../../shared/pmove.c
../../shared/valve/fx_blood.c
../../shared/valve/fx_breakmodel.c

View File

@ -55,6 +55,7 @@ snd_t *g_sounds;
int g_sounds_count;
void Sound_Init(void);
void Sound_Shutdown(void);
void Sound_ParseField(int i, int a);
int Sound_Parse(int i, string line, string shader);
int Sound_Precache(string shader);

View File

@ -1,12 +1,10 @@
#includelist
../../shared/valve/flags.h
../../shared/sound.c
../../shared/valve/player.cpp
../../shared/valve/weapon_common.h
../../shared/valve/animations.h
../../shared/valve/animations.c
../../shared/valve/pmove.c
../../shared/pmove.c
../../shared/valve/fx_blood.c
../../shared/valve/fx_breakmodel.c

View File

@ -1,13 +1,11 @@
#includelist
../../shared/valve/entities.h
../../shared/valve/flags.h
../../shared/sound.c
../../shared/valve/player.cpp
../../shared/valve/weapon_common.h
../../shared/valve/animations.h
../../shared/valve/animations.c
../../shared/valve/pmove.c
../../shared/pmove.c
../../shared/valve/fx_blood.c
../../shared/valve/fx_breakmodel.c