mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Merge branch 'FriendlySeeBlocks' into zmd5
This commit is contained in:
commit
36b6253c3d
8 changed files with 17 additions and 7 deletions
|
@ -1169,6 +1169,7 @@ public:
|
|||
int Score; // manipulated by score items, ACS or DECORATE. The engine doesn't use this itself for anything.
|
||||
FString * Tag; // Strife's tag name.
|
||||
int DesignatedTeam; // Allow for friendly fire cacluations to be done on non-players.
|
||||
int friendlyseeblocks; // allow to override friendly search distance calculation
|
||||
|
||||
AActor *BlockingMobj; // Actor that blocked the last move
|
||||
line_t *BlockingLine; // Line that blocked the last move
|
||||
|
|
|
@ -510,7 +510,7 @@ public:
|
|||
crouchdir = 0;
|
||||
crouching = 0;
|
||||
crouchviewdelta = 0;
|
||||
viewheight = mo->ViewHeight;
|
||||
viewheight = mo ? mo->ViewHeight : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2074,8 +2074,8 @@ DEFINE_ACTION_FUNCTION(DBaseStatusBar, GetGlobalACSArrayValue)
|
|||
|
||||
enum ENumFlags
|
||||
{
|
||||
FNF_FILLZEROS,
|
||||
FNF_WHENNOTZERO,
|
||||
FNF_WHENNOTZERO = 0x1,
|
||||
FNF_FILLZEROS = 0x2,
|
||||
};
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DBaseStatusBar, FormatNumber)
|
||||
|
|
|
@ -1704,7 +1704,7 @@ bool P_LookForEnemies (AActor *actor, INTBOOL allaround, FLookExParams *params)
|
|||
{
|
||||
AActor *other;
|
||||
|
||||
other = P_BlockmapSearch (actor, 10, LookForEnemiesInBlock, params);
|
||||
other = P_BlockmapSearch (actor, actor->friendlyseeblocks, LookForEnemiesInBlock, params);
|
||||
|
||||
if (other != NULL)
|
||||
{
|
||||
|
|
|
@ -355,6 +355,7 @@ DEFINE_FIELD(AActor, BloodColor)
|
|||
DEFINE_FIELD(AActor, BloodTranslation)
|
||||
DEFINE_FIELD(AActor, RenderHidden)
|
||||
DEFINE_FIELD(AActor, RenderRequired)
|
||||
DEFINE_FIELD(AActor, friendlyseeblocks)
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -533,6 +534,7 @@ void AActor::Serialize(FSerializer &arc)
|
|||
A("stealthalpha", StealthAlpha)
|
||||
A("renderhidden", RenderHidden)
|
||||
A("renderrequired", RenderRequired);
|
||||
A("friendlyseeblocks", friendlyseeblocks);
|
||||
}
|
||||
|
||||
#undef A
|
||||
|
|
|
@ -203,6 +203,7 @@ class Actor : Thinker native
|
|||
native readonly int BloodTranslation;
|
||||
native int RenderHidden;
|
||||
native int RenderRequired;
|
||||
native readonly int FriendlySeeBlocks;
|
||||
|
||||
meta String Obituary; // Player was killed by this actor
|
||||
meta String HitObituary; // Player was killed by this actor in melee
|
||||
|
@ -292,6 +293,7 @@ class Actor : Thinker native
|
|||
property RipLevelMax: RipLevelMax;
|
||||
property RenderHidden: RenderHidden;
|
||||
property RenderRequired: RenderRequired;
|
||||
property FriendlySeeBlocks: FriendlySeeBlocks;
|
||||
|
||||
// need some definition work first
|
||||
//FRenderStyle RenderStyle;
|
||||
|
@ -372,6 +374,7 @@ class Actor : Thinker native
|
|||
BurnHeight -1;
|
||||
RenderHidden 0;
|
||||
RenderRequired 0;
|
||||
FriendlySeeBlocks 10; // 10 (blocks) * 128 (one map unit block)
|
||||
}
|
||||
|
||||
// Functions
|
||||
|
|
|
@ -205,7 +205,11 @@ extend class Actor
|
|||
if (mo.health > 0 && mo.bBossSpawned)
|
||||
{
|
||||
mo.DamageMobj(self, self, mo.health, "None", DMG_NO_ARMOR|DMG_FORCED|DMG_THRUSTLESS|DMG_NO_FACTOR);
|
||||
count++;
|
||||
|
||||
// [Blue Shadow] If 'mo' is a RandomSpawner or another actor which can't be killed,
|
||||
// it could cause this code to loop indefinitely. So only let it trigger a loop if it
|
||||
// has been actually killed.
|
||||
if (mo.bKilled) count++;
|
||||
}
|
||||
}
|
||||
} while (count != 0);
|
||||
|
|
|
@ -254,8 +254,8 @@ class BaseStatusBar native ui
|
|||
|
||||
enum ENumFlags
|
||||
{
|
||||
FNF_FILLZEROS,
|
||||
FNF_WHENNOTZERO,
|
||||
FNF_WHENNOTZERO = 0x1,
|
||||
FNF_FILLZEROS = 0x2,
|
||||
}
|
||||
|
||||
enum EShade
|
||||
|
|
Loading…
Reference in a new issue