mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-24 00:43:50 +00:00
Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
|
cb322b563d | ||
|
940e53af6f | ||
|
7e1fe48ff2 | ||
|
2aa1e22002 |
15 changed files with 64 additions and 64 deletions
|
@ -321,7 +321,7 @@ else()
|
||||||
|
|
||||||
if ( UNIX )
|
if ( UNIX )
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
check_symbol_exists( "fts_set" "fts.h" HAVE_FTS )
|
check_symbol_exists( "fts_set" "sys/types.h;sys/stat.h;fts.h" HAVE_FTS )
|
||||||
if ( NOT HAVE_FTS )
|
if ( NOT HAVE_FTS )
|
||||||
include ( FindPkgConfig )
|
include ( FindPkgConfig )
|
||||||
pkg_check_modules( MUSL_FTS musl-fts )
|
pkg_check_modules( MUSL_FTS musl-fts )
|
||||||
|
@ -343,7 +343,7 @@ else()
|
||||||
# If we're compiling with a custom GCC on the Mac (which we know since g++-4.2 doesn't support C++11) statically link libgcc.
|
# If we're compiling with a custom GCC on the Mac (which we know since g++-4.2 doesn't support C++11) statically link libgcc.
|
||||||
set( ALL_C_FLAGS "-static-libgcc" )
|
set( ALL_C_FLAGS "-static-libgcc" )
|
||||||
endif()
|
endif()
|
||||||
elseif( NOT MINGW )
|
elseif( NOT MINGW AND NOT HAIKU )
|
||||||
# Generic GCC/Clang requires position independent executable to be enabled explicitly
|
# Generic GCC/Clang requires position independent executable to be enabled explicitly
|
||||||
set( ALL_C_FLAGS "${ALL_C_FLAGS} -fPIE" )
|
set( ALL_C_FLAGS "${ALL_C_FLAGS} -fPIE" )
|
||||||
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie" )
|
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie" )
|
||||||
|
|
|
@ -188,7 +188,11 @@ if(WIN32)
|
||||||
add_definitions(-DUNICODE -D_UNICODE)
|
add_definitions(-DUNICODE -D_UNICODE)
|
||||||
else()
|
else()
|
||||||
set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_UNIX_SOURCES})
|
set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_UNIX_SOURCES})
|
||||||
set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
|
if(NOT HAIKU)
|
||||||
|
set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
|
||||||
|
else()
|
||||||
|
set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})
|
||||||
|
endif()
|
||||||
add_definitions(-DUNIX -D_UNIX)
|
add_definitions(-DUNIX -D_UNIX)
|
||||||
add_link_options(-pthread)
|
add_link_options(-pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -130,7 +130,11 @@ elseif(APPLE)
|
||||||
add_link_options(-pthread)
|
add_link_options(-pthread)
|
||||||
else()
|
else()
|
||||||
set(ZWIDGET_SOURCES ${ZWIDGET_SOURCES} ${ZWIDGET_SDL2_SOURCES})
|
set(ZWIDGET_SOURCES ${ZWIDGET_SOURCES} ${ZWIDGET_SDL2_SOURCES})
|
||||||
set(ZWIDGET_LIBS ${CMAKE_DL_LIBS} -ldl)
|
if(NOT HAIKU)
|
||||||
|
set(ZWIDGET_LIBS ${CMAKE_DL_LIBS} -ldl)
|
||||||
|
else()
|
||||||
|
set(ZWIDGET_LIBS ${CMAKE_DL_LIBS})
|
||||||
|
endif()
|
||||||
add_definitions(-DUNIX -D_UNIX)
|
add_definitions(-DUNIX -D_UNIX)
|
||||||
add_link_options(-pthread)
|
add_link_options(-pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "zstring.h"
|
#include "zstring.h"
|
||||||
|
|
||||||
#ifdef __unix__
|
#if defined(__unix__) || defined(__HAIKU__)
|
||||||
FString GetUserFile (const char *path);
|
FString GetUserFile (const char *path);
|
||||||
#endif
|
#endif
|
||||||
FString M_GetAppDataPath(bool create);
|
FString M_GetAppDataPath(bool create);
|
||||||
|
|
|
@ -112,7 +112,11 @@ FString M_GetAppDataPath(bool create)
|
||||||
{
|
{
|
||||||
// Don't use GAME_DIR and such so that ZDoom and its child ports can
|
// Don't use GAME_DIR and such so that ZDoom and its child ports can
|
||||||
// share the node cache.
|
// share the node cache.
|
||||||
FString path = NicePath("$HOME/.config/" GAMENAMELOWERCASE);
|
#if defined(__HAIKU__)
|
||||||
|
FString path = NicePath("$HOME/config/settings/" GAMENAME);
|
||||||
|
#else
|
||||||
|
FString path = NicePath("$HOME/.config/" GAMENAMELOWERCASE);
|
||||||
|
#endif
|
||||||
if (create)
|
if (create)
|
||||||
{
|
{
|
||||||
CreatePath(path.GetChars());
|
CreatePath(path.GetChars());
|
||||||
|
|
|
@ -134,7 +134,7 @@ static PROC WinGetProcAddress(const char *name)
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
|
#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
|
||||||
#else
|
#else
|
||||||
#if defined(__sgi) || defined(__sun) || defined(__unix__)
|
#if defined(__sgi) || defined(__sun) || defined(__unix__) || defined(__HAIKU__)
|
||||||
void* SDL_GL_GetProcAddress(const char* proc);
|
void* SDL_GL_GetProcAddress(const char* proc);
|
||||||
#define IntGetProcAddress(name) SDL_GL_GetProcAddress((const char*)name)
|
#define IntGetProcAddress(name) SDL_GL_GetProcAddress((const char*)name)
|
||||||
//#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
|
//#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
|
||||||
|
|
|
@ -539,15 +539,9 @@ struct TVector3
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns the XY fields as a 2D-vector.
|
constexpr Vector2 XY() const
|
||||||
constexpr const Vector2& XY() const
|
|
||||||
{
|
{
|
||||||
return *reinterpret_cast<const Vector2*>(this);
|
return Vector2(X, Y);
|
||||||
}
|
|
||||||
|
|
||||||
constexpr Vector2& XY()
|
|
||||||
{
|
|
||||||
return *reinterpret_cast<Vector2*>(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a 3D vector and a 2D vector.
|
// Add a 3D vector and a 2D vector.
|
||||||
|
@ -785,28 +779,16 @@ struct TVector4
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns the XY fields as a 2D-vector.
|
// returns the XY fields as a 2D-vector.
|
||||||
constexpr const Vector2& XY() const
|
constexpr Vector2 XY() const
|
||||||
{
|
{
|
||||||
return *reinterpret_cast<const Vector2*>(this);
|
return Vector2(X, Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Vector2& XY()
|
constexpr Vector3 XYZ() const
|
||||||
{
|
{
|
||||||
return *reinterpret_cast<Vector2*>(this);
|
return Vector3(X, Y, Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns the XY fields as a 2D-vector.
|
|
||||||
constexpr const Vector3& XYZ() const
|
|
||||||
{
|
|
||||||
return *reinterpret_cast<const Vector3*>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr Vector3& XYZ()
|
|
||||||
{
|
|
||||||
return *reinterpret_cast<Vector3*>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Test for approximate equality
|
// Test for approximate equality
|
||||||
bool ApproximatelyEquals(const TVector4 &other) const
|
bool ApproximatelyEquals(const TVector4 &other) const
|
||||||
{
|
{
|
||||||
|
@ -1789,7 +1771,9 @@ struct TRotator
|
||||||
template<class T>
|
template<class T>
|
||||||
inline TVector3<T>::TVector3 (const TRotator<T> &rot)
|
inline TVector3<T>::TVector3 (const TRotator<T> &rot)
|
||||||
{
|
{
|
||||||
XY() = rot.Pitch.Cos() * rot.Yaw.ToVector();
|
auto XY = rot.Pitch.Cos() * rot.Yaw.ToVector();
|
||||||
|
X = XY.X;
|
||||||
|
Y = XY.Y;
|
||||||
Z = rot.Pitch.Sin();
|
Z = rot.Pitch.Sin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -490,12 +490,13 @@ inline int clipmove(DVector3& pos, sectortype** const sect, const DVector2& mvec
|
||||||
return result.type;
|
return result.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int clipmove(DVector2& pos, double z, sectortype** const sect, const DVector2& mvec,
|
inline int clipmove(DVector3& pos, double z, sectortype** const sect, const DVector2& mvec,
|
||||||
double const walldist, double const ceildist, double const flordist, unsigned const cliptype, CollisionBase& result, int clipmoveboxtracenum = 3)
|
double const walldist, double const ceildist, double const flordist, unsigned const cliptype, CollisionBase& result, int clipmoveboxtracenum = 3)
|
||||||
{
|
{
|
||||||
auto vect = DVector3(pos, z);
|
auto vect = DVector3(pos.XY(), z);
|
||||||
auto res = clipmove(vect, sect, mvec, walldist, ceildist, flordist, cliptype, result);
|
auto res = clipmove(vect, sect, mvec, walldist, ceildist, flordist, cliptype, result);
|
||||||
pos = vect.XY();
|
pos.X = vect.X;
|
||||||
|
pos.Y = vect.Y;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -227,11 +227,12 @@ bool checkOpening(const DVector2& inpos, double z, const sectortype* sec, const
|
||||||
int pushmove(DVector3& pos, sectortype** pSect, double walldist, double ceildist, double flordist, unsigned cliptype);
|
int pushmove(DVector3& pos, sectortype** pSect, double walldist, double ceildist, double flordist, unsigned cliptype);
|
||||||
tspritetype* renderAddTsprite(tspriteArray& tsprites, DCoreActor* actor);
|
tspritetype* renderAddTsprite(tspriteArray& tsprites, DCoreActor* actor);
|
||||||
|
|
||||||
inline int pushmove(DVector2& pos, double z, sectortype** pSect, double walldist, double ceildist, double flordist, unsigned cliptype)
|
inline int pushmove(DVector3& pos, double z, sectortype** pSect, double walldist, double ceildist, double flordist, unsigned cliptype)
|
||||||
{
|
{
|
||||||
auto vect = DVector3(pos, z);
|
auto vect = DVector3(pos.XY(), z);
|
||||||
auto result = pushmove(vect, pSect, walldist, ceildist, flordist, cliptype);
|
auto result = pushmove(vect, pSect, walldist, ceildist, flordist, cliptype);
|
||||||
pos = vect.XY();
|
pos.X = vect.X;
|
||||||
|
pos.Y = vect.Y;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,19 +41,19 @@ const char *GetVersionString();
|
||||||
|
|
||||||
/** Lots of different version numbers **/
|
/** Lots of different version numbers **/
|
||||||
|
|
||||||
#define VERSIONSTR "1.11pre"
|
#define VERSIONSTR "1.12pre"
|
||||||
|
|
||||||
// The version as seen in the Windows resource
|
// The version as seen in the Windows resource
|
||||||
#define RC_FILEVERSION 1,10,9999,0
|
#define RC_FILEVERSION 1,11,9999,0
|
||||||
#define RC_PRODUCTVERSION 1,10,9999,0
|
#define RC_PRODUCTVERSION 1,11,9999,0
|
||||||
#define RC_PRODUCTVERSION2 VERSIONSTR
|
#define RC_PRODUCTVERSION2 VERSIONSTR
|
||||||
// These are for content versioning.
|
// These are for content versioning.
|
||||||
#define VER_MAJOR 4
|
#define VER_MAJOR 4
|
||||||
#define VER_MINOR 12
|
#define VER_MINOR 13
|
||||||
#define VER_REVISION 0
|
#define VER_REVISION 0
|
||||||
|
|
||||||
#define ENG_MAJOR 1
|
#define ENG_MAJOR 1
|
||||||
#define ENG_MINOR 11
|
#define ENG_MINOR 12
|
||||||
#define ENG_REVISION 0
|
#define ENG_REVISION 0
|
||||||
|
|
||||||
// More stuff that needs to be different for derivatives.
|
// More stuff that needs to be different for derivatives.
|
||||||
|
@ -86,6 +86,8 @@ const char *GetVersionString();
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(_WIN32)
|
#if defined(__APPLE__) || defined(_WIN32)
|
||||||
#define GAME_DIR GAMENAMELOWERCASE
|
#define GAME_DIR GAMENAMELOWERCASE
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
#define GAME_DIR "config/settings/" GAMENAME
|
||||||
#else
|
#else
|
||||||
#define GAME_DIR ".config/" GAMENAMELOWERCASE
|
#define GAME_DIR ".config/" GAMENAMELOWERCASE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -590,7 +590,7 @@ void playerisdead(DDukePlayer* const p, int psectlotag, double floorz, double ce
|
||||||
}
|
}
|
||||||
|
|
||||||
Collision coll;
|
Collision coll;
|
||||||
clipmove(actor->spr.pos.XY(), actor->getOffsetZ(), &p->cursector, DVector2( 0, 0), 10.25, 4., 4., CLIPMASK0, coll);
|
clipmove(actor->spr.pos, actor->getOffsetZ(), &p->cursector, DVector2( 0, 0), 10.25, 4., 4., CLIPMASK0, coll);
|
||||||
}
|
}
|
||||||
|
|
||||||
actor->backuploc();
|
actor->backuploc();
|
||||||
|
@ -599,7 +599,7 @@ void playerisdead(DDukePlayer* const p, int psectlotag, double floorz, double ce
|
||||||
|
|
||||||
updatesector(actor->getPosWithOffsetZ(), &p->cursector);
|
updatesector(actor->getPosWithOffsetZ(), &p->cursector);
|
||||||
|
|
||||||
pushmove(actor->spr.pos.XY(), actor->getOffsetZ(), &p->cursector, 8, 4, 20, CLIPMASK0);
|
pushmove(actor->spr.pos, actor->getOffsetZ(), &p->cursector, 8, 4, 20, CLIPMASK0);
|
||||||
|
|
||||||
if (floorz > ceilingz + 16 && actor->spr.pal != 1)
|
if (floorz > ceilingz + 16 && actor->spr.pal != 1)
|
||||||
p->ViewAngles.Roll = DAngle::fromBuild(-(p->dead_flag + ((floorz + actor->getOffsetZ()) * 2)));
|
p->ViewAngles.Roll = DAngle::fromBuild(-(p->dead_flag + ((floorz + actor->getOffsetZ()) * 2)));
|
||||||
|
|
|
@ -1828,7 +1828,7 @@ HORIZONLY:
|
||||||
ChangeActorSect(pact, p->cursector);
|
ChangeActorSect(pact, p->cursector);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
clipmove(pact->spr.pos.XY(), pact->getOffsetZ(), &p->cursector, p->vel.XY(), 10.25, 4., iif, CLIPMASK0, clip);
|
clipmove(pact->spr.pos, pact->getOffsetZ(), &p->cursector, p->vel.XY(), 10.25, 4., iif, CLIPMASK0, clip);
|
||||||
|
|
||||||
if (p->jetpack_on == 0 && psectlotag != 2 && psectlotag != 1 && shrunk)
|
if (p->jetpack_on == 0 && psectlotag != 2 && psectlotag != 1 && shrunk)
|
||||||
pact->spr.pos.Z += 32;
|
pact->spr.pos.Z += 32;
|
||||||
|
@ -1881,7 +1881,7 @@ HORIZONLY:
|
||||||
while (ud.clipping == 0)
|
while (ud.clipping == 0)
|
||||||
{
|
{
|
||||||
int blocked;
|
int blocked;
|
||||||
blocked = (pushmove(pact->spr.pos.XY(), pact->getOffsetZ(), &p->cursector, 10.25, 4, 4, CLIPMASK0) < 0 && furthestangle(pact, 8) < DAngle90);
|
blocked = (pushmove(pact->spr.pos, pact->getOffsetZ(), &p->cursector, 10.25, 4, 4, CLIPMASK0) < 0 && furthestangle(pact, 8) < DAngle90);
|
||||||
|
|
||||||
if (fabs(pact->floorz - pact->ceilingz) < 48 || blocked)
|
if (fabs(pact->floorz - pact->ceilingz) < 48 || blocked)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2720,7 +2720,7 @@ HORIZONLY:
|
||||||
ChangeActorSect(pact, p->cursector);
|
ChangeActorSect(pact, p->cursector);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
clipmove(pact->spr.pos.XY(), pact->getOffsetZ(), &p->cursector, p->vel.XY(), 10.25, 4., iif, CLIPMASK0, clip);
|
clipmove(pact->spr.pos, pact->getOffsetZ(), &p->cursector, p->vel.XY(), 10.25, 4., iif, CLIPMASK0, clip);
|
||||||
|
|
||||||
if (p->jetpack_on == 0 && psectlotag != 2 && psectlotag != 1 && shrunk)
|
if (p->jetpack_on == 0 && psectlotag != 2 && psectlotag != 1 && shrunk)
|
||||||
pact->spr.pos.Z += 32;
|
pact->spr.pos.Z += 32;
|
||||||
|
@ -2749,10 +2749,10 @@ HORIZONLY:
|
||||||
if (wal->lotag < 44)
|
if (wal->lotag < 44)
|
||||||
{
|
{
|
||||||
dofurniture(p, clip.hitWall);
|
dofurniture(p, clip.hitWall);
|
||||||
pushmove(pact->spr.pos.XY(), pact->getOffsetZ(), &p->cursector, 10.75, 4, 4, CLIPMASK0);
|
pushmove(pact->spr.pos, pact->getOffsetZ(), &p->cursector, 10.75, 4, 4, CLIPMASK0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pushmove(pact->spr.pos.XY(), pact->getOffsetZ(), &p->cursector, 10.75, 4, 4, CLIPMASK0);
|
pushmove(pact->spr.pos, pact->getOffsetZ(), &p->cursector, 10.75, 4, 4, CLIPMASK0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2833,9 +2833,9 @@ HORIZONLY:
|
||||||
{
|
{
|
||||||
int blocked;
|
int blocked;
|
||||||
if (pact->clipdist == 16)
|
if (pact->clipdist == 16)
|
||||||
blocked = (pushmove(pact->spr.pos.XY(), pact->getOffsetZ(), &p->cursector, 8, 4, 4, CLIPMASK0) < 0 && furthestangle(pact, 8) < DAngle90);
|
blocked = (pushmove(pact->spr.pos, pact->getOffsetZ(), &p->cursector, 8, 4, 4, CLIPMASK0) < 0 && furthestangle(pact, 8) < DAngle90);
|
||||||
else
|
else
|
||||||
blocked = (pushmove(pact->spr.pos.XY(), pact->getOffsetZ(), &p->cursector, 1, 4, 4, CLIPMASK0) < 0 && furthestangle(pact, 8) < DAngle90);
|
blocked = (pushmove(pact->spr.pos, pact->getOffsetZ(), &p->cursector, 1, 4, 4, CLIPMASK0) < 0 && furthestangle(pact, 8) < DAngle90);
|
||||||
|
|
||||||
if (fabs(pact->floorz - pact->ceilingz) < 48 || blocked)
|
if (fabs(pact->floorz - pact->ceilingz) < 48 || blocked)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1842,7 +1842,7 @@ void DoPlayerSlide(DSWPlayer* pp)
|
||||||
if (abs(pp->slide_vect.X) < 0.05 && abs(pp->slide_vect.Y) < 0.05)
|
if (abs(pp->slide_vect.X) < 0.05 && abs(pp->slide_vect.Y) < 0.05)
|
||||||
pp->slide_vect.Zero();
|
pp->slide_vect.Zero();
|
||||||
|
|
||||||
push_ret = pushmove(pp->GetActor()->spr.pos.XY(), pp->GetActor()->getOffsetZ(), &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
push_ret = pushmove(pp->GetActor()->spr.pos, pp->GetActor()->getOffsetZ(), &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
if (!(pp->Flags & PF_DEAD))
|
if (!(pp->Flags & PF_DEAD))
|
||||||
|
@ -1856,10 +1856,10 @@ void DoPlayerSlide(DSWPlayer* pp)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Collision coll;
|
Collision coll;
|
||||||
clipmove(pp->GetActor()->spr.pos.XY(), pp->GetActor()->getOffsetZ(), &pp->cursector, pp->slide_vect, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
clipmove(pp->GetActor()->spr.pos, pp->GetActor()->getOffsetZ(), &pp->cursector, pp->slide_vect, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
||||||
|
|
||||||
PlayerCheckValidMove(pp);
|
PlayerCheckValidMove(pp);
|
||||||
push_ret = pushmove(pp->GetActor()->spr.pos.XY(), pp->GetActor()->getOffsetZ(), &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
push_ret = pushmove(pp->GetActor()->spr.pos, pp->GetActor()->getOffsetZ(), &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
if (!(pp->Flags & PF_DEAD))
|
if (!(pp->Flags & PF_DEAD))
|
||||||
|
@ -2008,7 +2008,7 @@ void DoPlayerMove(DSWPlayer* pp)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
push_ret = pushmove(pp->GetActor()->spr.pos.XY(), pp->GetActor()->getOffsetZ(), &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist - 16., CLIPMASK_PLAYER);
|
push_ret = pushmove(pp->GetActor()->spr.pos, pp->GetActor()->getOffsetZ(), &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist - 16., CLIPMASK_PLAYER);
|
||||||
|
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
|
@ -2031,12 +2031,12 @@ void DoPlayerMove(DSWPlayer* pp)
|
||||||
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
|
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
|
||||||
Collision coll;
|
Collision coll;
|
||||||
updatesector(pp->GetActor()->getPosWithOffsetZ(), &pp->cursector);
|
updatesector(pp->GetActor()->getPosWithOffsetZ(), &pp->cursector);
|
||||||
clipmove(pp->GetActor()->spr.pos.XY(), pp->GetActor()->getOffsetZ(), &pp->cursector, pp->vect, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
clipmove(pp->GetActor()->spr.pos, pp->GetActor()->getOffsetZ(), &pp->cursector, pp->vect, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
||||||
|
|
||||||
actor->spr.cstat = save_cstat;
|
actor->spr.cstat = save_cstat;
|
||||||
PlayerCheckValidMove(pp);
|
PlayerCheckValidMove(pp);
|
||||||
|
|
||||||
push_ret = pushmove(pp->GetActor()->spr.pos.XY(), pp->GetActor()->getOffsetZ(), &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist - 16., CLIPMASK_PLAYER);
|
push_ret = pushmove(pp->GetActor()->spr.pos, pp->GetActor()->getOffsetZ(), &pp->cursector, actor->clipdist, pp->p_ceiling_dist, pp->p_floor_dist - 16., CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2626,7 +2626,7 @@ void DoPlayerMoveVehicle(DSWPlayer* pp)
|
||||||
if (pp->sop->clipdist)
|
if (pp->sop->clipdist)
|
||||||
{
|
{
|
||||||
Collision coll;
|
Collision coll;
|
||||||
clipmove(plActor->spr.pos.XY(), zz, &pp->cursector, pp->vect, pp->sop->clipdist, 4., floordist, CLIPMASK_PLAYER, actor->user.coll);
|
clipmove(plActor->spr.pos, zz, &pp->cursector, pp->vect, pp->sop->clipdist, 4., floordist, CLIPMASK_PLAYER, actor->user.coll);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -4612,7 +4612,7 @@ void DoPlayerCurrent(DSWPlayer* pp)
|
||||||
|
|
||||||
auto vect = sectu->angle.ToVector() / 256. * sectu->speed * synctics; // 16384 >> 4 - Beware of clipmove's odd format for vect!
|
auto vect = sectu->angle.ToVector() / 256. * sectu->speed * synctics; // 16384 >> 4 - Beware of clipmove's odd format for vect!
|
||||||
|
|
||||||
push_ret = pushmove(pp->GetActor()->spr.pos.XY(), pp->GetActor()->getOffsetZ(), &pp->cursector, pp->GetActor()->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
push_ret = pushmove(pp->GetActor()->spr.pos, pp->GetActor()->getOffsetZ(), &pp->cursector, pp->GetActor()->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
if (!(pp->Flags & PF_DEAD))
|
if (!(pp->Flags & PF_DEAD))
|
||||||
|
@ -4628,10 +4628,10 @@ void DoPlayerCurrent(DSWPlayer* pp)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Collision coll;
|
Collision coll;
|
||||||
clipmove(pp->GetActor()->spr.pos.XY(), pp->GetActor()->getOffsetZ(), &pp->cursector, vect, pp->GetActor()->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
clipmove(pp->GetActor()->spr.pos, pp->GetActor()->getOffsetZ(), &pp->cursector, vect, pp->GetActor()->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER, coll);
|
||||||
|
|
||||||
PlayerCheckValidMove(pp);
|
PlayerCheckValidMove(pp);
|
||||||
pushmove(pp->GetActor()->spr.pos.XY(), pp->GetActor()->getOffsetZ(), &pp->cursector, pp->GetActor()->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
pushmove(pp->GetActor()->spr.pos, pp->GetActor()->getOffsetZ(), &pp->cursector, pp->GetActor()->clipdist, pp->p_ceiling_dist, pp->p_floor_dist, CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
{
|
{
|
||||||
if (!(pp->Flags & PF_DEAD))
|
if (!(pp->Flags & PF_DEAD))
|
||||||
|
|
|
@ -194,7 +194,7 @@ class AltHud ui
|
||||||
{
|
{
|
||||||
String s = String.Format("%02i:%02i:%02i", seconds / 3600, (seconds % 3600) / 60, seconds % 60);
|
String s = String.Format("%02i:%02i:%02i", seconds / 3600, (seconds % 3600) / 60, seconds % 60);
|
||||||
int length = 8 * fnt.GetCharWidth("0");
|
int length = 8 * fnt.GetCharWidth("0");
|
||||||
DrawHudText(fnt, color, s, x-length, y, trans, fontscale);
|
DrawHudText(fnt, color, s, x-length * fontscale, y, trans, fontscale);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -638,8 +638,8 @@ class AltHud ui
|
||||||
let allname = amstr .. volname;
|
let allname = amstr .. volname;
|
||||||
let myfont = generic_ui? NewSmallFont : StatFont.CanPrint(allname)? StatFont : OriginalSmallFont;
|
let myfont = generic_ui? NewSmallFont : StatFont.CanPrint(allname)? StatFont : OriginalSmallFont;
|
||||||
int bottom = hudheight - 1;
|
int bottom = hudheight - 1;
|
||||||
int fonth = myfont.GetHeight() + 1;
|
|
||||||
double fontscale = generic_ui? 1. : currentStats.info.fontscale;
|
double fontscale = generic_ui? 1. : currentStats.info.fontscale;
|
||||||
|
double fonth = myfont.GetHeight() * fontscale + 1;
|
||||||
|
|
||||||
if (am_showtotaltime)
|
if (am_showtotaltime)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue