- made player_t::crouchoffset and FPlayerStart's coordinates doubles and added a float version of divline_t so that I could complete the conversion of Hexen's game code.

- consolidated the actor based damage factor code which was repeated multiple times in various damage inflicting functions.
This commit is contained in:
Christoph Oelckers 2016-03-22 00:06:58 +01:00
commit 4155e84a1c
24 changed files with 133 additions and 121 deletions

View file

@ -73,7 +73,7 @@ fixed_t P_AproxDistance (fixed_t dx, fixed_t dy)
//
//==========================================================================
fixed_t P_InterceptVector (const divline_t *v2, const divline_t *v1)
fixed_t P_InterceptVector (const fdivline_t *v2, const fdivline_t *v1)
{
#if 0 // [RH] Use 64 bit ints, so long divlines don't overflow
@ -387,7 +387,7 @@ bool AActor::FixMapthingPos()
continue;
// Get the exact distance to the line
divline_t dll, dlv;
fdivline_t dll, dlv;
fixed_t linelen = (fixed_t)g_sqrt((double)ldef->dx*ldef->dx + (double)ldef->dy*ldef->dy);
P_MakeDivline(ldef, &dll);
@ -1197,7 +1197,7 @@ void FPathTraverse::AddLineIntercepts(int bx, int by)
int s1;
int s2;
fixed_t frac;
divline_t dl;
fdivline_t dl;
// avoid precision problems with two routines
if ( trace.dx > FRACUNIT*16
@ -1247,7 +1247,7 @@ void FPathTraverse::AddThingIntercepts (int bx, int by, FBlockThingsIterator &it
while ((thing = it.Next(compatible)))
{
int numfronts = 0;
divline_t line;
fdivline_t line;
int i;
@ -1358,7 +1358,7 @@ void FPathTraverse::AddThingIntercepts (int bx, int by, FBlockThingsIterator &it
// Old code for compatibility purposes
fixed_t x1, y1, x2, y2;
int s1, s2;
divline_t dl;
fdivline_t dl;
fixed_t frac;
bool tracepositive = (trace.dx ^ trace.dy)>0;
@ -1940,7 +1940,7 @@ int P_VanillaPointOnLineSide(fixed_t x, fixed_t y, const line_t* line)
//
//===========================================================================
int P_VanillaPointOnDivlineSide(fixed_t x, fixed_t y, const divline_t* line)
int P_VanillaPointOnDivlineSide(fixed_t x, fixed_t y, const fdivline_t* line)
{
fixed_t dx;
fixed_t dy;