mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'double-drawdist-flag' into 'master'
Double drawdist flag See merge request KartKrew/Kart!1106
This commit is contained in:
commit
c702e37ae2
4 changed files with 22 additions and 8 deletions
|
|
@ -5685,7 +5685,7 @@ const char *const MOBJFLAG_LIST[] = {
|
||||||
"BOSS",
|
"BOSS",
|
||||||
"SPAWNCEILING",
|
"SPAWNCEILING",
|
||||||
"NOGRAVITY",
|
"NOGRAVITY",
|
||||||
"AMBIENT",
|
"DRAWFROMFARAWAY",
|
||||||
"SLIDEME",
|
"SLIDEME",
|
||||||
"NOCLIP",
|
"NOCLIP",
|
||||||
"FLOAT",
|
"FLOAT",
|
||||||
|
|
|
||||||
|
|
@ -19016,7 +19016,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
100, // mass
|
100, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY|MF_AMBIENT, // flags
|
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -28256,7 +28256,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
0, // mass
|
0, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY|MF_AMBIENT, // flags
|
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -28283,7 +28283,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
0, // mass
|
0, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY|MF_AMBIENT, // flags
|
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,8 +122,8 @@ typedef enum
|
||||||
// Don't apply gravity (every tic); object will float, keeping current height
|
// Don't apply gravity (every tic); object will float, keeping current height
|
||||||
// or changing it actively.
|
// or changing it actively.
|
||||||
MF_NOGRAVITY = 1<<9,
|
MF_NOGRAVITY = 1<<9,
|
||||||
// This object is an ambient sound. Obsolete, but keep this around for backwards compatibility.
|
// This object is visible from a greater distance than normal objects.
|
||||||
MF_AMBIENT = 1<<10,
|
MF_DRAWFROMFARAWAY = 1<<10,
|
||||||
// Slide this object when it hits a wall.
|
// Slide this object when it hits a wall.
|
||||||
MF_SLIDEME = 1<<11,
|
MF_SLIDEME = 1<<11,
|
||||||
// Don't collide with walls or solid objects. Two MF_NOCLIP objects can't touch each other at all!
|
// Don't collide with walls or solid objects. Two MF_NOCLIP objects can't touch each other at all!
|
||||||
|
|
|
||||||
|
|
@ -3618,9 +3618,23 @@ boolean R_ThingWithinDist (mobj_t *thing, fixed_t limit_dist)
|
||||||
{
|
{
|
||||||
const fixed_t dist = R_PointToDist(thing->x, thing->y);
|
const fixed_t dist = R_PointToDist(thing->x, thing->y);
|
||||||
|
|
||||||
if (limit_dist && dist > limit_dist)
|
if (limit_dist)
|
||||||
{
|
{
|
||||||
return false;
|
if (thing->flags & MF_DRAWFROMFARAWAY)
|
||||||
|
{
|
||||||
|
// MF_DRAWFROMFARAWAY: visible from 2x drawdist
|
||||||
|
if (dist > limit_dist * 2)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (dist > limit_dist)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue