Add shared/include.src, so we touch gamename/include.src less for global
changes.
This commit is contained in:
parent
c100554dcc
commit
97d19c1b37
32 changed files with 120 additions and 56 deletions
|
@ -38,4 +38,5 @@
|
||||||
../cstrike/radio.c
|
../cstrike/radio.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -34,4 +34,5 @@
|
||||||
../valve/input.c
|
../valve/input.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -34,5 +34,5 @@
|
||||||
../valve/input.c
|
../valve/input.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -34,5 +34,5 @@
|
||||||
../valve/input.c
|
../valve/input.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -34,5 +34,5 @@
|
||||||
../valve/input.c
|
../valve/input.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -33,4 +33,5 @@
|
||||||
../valve/input.c
|
../valve/input.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -33,4 +33,5 @@
|
||||||
../valve/input.c
|
../valve/input.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -33,4 +33,5 @@
|
||||||
../valve/input.c
|
../valve/input.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#includelist
|
#includelist
|
||||||
../shared/fteextensions.qc
|
../shared/fteextensions.qc
|
||||||
../shared/math.h
|
../shared/math.h
|
||||||
|
../shared/math.c
|
||||||
defs.h
|
defs.h
|
||||||
bitmaps.h
|
bitmaps.h
|
||||||
strings.h
|
strings.h
|
||||||
|
|
|
@ -57,4 +57,5 @@
|
||||||
../cstrike/spawn.c
|
../cstrike/spawn.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -89,5 +89,6 @@
|
||||||
../valve/spawn.c
|
../valve/spawn.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
||||||
|
|
|
@ -86,4 +86,5 @@
|
||||||
../valve/spawn.c
|
../valve/spawn.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -84,4 +84,5 @@
|
||||||
../valve/spawn.c
|
../valve/spawn.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -49,4 +49,5 @@
|
||||||
../valve/spawn.c
|
../valve/spawn.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -84,4 +84,5 @@
|
||||||
../valve/spawn.c
|
../valve/spawn.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -40,5 +40,6 @@
|
||||||
../tfc/spawn.c
|
../tfc/spawn.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
||||||
|
|
|
@ -84,4 +84,5 @@
|
||||||
../valve/spawn.c
|
../valve/spawn.c
|
||||||
|
|
||||||
../include.src
|
../include.src
|
||||||
|
../../shared/include.src
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#includelist
|
#includelist
|
||||||
../../shared/cstrike/defs.h
|
../../shared/cstrike/defs.h
|
||||||
../../shared/cstrike/flags.h
|
../../shared/cstrike/flags.h
|
||||||
../../shared/sound.c
|
|
||||||
../../shared/cstrike/animations.h
|
../../shared/cstrike/animations.h
|
||||||
../../shared/cstrike/animations.c
|
../../shared/cstrike/animations.c
|
||||||
../../shared/cstrike/player.h
|
../../shared/cstrike/player.h
|
||||||
|
@ -49,6 +48,5 @@
|
||||||
../../shared/cstrike/weapons.c
|
../../shared/cstrike/weapons.c
|
||||||
../../shared/valve/weapon_common.c
|
../../shared/valve/weapon_common.c
|
||||||
../../shared/cstrike/pmove.c
|
../../shared/cstrike/pmove.c
|
||||||
../../shared/pmove.c
|
|
||||||
../../shared/cstrike/item_c4bomb.cpp
|
../../shared/cstrike/item_c4bomb.cpp
|
||||||
#endlist
|
#endlist
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "materials.h"
|
#include "materials.h"
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
#include "pmove.h"
|
||||||
|
|
||||||
/* Those are constant for HL BSP and CANNOT be changed.
|
/* Those are constant for HL BSP and CANNOT be changed.
|
||||||
* Blame Valve for purchasing a Quake II license but not
|
* Blame Valve for purchasing a Quake II license but not
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
#includelist
|
#includelist
|
||||||
../../shared/valve/entities.h
|
../../shared/valve/entities.h
|
||||||
../../shared/valve/flags.h
|
../../shared/valve/flags.h
|
||||||
../../shared/sound.c
|
|
||||||
../../shared/gearbox/player.cpp
|
../../shared/gearbox/player.cpp
|
||||||
../../shared/valve/weapon_common.h
|
../../shared/valve/weapon_common.h
|
||||||
../../shared/valve/animations.h
|
../../shared/valve/animations.h
|
||||||
../../shared/valve/animations.c
|
../../shared/valve/animations.c
|
||||||
../../shared/valve/pmove.c
|
../../shared/valve/pmove.c
|
||||||
../../shared/pmove.c
|
|
||||||
|
|
||||||
../../shared/valve/fx_blood.c
|
../../shared/valve/fx_blood.c
|
||||||
../../shared/valve/fx_breakmodel.c
|
../../shared/valve/fx_breakmodel.c
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
#includelist
|
#includelist
|
||||||
../../shared/valve/entities.h
|
../../shared/valve/entities.h
|
||||||
../../shared/valve/flags.h
|
../../shared/valve/flags.h
|
||||||
../../shared/sound.c
|
|
||||||
../../shared/hunger/player.cpp
|
../../shared/hunger/player.cpp
|
||||||
../../shared/valve/weapon_common.h
|
../../shared/valve/weapon_common.h
|
||||||
../../shared/valve/animations.h
|
../../shared/valve/animations.h
|
||||||
../../shared/valve/animations.c
|
../../shared/valve/animations.c
|
||||||
../../shared/valve/pmove.c
|
../../shared/valve/pmove.c
|
||||||
../../shared/pmove.c
|
|
||||||
|
|
||||||
../../shared/valve/fx_blood.c
|
../../shared/valve/fx_blood.c
|
||||||
../../shared/valve/fx_breakmodel.c
|
../../shared/valve/fx_breakmodel.c
|
||||||
|
|
5
src/shared/include.src
Normal file
5
src/shared/include.src
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#includelist
|
||||||
|
pmove.c
|
||||||
|
sound.c
|
||||||
|
math.c
|
||||||
|
#endlist
|
47
src/shared/math.c
Normal file
47
src/shared/math.c
Normal 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;
|
||||||
|
}
|
|
@ -16,32 +16,7 @@
|
||||||
|
|
||||||
#define MATH_PI 3.1415926
|
#define MATH_PI 3.1415926
|
||||||
|
|
||||||
float
|
float Math_LerpAngle(float fStart, float fEnd, float fAmount);
|
||||||
Math_LerpAngle(float fStart, float fEnd, float fAmount)
|
float Math_Lerp(float fA, float fB, float fPercent);
|
||||||
{
|
float Math_FixDelta(float fDelta);
|
||||||
float shortest_angle = ((((fEnd - fStart) % 360) + 540) % 360) - 180;
|
vector Math_Reflect(vector v1, vector v2);
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -16,19 +16,14 @@
|
||||||
|
|
||||||
/* FIXME: jumptime should use the time global, as time intervals are not
|
/* FIXME: jumptime should use the time global, as time intervals are not
|
||||||
* predictable - decrement it based upon input_timelength */
|
* 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
|
/* 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.
|
* about physics variables. so none of the traditional cvars will work.
|
||||||
* otherwise we could not have reliable prediction code for player movement.
|
* otherwise we could not have reliable prediction code for player movement.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
PMove_Init(void) {
|
PMove_Init(void)
|
||||||
|
{
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
localcmd("serverinfo phy_stepheight 18\n");
|
localcmd("serverinfo phy_stepheight 18\n");
|
||||||
localcmd("serverinfo phy_airstepheight 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. */
|
/* figure out where we are in the geometry. void, solid, liquid, etc. */
|
||||||
void
|
void
|
||||||
PMove_Categorize(void)
|
PMove_Categorize(void)
|
||||||
|
|
43
src/shared/pmove.h
Normal file
43
src/shared/pmove.h
Normal 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);
|
|
@ -1,12 +1,10 @@
|
||||||
#includelist
|
#includelist
|
||||||
../../shared/valve/flags.h
|
../../shared/valve/flags.h
|
||||||
../../shared/sound.c
|
|
||||||
../../shared/poke646/player.cpp
|
../../shared/poke646/player.cpp
|
||||||
../../shared/valve/weapon_common.h
|
../../shared/valve/weapon_common.h
|
||||||
../../shared/valve/animations.h
|
../../shared/valve/animations.h
|
||||||
../../shared/valve/animations.c
|
../../shared/valve/animations.c
|
||||||
../../shared/valve/pmove.c
|
../../shared/valve/pmove.c
|
||||||
../../shared/pmove.c
|
|
||||||
|
|
||||||
../../shared/valve/fx_blood.c
|
../../shared/valve/fx_blood.c
|
||||||
../../shared/valve/fx_breakmodel.c
|
../../shared/valve/fx_breakmodel.c
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
#includelist
|
#includelist
|
||||||
../../shared/valve/flags.h
|
../../shared/valve/flags.h
|
||||||
../../shared/sound.c
|
|
||||||
../../shared/rewolf/player.cpp
|
../../shared/rewolf/player.cpp
|
||||||
../../shared/valve/weapon_common.h
|
../../shared/valve/weapon_common.h
|
||||||
../../shared/valve/animations.h
|
../../shared/valve/animations.h
|
||||||
../../shared/valve/animations.c
|
../../shared/valve/animations.c
|
||||||
../../shared/valve/pmove.c
|
../../shared/valve/pmove.c
|
||||||
../../shared/pmove.c
|
|
||||||
|
|
||||||
../../shared/valve/fx_blood.c
|
../../shared/valve/fx_blood.c
|
||||||
../../shared/valve/fx_breakmodel.c
|
../../shared/valve/fx_breakmodel.c
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
#includelist
|
#includelist
|
||||||
../../shared/valve/entities.h
|
../../shared/valve/entities.h
|
||||||
../../shared/valve/flags.h
|
../../shared/valve/flags.h
|
||||||
../../shared/sound.c
|
|
||||||
../../shared/scihunt/player.cpp
|
../../shared/scihunt/player.cpp
|
||||||
../../shared/valve/weapon_common.h
|
../../shared/valve/weapon_common.h
|
||||||
../../shared/valve/animations.h
|
../../shared/valve/animations.h
|
||||||
../../shared/valve/animations.c
|
../../shared/valve/animations.c
|
||||||
../../shared/scihunt/pmove.c
|
../../shared/scihunt/pmove.c
|
||||||
../../shared/pmove.c
|
|
||||||
|
|
||||||
../../shared/valve/fx_blood.c
|
../../shared/valve/fx_blood.c
|
||||||
../../shared/valve/fx_breakmodel.c
|
../../shared/valve/fx_breakmodel.c
|
||||||
|
|
|
@ -55,6 +55,7 @@ snd_t *g_sounds;
|
||||||
int g_sounds_count;
|
int g_sounds_count;
|
||||||
|
|
||||||
void Sound_Init(void);
|
void Sound_Init(void);
|
||||||
|
void Sound_Shutdown(void);
|
||||||
void Sound_ParseField(int i, int a);
|
void Sound_ParseField(int i, int a);
|
||||||
int Sound_Parse(int i, string line, string shader);
|
int Sound_Parse(int i, string line, string shader);
|
||||||
int Sound_Precache(string shader);
|
int Sound_Precache(string shader);
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
#includelist
|
#includelist
|
||||||
../../shared/valve/flags.h
|
../../shared/valve/flags.h
|
||||||
../../shared/sound.c
|
|
||||||
../../shared/valve/player.cpp
|
../../shared/valve/player.cpp
|
||||||
../../shared/valve/weapon_common.h
|
../../shared/valve/weapon_common.h
|
||||||
../../shared/valve/animations.h
|
../../shared/valve/animations.h
|
||||||
../../shared/valve/animations.c
|
../../shared/valve/animations.c
|
||||||
../../shared/valve/pmove.c
|
../../shared/valve/pmove.c
|
||||||
../../shared/pmove.c
|
|
||||||
|
|
||||||
../../shared/valve/fx_blood.c
|
../../shared/valve/fx_blood.c
|
||||||
../../shared/valve/fx_breakmodel.c
|
../../shared/valve/fx_breakmodel.c
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
#includelist
|
#includelist
|
||||||
../../shared/valve/entities.h
|
../../shared/valve/entities.h
|
||||||
../../shared/valve/flags.h
|
../../shared/valve/flags.h
|
||||||
../../shared/sound.c
|
|
||||||
../../shared/valve/player.cpp
|
../../shared/valve/player.cpp
|
||||||
../../shared/valve/weapon_common.h
|
../../shared/valve/weapon_common.h
|
||||||
../../shared/valve/animations.h
|
../../shared/valve/animations.h
|
||||||
../../shared/valve/animations.c
|
../../shared/valve/animations.c
|
||||||
../../shared/valve/pmove.c
|
../../shared/valve/pmove.c
|
||||||
../../shared/pmove.c
|
|
||||||
|
|
||||||
../../shared/valve/fx_blood.c
|
../../shared/valve/fx_blood.c
|
||||||
../../shared/valve/fx_breakmodel.c
|
../../shared/valve/fx_breakmodel.c
|
||||||
|
|
Loading…
Reference in a new issue