Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- manual merge of latest nnext update.
  • Loading branch information
coelckers committed May 11, 2022
1 parent acb2446 commit 84bafe6
Show file tree
Hide file tree
Showing 9 changed files with 256 additions and 110 deletions.
3 changes: 3 additions & 0 deletions source/games/blood/src/actor.cpp
Expand Up @@ -2468,6 +2468,9 @@ static void actInitDudes()
case kDudeModernCustom:
case kDudeModernCustomBurning:
act->spr.cstat |= CSTAT_SPRITE_BLOOD_BIT1 | CSTAT_SPRITE_BLOCK_ALL;
if (act->xspr.data2 > 0 && getSequence(act->xspr.data2))
seqStartId = act->xspr.data2; // Custom Dude stores it's SEQ in data2

seqStartId = genDudeSeqStartId(act); // Custom Dude stores its SEQ in data2
act->xspr.sysData1 = act->xspr.data3; // move sndStartId to sysData1, because data3 used by the game;
act->xspr.data3 = 0;
Expand Down
4 changes: 2 additions & 2 deletions source/games/blood/src/ai.cpp
Expand Up @@ -987,7 +987,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType

PLAYER* pPlayer = getPlayerById(source->spr.type);
if (!pPlayer) return nDamage;
if (powerupCheck(pPlayer, kPwUpShadowCloak)) pPlayer->pwUpTime[kPwUpShadowCloak] = 0;
//if (powerupCheck(pPlayer, kPwUpShadowCloak)) pPlayer->pwUpTime[kPwUpShadowCloak] = 0;
if (readyForCrit(source, actor))
{
nDamage += aiDamageSprite(actor, source, nDmgType, nDamage * (10 - gGameOptions.nDifficulty));
Expand Down Expand Up @@ -1694,7 +1694,7 @@ void aiInitSprite(DBloodActor* actor)
pDudeExtraE->active = 0;

#ifdef NOONE_EXTENSIONS
int stateTimer = -1;
unsigned int stateTimer = 0;
int targetX = 0, targetY = 0, targetZ = 0;
DBloodActor* pTargetMarker = nullptr;

Expand Down
6 changes: 6 additions & 0 deletions source/games/blood/src/animatesprite.cpp
Expand Up @@ -601,6 +601,12 @@ void viewProcessSprites(tspritetype* tsprite, int& spritesortcnt, int32_t cX, in
case 0:
if (!owneractor->hasX()) break;
switch (pTSprite->type) {
#ifdef NOONE_EXTENSIONS
case kModernCondition:
case kModernConditionFalse:
if (!gModernMap) break;
[[fallthrough]];
#endif
case kSwitchToggle:
case kSwitchOneWay:
if (owneractor->xspr.state) nAnim = 1;
Expand Down
2 changes: 0 additions & 2 deletions source/games/blood/src/bloodactor.h
Expand Up @@ -40,8 +40,6 @@ class DBloodActor : public DCoreActor
void Serialize(FSerializer& arc) override;
size_t PropagateMark() override;

DBloodActor& operator=(const DBloodActor& other) = default;

bool hasX() { return hasx; }
void addX() { hasx = true; }

Expand Down
34 changes: 19 additions & 15 deletions source/games/blood/src/eventq.h
Expand Up @@ -69,30 +69,34 @@ class EventObject


enum {
kChannelZero = 0,
kChannelSetTotalSecrets,
kChannelSecretFound,
kChannelTextOver,
kChannelLevelExitNormal,
kChannelLevelExitSecret,
kChannelModernEndLevelCustom, // custom level end
kChannelLevelStart,
kChannelLevelStartMatch, // DM and TEAMS
kChannelLevelStartCoop,
kChannelLevelStartTeamsOnly,
kChannelPlayerDeathTeamA = 15,
kChannelPlayerDeathTeamB,
kChannelZero = 0,
kChannelSetTotalSecrets = 1,
kChannelSecretFound = 2,
kChannelTextOver = 3,
kChannelLevelExitNormal = 4,
kChannelLevelExitSecret = 5,
kChannelModernEndLevelCustom = 6, // custom level number end (gModernMap)
kChannelLevelStart = 7,
kChannelLevelStartMatch = 8, // DM and TEAMS
kChannelLevelStartCoop = 9,
kChannelLevelStartTeamsOnly = 10,
kChannelPlayerDeathTeamA = 15,
kChannelPlayerDeathTeamB = 16,
/////////////////////////////
// level start channels for specific ports
kChannelLevelStartNBLOOD = 17, // *NBlood only* must trigger it at level start (gModernMap)
kChannelLevelStartRAZE = 18, // *Raze only* must trigger it at level start (gModernMap)
// channels of players to send commands on
kChannelPlayer0 = 30,
kChannelAllPlayers = 29,
kChannelPlayer0 = 30,
kChannelPlayer1,
kChannelPlayer2,
kChannelPlayer3,
kChannelPlayer4,
kChannelPlayer5,
kChannelPlayer6,
kChannelPlayer7,
kChannelAllPlayers = kChannelPlayer0 + kMaxPlayers,

// channel of event causer
kChannelEventCauser = 50,
// map requires modern features to work properly
Expand Down

0 comments on commit 84bafe6

Please sign in to comment.