mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Don't change statnum of thing converted to debris back to thing on impact trigger when firing with vector weapon.
- Change damage scale and min firedist for Custom Dude. - Remove unnecessary checks in callback of tracking condition. - Fix picWidth() function. - Better initialization of modern stuff. - kModernSeqSpawner: disable all other spawners with same TX ID when enabling current. - Fix: sceneQav was not playing if resurrected with COUSTEAU cheat. - kModernPictureChanger: remove kModernFlag01 feature (deprecated). - kModernSectorFXChanger: add flags to control where exactly light effect should appear. - kModernCondition: - add delay before sending command if condition is true. - take in account state, so kCmdState and kCmdNotState is useful. - fix wrong comparison result in some conditions. - add new various conditions. - kModernPlayerControl: - fix start / stop playing qav scene when triggered with event command converted to sprite command. - add a way to resurrect / heal player. - add event commands to toggle inventory item status via trigger. - fix that Remote and Proximity detonators cannot be given. - add clear all screen effects option. - proper percents for changing movement / jumping. - kModernRandomTX, kModernSequentialTX: change event redirection mode activation from kModernTypeFlag02 to kCmdLink. - kModernSpriteDamager: treat damage value as percents by default, take in account god mode. - kModernEffectGen: fix wrong cstat for effects. - kModernPropertiesChanger: proper underwater status for sectors and players or enemies in it. - Players: assign or update current player's sprite index for all conditions. # Conflicts: # source/blood/src/nnexts.cpp
This commit is contained in:
parent
96c9ca657e
commit
9428c88e29
10 changed files with 787 additions and 463 deletions
|
@ -6745,8 +6745,8 @@ void actFireVector(spritetype *pShooter, int a2, int a3, int a4, int a5, int a6,
|
|||
actBurnSprite(actSpriteIdToOwnerId(nShooter), &xsprite[nXSprite], pVectorData->burnTime);
|
||||
}
|
||||
|
||||
if (pSprite->type >= kThingBase && pSprite->type < kThingMax)
|
||||
changespritestat(pSprite->index, kStatThing);
|
||||
//if (pSprite->type >= kThingBase && pSprite->type < kThingMax)
|
||||
//changespritestat(pSprite->index, kStatThing);
|
||||
//actPostSprite(pSprite->index, kStatThing); // if it was a thing, return it's statnum back
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1307,7 +1307,7 @@ void scaleDamage(XSPRITE* pXSprite) {
|
|||
case kThingPodFireBall:
|
||||
case kThingNapalmBall:
|
||||
curScale[kDmgBurn] = 32;
|
||||
curScale[kDmgExplode] -= 20;
|
||||
curScale[kDmgExplode] -= 32;
|
||||
break;
|
||||
case kMissileLifeLeechRegular:
|
||||
curScale[kDmgBurn] = 60 + Random(4);
|
||||
|
@ -1330,6 +1330,7 @@ void scaleDamage(XSPRITE* pXSprite) {
|
|||
case kThingArmedTNTBundle:
|
||||
case kThingArmedTNTStick:
|
||||
case kModernThingTNTProx:
|
||||
curScale[kDmgBurn] -= 32;
|
||||
curScale[kDmgExplode] = 32;
|
||||
curScale[kDmgFall] = 65 + Random(15);
|
||||
break;
|
||||
|
@ -2008,7 +2009,7 @@ bool genDudePrepare(spritetype* pSprite, int propId) {
|
|||
fallthrough__;
|
||||
}
|
||||
case kGenDudePropertyAttack:
|
||||
pExtra->fireDist = getRangeAttackDist(pSprite, 1200, 45000);
|
||||
pExtra->fireDist = getRangeAttackDist(pSprite, 3000, 45000);
|
||||
pExtra->throwDist = pExtra->fireDist; // temp
|
||||
pExtra->baseDispersion = getDispersionModifier(pSprite, 200, 3500);
|
||||
if (propId) break;
|
||||
|
|
|
@ -216,7 +216,7 @@ short inSearch(AISTATE* aiState);
|
|||
short inChase(AISTATE* aiState);
|
||||
short inDuck(AISTATE* aiState);
|
||||
int genDudeSeqStartId(XSPRITE* pXSprite);
|
||||
int getRangeAttackDist(spritetype* pSprite, int minDist = 1200, int maxDist = 80000);
|
||||
int getRangeAttackDist(spritetype* pSprite, int minDist = 3000, int maxDist = 80000);
|
||||
int getDispersionModifier(spritetype* pSprite, int minDisp, int maxDisp);
|
||||
void scaleDamage(XSPRITE* pXSprite);
|
||||
bool genDudePrepare(spritetype* pSprite, int propId);
|
||||
|
|
|
@ -726,14 +726,14 @@ void DropVoodoo(int nSprite) // unused
|
|||
|
||||
void callbackCondition(int nSprite) {
|
||||
|
||||
spritetype* pSprite = &sprite[nSprite]; XSPRITE* pXSprite = &xsprite[pSprite->extra];
|
||||
if (pXSprite->state || pXSprite->locked || pXSprite->isTriggered) return;
|
||||
XSPRITE* pXSprite = &xsprite[sprite[nSprite].extra];
|
||||
if (pXSprite->isTriggered) return;
|
||||
|
||||
TRCONDITION* pCond = &gCondition[pXSprite->sysData1];
|
||||
for (int i = 0; i < pCond->length; i++) {
|
||||
EVENT evn; evn.index = pCond->obj[i].index; evn.type = pCond->obj[i].type;
|
||||
evn.cmd = pCond->obj[i].cmd; evn.funcID = kCallbackCondition;
|
||||
useCondition(pXSprite, evn);
|
||||
useCondition(&sprite[pXSprite->reference], pXSprite, evn);
|
||||
}
|
||||
|
||||
evPost(nSprite, OBJ_SPRITE, pXSprite->busyTime, kCallbackCondition);
|
||||
|
|
|
@ -1570,7 +1570,7 @@ DUDEINFO dudeInfo[kDudeMax-kDudeBase] =
|
|||
256, // angSpeed
|
||||
// 0,
|
||||
7, -1, 18, // nGibType
|
||||
128, 150, 128, 256, 128, 128, 128,
|
||||
64, 256, 256, 256, 256, 256, 256,
|
||||
0, 0, 0, 0, 0, 0, 0,
|
||||
0,
|
||||
0
|
||||
|
|
|
@ -910,7 +910,7 @@ int GetClosestSpriteSectors(int nSector, int x, int y, int nDist, short *pSector
|
|||
}
|
||||
|
||||
int picWidth(short nPic, short repeat) {
|
||||
return ClipLow((tilesiz[nPic].x * repeat) >> 2, 0);
|
||||
return ClipLow((tilesiz[nPic].x * repeat) << 2, 0);
|
||||
}
|
||||
|
||||
int picHeight(short nPic, short repeat) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -61,7 +61,9 @@ BEGIN_BLD_NS
|
|||
#define kModernTypeFlag4 0x0004
|
||||
|
||||
#define kMaxRandomizeRetries 16
|
||||
#define kPercentFull 100
|
||||
#define kCondRange 100
|
||||
|
||||
// modern statnums
|
||||
enum {
|
||||
kStatModernBase = 20,
|
||||
|
@ -69,6 +71,9 @@ kStatModernDudeTargetChanger = kStatModernBase,
|
|||
kStatModernCondition = 21,
|
||||
kStatModernEventRedirector = 22,
|
||||
kStatModernPlayerLinker = 23,
|
||||
kStatModernSeqSpawner = 24,
|
||||
kStatModernQavScene = 25,
|
||||
kStatModernTmp = 39,
|
||||
kStatModernMax = 40,
|
||||
};
|
||||
|
||||
|
@ -126,7 +131,9 @@ kCondWallBase = 200,
|
|||
kCondWallMax = 300,
|
||||
kCondSectorBase = 300,
|
||||
kCondSectorMax = 400,
|
||||
kCondDudeBase = 400,
|
||||
kCondPlayerBase = 400,
|
||||
kCondPlayerMax = 450,
|
||||
kCondDudeBase = 450,
|
||||
kCondDudeMax = 500,
|
||||
kCondSpriteBase = 500,
|
||||
kCondSpriteMax = 600,
|
||||
|
@ -283,14 +290,14 @@ void seqTxSendCmdAll(XSPRITE* pXSource, int nIndex, COMMAND_ID cmd, bool modernS
|
|||
void trPlayerCtrlLink(XSPRITE* pXSource, PLAYER* pPlayer, bool checkCondition);
|
||||
void trPlayerCtrlSetRace(XSPRITE* pXSource, PLAYER* pPlayer);
|
||||
void trPlayerCtrlStartScene(XSPRITE* pXSource, PLAYER* pPlayer);
|
||||
void trPlayerCtrlStopScene(XSPRITE* pXSource, PLAYER* pPlayer);
|
||||
void trPlayerCtrlStopScene(PLAYER* pPlayer);
|
||||
void trPlayerCtrlSetMoveSpeed(XSPRITE* pXSource, PLAYER* pPlayer);
|
||||
void trPlayerCtrlSetJumpHeight(XSPRITE* pXSource, PLAYER* pPlayer);
|
||||
void trPlayerCtrlSetScreenEffect(XSPRITE* pXSource, PLAYER* pPlayer);
|
||||
void trPlayerCtrlSetLookAngle(XSPRITE* pXSource, PLAYER* pPlayer);
|
||||
void trPlayerCtrlEraseStuff(XSPRITE* pXSource, PLAYER* pPlayer);
|
||||
void trPlayerCtrlGiveStuff(XSPRITE* pXSource, PLAYER* pPlayer, TRPLAYERCTRL* pCtrl);
|
||||
void trPlayerCtrlUsePackItem(XSPRITE* pXSource, PLAYER* pPlayer);
|
||||
void trPlayerCtrlUsePackItem(XSPRITE* pXSource, PLAYER* pPlayer, int evCmd);
|
||||
// ------------------------------------------------------------------------- //
|
||||
void modernTypeTrigger(int type, int nDest, EVENT event);
|
||||
char modernTypeSetSpriteState(int nSprite, XSPRITE* pXSprite, int nState);
|
||||
|
@ -327,19 +334,23 @@ void windGenStopWindOnSectors(XSPRITE* pXSource);
|
|||
int getSpriteMassBySize(spritetype* pSprite);
|
||||
bool ceilIsTooLow(spritetype* pSprite);
|
||||
void levelEndLevelCustom(int nLevel);
|
||||
bool useCondition(XSPRITE* pXSource, EVENT event);
|
||||
int useCondition(spritetype* pSource, XSPRITE* pXSource, EVENT event);
|
||||
bool condPush(XSPRITE* pXSprite, int objType, int objIndex);
|
||||
bool condRestore(XSPRITE* pXSprite);
|
||||
bool condCmp(int val, int arg1, int arg2, int comOp);
|
||||
bool condCmpne(int arg1, int arg2, int comOp);
|
||||
bool condCheckMixed(XSPRITE* pXCond, EVENT event, int cmpOp, bool PUSH, bool RVRS);
|
||||
bool condCheckSector(XSPRITE* pXCond, int cmpOp, bool PUSH, bool RVRS);
|
||||
bool condCheckWall(XSPRITE* pXCond, int cmpOp, bool PUSH, bool RVRS);
|
||||
bool condCheckSprite(XSPRITE* pXCond, int cmpOp, bool PUSH, bool RVRS);
|
||||
void condError(XSPRITE* pXCond, const char* pzFormat, ...);
|
||||
bool condCheckMixed(XSPRITE* pXCond, EVENT event, int cmpOp, bool PUSH);
|
||||
bool condCheckSector(XSPRITE* pXCond, int cmpOp, bool PUSH);
|
||||
bool condCheckWall(XSPRITE* pXCond, int cmpOp, bool PUSH);
|
||||
bool condCheckSprite(XSPRITE* pXCond, int cmpOp, bool PUSH);
|
||||
bool condCheckPlayer(XSPRITE* pXCond, int cmpOp, bool PUSH);
|
||||
bool condCheckDude(XSPRITE* pXCond, int cmpOp, bool PUSH);
|
||||
void condUpdateObjectIndex(int objType, int oldIndex, int newIndex);
|
||||
XSPRITE* evrListRedirectors(int objType, int objXIndex, XSPRITE* pXRedir, int* tx);
|
||||
XSPRITE* evrIsRedirector(int nSprite);
|
||||
int listTx(XSPRITE* pXRedir, int tx);
|
||||
void seqSpawnerOffSameTx(XSPRITE* pXSource);
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -776,19 +776,21 @@ void playerStart(int nPlayer, int bNewLevel)
|
|||
#ifdef NOONE_EXTENSIONS
|
||||
playerQavSceneReset(pPlayer); // reset qav scene
|
||||
|
||||
// we must check if properties of old pPlayer->pXSprite was
|
||||
// changed with kModernPlayerControl and copy it to the new x-sprite
|
||||
if (gModernMap && gGameOptions.nGameType != 0) {
|
||||
// assign or update player's sprite index for conditions
|
||||
if (gModernMap) {
|
||||
|
||||
for (int nSprite = headspritestat[kStatModernPlayerLinker]; nSprite >= 0; nSprite = nextspritestat[nSprite]) {
|
||||
XSPRITE* pXCtrl = &xsprite[sprite[nSprite].extra];
|
||||
if (pXCtrl->data1 != pPlayer->nPlayer + 1) continue;
|
||||
if (pXCtrl->data1 == pPlayer->nPlayer + 1) {
|
||||
int nSpriteOld = pXCtrl->sysData1;
|
||||
trPlayerCtrlLink(pXCtrl, pPlayer, false);
|
||||
if (pPlayer->pXSprite->txID >= kChannelUser && gTrackingCondsCount > 0)
|
||||
trPlayerCtrlLink(pXCtrl, pPlayer, (nSpriteOld < 0) ? true : false);
|
||||
if (nSpriteOld > 0)
|
||||
condUpdateObjectIndex(OBJ_SPRITE, nSpriteOld, pXCtrl->sysData1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
pPlayer->hand = 0;
|
||||
pPlayer->nWaterPal = 0;
|
||||
|
|
|
@ -334,31 +334,20 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT event)
|
|||
#ifdef NOONE_EXTENSIONS
|
||||
if (gModernMap && modernTypeOperateSprite(nSprite, pSprite, pXSprite, event))
|
||||
return;
|
||||
switch (event.cmd) {
|
||||
case kCmdLock:
|
||||
pXSprite->locked = 1;
|
||||
return;
|
||||
case kCmdUnlock:
|
||||
pXSprite->locked = 0;
|
||||
return;
|
||||
case kCmdToggleLock:
|
||||
pXSprite->locked = pXSprite->locked ^ 1;
|
||||
return;
|
||||
}
|
||||
#else
|
||||
switch (event.cmd) {
|
||||
case kCmdLock:
|
||||
pXSprite->locked = 1;
|
||||
return;
|
||||
case kCmdUnlock:
|
||||
pXSprite->locked = 0;
|
||||
return;
|
||||
case kCmdToggleLock:
|
||||
pXSprite->locked = pXSprite->locked ^ 1;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (event.cmd) {
|
||||
case kCmdLock:
|
||||
pXSprite->locked = 1;
|
||||
return;
|
||||
case kCmdUnlock:
|
||||
pXSprite->locked = 0;
|
||||
return;
|
||||
case kCmdToggleLock:
|
||||
pXSprite->locked = pXSprite->locked ^ 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (pSprite->statnum == kStatDude && pSprite->type >= kDudeBase && pSprite->type < kDudeMax) {
|
||||
|
||||
switch (event.cmd) {
|
||||
|
|
Loading…
Reference in a new issue