mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
- made THINGINFO const.
This commit is contained in:
parent
7a8208eb2f
commit
5c7b05a791
3 changed files with 8 additions and 8 deletions
|
@ -1707,7 +1707,7 @@ MissileType missileInfo[] = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
THINGINFO thingInfo[] = {
|
const THINGINFO thingInfo[] = {
|
||||||
//TNT Barrel
|
//TNT Barrel
|
||||||
{
|
{
|
||||||
25,
|
25,
|
||||||
|
@ -3868,7 +3868,7 @@ void actImpactMissile(spritetype *pMissile, int hitCode)
|
||||||
sectortype *pSectorHit = NULL; XSECTOR *pXSectorHit = NULL;
|
sectortype *pSectorHit = NULL; XSECTOR *pXSectorHit = NULL;
|
||||||
|
|
||||||
actHitcodeToData(hitCode, &gHitInfo, &nSpriteHit, &pSpriteHit, &pXSpriteHit, &nWallHit, &pWallHit, &pXWallHit, &nSectorHit, &pSectorHit, &pXSectorHit);
|
actHitcodeToData(hitCode, &gHitInfo, &nSpriteHit, &pSpriteHit, &pXSpriteHit, &nWallHit, &pWallHit, &pXWallHit, &nSectorHit, &pSectorHit, &pXSectorHit);
|
||||||
THINGINFO *pThingInfo = NULL; DUDEINFO *pDudeInfo = NULL;
|
const THINGINFO *pThingInfo = NULL; DUDEINFO *pDudeInfo = NULL;
|
||||||
|
|
||||||
if (hitCode == 3 && pSpriteHit) {
|
if (hitCode == 3 && pSpriteHit) {
|
||||||
switch (pSpriteHit->statnum) {
|
switch (pSpriteHit->statnum) {
|
||||||
|
@ -4211,7 +4211,7 @@ void ProcessTouchObjects(spritetype *pSprite, int nXSprite)
|
||||||
if (pSprite2->statnum == kStatThing)
|
if (pSprite2->statnum == kStatThing)
|
||||||
{
|
{
|
||||||
int nType = pSprite2->type-kThingBase;
|
int nType = pSprite2->type-kThingBase;
|
||||||
THINGINFO *pThingInfo = &thingInfo[nType];
|
const THINGINFO *pThingInfo = &thingInfo[nType];
|
||||||
if (pThingInfo->flags&1)
|
if (pThingInfo->flags&1)
|
||||||
|
|
||||||
pSprite2->flags |= 1;
|
pSprite2->flags |= 1;
|
||||||
|
@ -4546,7 +4546,7 @@ int MoveThing(spritetype *pSprite)
|
||||||
int nSprite = pSprite->index;
|
int nSprite = pSprite->index;
|
||||||
int v8 = 0;
|
int v8 = 0;
|
||||||
dassert(pSprite->type >= kThingBase && pSprite->type < kThingMax);
|
dassert(pSprite->type >= kThingBase && pSprite->type < kThingMax);
|
||||||
THINGINFO *pThingInfo = &thingInfo[pSprite->type-kThingBase];
|
const THINGINFO *pThingInfo = &thingInfo[pSprite->type-kThingBase];
|
||||||
int nSector = pSprite->sectnum;
|
int nSector = pSprite->sectnum;
|
||||||
dassert(nSector >= 0 && nSector < kMaxSectors);
|
dassert(nSector >= 0 && nSector < kMaxSectors);
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
|
@ -5829,7 +5829,7 @@ void actProcessSprites(void)
|
||||||
if (pXSector && pXSector->panVel && (pXSector->panAlways || pXSector->state || pXSector->busy))
|
if (pXSector && pXSector->panVel && (pXSector->panAlways || pXSector->state || pXSector->busy))
|
||||||
{
|
{
|
||||||
int nType = pSprite->type - kThingBase;
|
int nType = pSprite->type - kThingBase;
|
||||||
THINGINFO *pThingInfo = &thingInfo[nType];
|
const THINGINFO *pThingInfo = &thingInfo[nType];
|
||||||
if (pThingInfo->flags & 1)
|
if (pThingInfo->flags & 1)
|
||||||
|
|
||||||
pSprite->flags |= 1;
|
pSprite->flags |= 1;
|
||||||
|
@ -6546,7 +6546,7 @@ spritetype * actSpawnThing(int nSector, int x, int y, int z, int nThingType)
|
||||||
pSprite->type = nThingType;
|
pSprite->type = nThingType;
|
||||||
dassert(nXThing > 0 && nXThing < kMaxXSprites);
|
dassert(nXThing > 0 && nXThing < kMaxXSprites);
|
||||||
XSPRITE *pXThing = &xsprite[nXThing];
|
XSPRITE *pXThing = &xsprite[nXThing];
|
||||||
THINGINFO *pThingInfo = &thingInfo[nType];
|
const THINGINFO *pThingInfo = &thingInfo[nType];
|
||||||
pXThing->health = pThingInfo->startHealth<<4;
|
pXThing->health = pThingInfo->startHealth<<4;
|
||||||
pSprite->clipdist = pThingInfo->clipdist;
|
pSprite->clipdist = pThingInfo->clipdist;
|
||||||
pSprite->flags = pThingInfo->flags;
|
pSprite->flags = pThingInfo->flags;
|
||||||
|
|
|
@ -186,7 +186,7 @@ extern WEAPONITEMDATA gWeaponItemData[];
|
||||||
extern ITEMDATA gItemData[];
|
extern ITEMDATA gItemData[];
|
||||||
extern MissileType missileInfo[];
|
extern MissileType missileInfo[];
|
||||||
extern EXPLOSION explodeInfo[];
|
extern EXPLOSION explodeInfo[];
|
||||||
extern THINGINFO thingInfo[];
|
extern const THINGINFO thingInfo[];
|
||||||
extern VECTORDATA gVectorData[];
|
extern VECTORDATA gVectorData[];
|
||||||
|
|
||||||
extern int gDudeDrag;
|
extern int gDudeDrag;
|
||||||
|
|
|
@ -284,7 +284,7 @@ static void ThrowThing(int nXIndex, bool impact) {
|
||||||
if (curWeapon < kThingBase || curWeapon >= kThingMax)
|
if (curWeapon < kThingBase || curWeapon >= kThingMax)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
THINGINFO* pThinkInfo = &thingInfo[curWeapon - kThingBase];
|
const THINGINFO* pThinkInfo = &thingInfo[curWeapon - kThingBase];
|
||||||
if (!pThinkInfo->allowThrow) return;
|
if (!pThinkInfo->allowThrow) return;
|
||||||
|
|
||||||
if (!playGenDudeSound(pSprite, kGenDudeSndAttackThrow))
|
if (!playGenDudeSound(pSprite, kGenDudeSndAttackThrow))
|
||||||
|
|
Loading…
Reference in a new issue