mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
Use dude physics as base for debris physics
Remove dude flags commands Update kModernSlopeChanger Add stealth dude flag Update for sector pause/continue motion # Conflicts: # source/blood/src/db.h # source/blood/src/nnexts.cpp # source/blood/src/nnexts.h # Conflicts: # source/blood/src/nnexts.cpp
This commit is contained in:
parent
7fa690082e
commit
f433c6ee11
6 changed files with 641 additions and 260 deletions
|
@ -6431,6 +6431,7 @@ spritetype *actSpawnDude(spritetype *pSource, short nType, int a3, int a4)
|
|||
pXSprite2->dudeGuard = pXSource->dudeGuard;
|
||||
pXSprite2->dudeAmbush = pXSource->dudeAmbush;
|
||||
pXSprite2->dudeFlag4 = pXSource->dudeFlag4;
|
||||
pXSprite2->unused1 = pXSource->unused1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1815,12 +1815,12 @@ void aiInitSprite(spritetype *pSprite)
|
|||
bool uwater = spriteIsUnderwater(pSprite);
|
||||
if (stateTimer > 0) {
|
||||
if (uwater) aiPatrolState(pSprite, kAiStatePatrolWaitW);
|
||||
else if (pXSprite->unused2) aiPatrolState(pSprite, kAiStatePatrolWaitC);
|
||||
else if (pXSprite->unused1 & kDudeFlagCrouch) aiPatrolState(pSprite, kAiStatePatrolWaitC);
|
||||
else aiPatrolState(pSprite, kAiStatePatrolWaitL);
|
||||
pXSprite->stateTimer = stateTimer; // restore state timer
|
||||
}
|
||||
else if (uwater) aiPatrolState(pSprite, kAiStatePatrolMoveW);
|
||||
else if (pXSprite->unused2) aiPatrolState(pSprite, kAiStatePatrolMoveC);
|
||||
else if (pXSprite->unused1 & kDudeFlagCrouch) aiPatrolState(pSprite, kAiStatePatrolMoveC);
|
||||
else aiPatrolState(pSprite, kAiStatePatrolMoveL);
|
||||
|
||||
}
|
||||
|
|
|
@ -1686,6 +1686,7 @@ spritetype* genDudeSpawn(spritetype* pSprite, int nDist) {
|
|||
pXDude->dudeGuard = pXSource->dudeGuard;
|
||||
pXDude->dudeAmbush = pXSource->dudeAmbush;
|
||||
pXDude->dudeFlag4 = pXSource->dudeFlag4;
|
||||
pXDude->unused1 = pXSource->unused1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1761,6 +1762,7 @@ void genDudeTransform(spritetype* pSprite) {
|
|||
pXSprite->dudeDeaf = pXIncarnation->dudeDeaf;
|
||||
pXSprite->dudeAmbush = pXIncarnation->dudeAmbush;
|
||||
pXSprite->dudeFlag4 = pXIncarnation->dudeFlag4;
|
||||
pXSprite->unused1 = pXIncarnation->unused1;
|
||||
|
||||
pXSprite->dropMsg = pXIncarnation->dropMsg;
|
||||
pXSprite->key = pXIncarnation->key;
|
||||
|
|
|
@ -117,15 +117,8 @@ kCmdWallTouch = 52,
|
|||
#ifdef NOONE_EXTENSIONS
|
||||
kCmdSectorMotionPause = 13, // stops motion of the sector
|
||||
kCmdSectorMotionContinue = 14, // continues motion of the sector
|
||||
kCmdDudeFlagsSet = 15, // copy dudeFlags from sprite to dude
|
||||
kCmdModernUse = 53, // used by most of modern types
|
||||
kCmdModernPatrolOff = 54, // to manipulate dudeFlags
|
||||
kCmdModernPatrolOn = 55, // to manipulate dudeFlags
|
||||
kCmdModernDeafOff = 56, // to manipulate dudeFlags
|
||||
kCmdModernDeafOn = 57, // to manipulate dudeFlags
|
||||
kCmdModernBlindOff = 58, // to manipulate dudeFlags
|
||||
kCmdModernBlindOn = 59, // to manipulate dudeFlags
|
||||
kCmdModernAlarmOff = 60, // to manipulate dudeFlags
|
||||
kCmdModernAlarmOn = 61, // to manipulate dudeFlags
|
||||
#endif
|
||||
|
||||
kCmdNumberic = 64, // 64: 0, 65: 1 and so on up to 255
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -53,6 +53,15 @@ enum
|
|||
kPhysDebrisSwim = 0x0016, // *debris* can swim underwater (instead of drowning)
|
||||
kPhysDebrisVector = 0x0400, // *debris* can be affected by vector weapons
|
||||
kPhysDebrisExplode = 0x0800, // *debris* can be affected by explosions
|
||||
/*
|
||||
// additional physics attributes for debris sprites
|
||||
#define kPhysDebrisFloat 0x0008 // *debris* slowly goes up and down from it's position
|
||||
#define kPhysDebrisFly 0x0010 // *debris* affected by negative gravity (fly instead of falling)
|
||||
#define kPhysDebrisSwim 0x0020 // *debris* can swim underwater (instead of drowning)
|
||||
#define kPhysDebrisTouch 0x0040 // *debris* can be moved via touch
|
||||
//#define kPhysDebrisPush 0x0080 // *debris* can be moved via push
|
||||
#define kPhysDebrisVector 0x0400 // *debris* can be affected by vector weapons
|
||||
*/
|
||||
|
||||
// *modern types only hitag*
|
||||
kModernTypeFlag0 = 0x0000,
|
||||
|
@ -71,7 +80,10 @@ enum
|
|||
#define kMaxPatrolCrouchVelocity (kMaxPatrolVelocity >> 1)
|
||||
#define kMaxPatrolSpotValue 500
|
||||
|
||||
#define kDudeFlagStealth 0x0001
|
||||
#define kDudeFlagCrouch 0x0002
|
||||
|
||||
#define kSlopeDist 0x20
|
||||
|
||||
// modern statnums
|
||||
enum {
|
||||
|
@ -150,10 +162,10 @@ kCondSpriteMax = 600,
|
|||
};
|
||||
|
||||
enum {
|
||||
kCondSerialSector = 100000,
|
||||
kCondSerialWall = 200000,
|
||||
kCondSerialSprite = 300000,
|
||||
kCondSerialMax = 400000,
|
||||
kCondSerialSector = 10000,
|
||||
kCondSerialWall = 20000,
|
||||
kCondSerialSprite = 30000,
|
||||
kCondSerialMax = 40000,
|
||||
};
|
||||
|
||||
// - STRUCTS ------------------------------------------------------------------
|
||||
|
@ -215,8 +227,6 @@ struct TRCONDITION {
|
|||
OBJECTS_TO_TRACK obj[kMaxTracedObjects];
|
||||
};
|
||||
|
||||
|
||||
|
||||
// - VARIABLES ------------------------------------------------------------------
|
||||
extern bool gModernMap;
|
||||
extern bool gTeamsSpawnUsed;
|
||||
|
@ -259,6 +269,7 @@ void sfxPlayVectorSound(spritetype* pSprite, int vectorId);
|
|||
// ------------------------------------------------------------------------- //
|
||||
int debrisGetIndex(int nSprite);
|
||||
int debrisGetFreeIndex(void);
|
||||
void debrisBubble(int nSprite);
|
||||
void debrisMove(int listIndex);
|
||||
void debrisConcuss(int nOwner, int listIndex, int x, int y, int z, int dmg);
|
||||
// ------------------------------------------------------------------------- //
|
||||
|
|
Loading…
Reference in a new issue