mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-01 14:11:01 +00:00
- renamed a few things with disasm names.
This commit is contained in:
parent
7945242fa8
commit
9bd02634d9
1 changed files with 55 additions and 55 deletions
|
@ -186,7 +186,7 @@ char CheckAmmo(PLAYER *pPlayer, int a2, int a3)
|
||||||
return pPlayer->ammoCount[a2] >= a3;
|
return pPlayer->ammoCount[a2] >= a3;
|
||||||
}
|
}
|
||||||
|
|
||||||
char sub_4B2C8(PLAYER *pPlayer, int a2, int a3)
|
char checkAmmo2(PLAYER *pPlayer, int a2, int a3)
|
||||||
{
|
{
|
||||||
if (gInfiniteAmmo)
|
if (gInfiniteAmmo)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -280,11 +280,11 @@ void StartQAV(PLAYER *pPlayer, int nWeaponQAV, int a3, char a4)
|
||||||
|
|
||||||
struct WEAPONTRACK
|
struct WEAPONTRACK
|
||||||
{
|
{
|
||||||
int TotalKills; // x aim speed
|
int aimSpeedHorz;
|
||||||
int Kills; // y aim speed
|
int aimSpeedVert;
|
||||||
int at8; // angle range
|
int angleRange;
|
||||||
int atc;
|
int thingAngle;
|
||||||
int at10; // predict
|
int seeker;
|
||||||
bool bIsProjectile;
|
bool bIsProjectile;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -342,9 +342,9 @@ void UpdateAimVector(PLAYER * pPlayer)
|
||||||
int nDist = approxDist(x2-x, y2-y);
|
int nDist = approxDist(x2-x, y2-y);
|
||||||
if (nDist == 0 || nDist > 51200)
|
if (nDist == 0 || nDist > 51200)
|
||||||
continue;
|
continue;
|
||||||
if (pWeaponTrack->at10)
|
if (pWeaponTrack->seeker)
|
||||||
{
|
{
|
||||||
int t = divscale(nDist,pWeaponTrack->at10, 12);
|
int t = divscale(nDist,pWeaponTrack->seeker, 12);
|
||||||
x2 += (xvel[nSprite]*t)>>12;
|
x2 += (xvel[nSprite]*t)>>12;
|
||||||
y2 += (yvel[nSprite]*t)>>12;
|
y2 += (yvel[nSprite]*t)>>12;
|
||||||
z2 += (zvel[nSprite]*t)>>8;
|
z2 += (zvel[nSprite]*t)>>8;
|
||||||
|
@ -358,7 +358,7 @@ void UpdateAimVector(PLAYER * pPlayer)
|
||||||
if (lz-zRange>bottom || lz+zRange<top)
|
if (lz-zRange>bottom || lz+zRange<top)
|
||||||
continue;
|
continue;
|
||||||
int angle = getangle(x2-x,y2-y);
|
int angle = getangle(x2-x,y2-y);
|
||||||
if (klabs(((angle-pPSprite->ang+1024)&2047)-1024) > pWeaponTrack->at8)
|
if (klabs(((angle-pPSprite->ang+1024)&2047)-1024) > pWeaponTrack->angleRange)
|
||||||
continue;
|
continue;
|
||||||
if (pPlayer->aimTargetsCount < 16 && cansee(x,y,z,pPSprite->sectnum,x2,y2,z2,pSprite->sectnum))
|
if (pPlayer->aimTargetsCount < 16 && cansee(x,y,z,pPSprite->sectnum,x2,y2,z2,pSprite->sectnum))
|
||||||
pPlayer->aimTargets[pPlayer->aimTargetsCount++] = nSprite;
|
pPlayer->aimTargets[pPlayer->aimTargetsCount++] = nSprite;
|
||||||
|
@ -381,7 +381,7 @@ void UpdateAimVector(PLAYER * pPlayer)
|
||||||
nTarget = nSprite;
|
nTarget = nSprite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pWeaponTrack->atc > 0)
|
if (pWeaponTrack->thingAngle > 0)
|
||||||
{
|
{
|
||||||
int nSprite;
|
int nSprite;
|
||||||
StatIterator it(kStatThing);
|
StatIterator it(kStatThing);
|
||||||
|
@ -410,7 +410,7 @@ void UpdateAimVector(PLAYER * pPlayer)
|
||||||
if (lz-zRange>bottom || lz+zRange<top)
|
if (lz-zRange>bottom || lz+zRange<top)
|
||||||
continue;
|
continue;
|
||||||
int angle = getangle(dx,dy);
|
int angle = getangle(dx,dy);
|
||||||
if (klabs(((angle-pPSprite->ang+1024)&2047)-1024) > pWeaponTrack->atc)
|
if (klabs(((angle-pPSprite->ang+1024)&2047)-1024) > pWeaponTrack->thingAngle)
|
||||||
continue;
|
continue;
|
||||||
if (pPlayer->aimTargetsCount < 16 && cansee(x,y,z,pPSprite->sectnum,pSprite->x,pSprite->y,pSprite->z,pSprite->sectnum))
|
if (pPlayer->aimTargetsCount < 16 && cansee(x,y,z,pPSprite->sectnum,pSprite->x,pSprite->y,pSprite->z,pSprite->sectnum))
|
||||||
pPlayer->aimTargets[pPlayer->aimTargetsCount++] = nSprite;
|
pPlayer->aimTargets[pPlayer->aimTargetsCount++] = nSprite;
|
||||||
|
@ -436,9 +436,9 @@ void UpdateAimVector(PLAYER * pPlayer)
|
||||||
aim2 = aim;
|
aim2 = aim;
|
||||||
RotateVector((int*)&aim2.dx, (int*)&aim2.dy, -pPSprite->ang);
|
RotateVector((int*)&aim2.dx, (int*)&aim2.dy, -pPSprite->ang);
|
||||||
aim2.dz -= pPlayer->slope;
|
aim2.dz -= pPlayer->slope;
|
||||||
pPlayer->relAim.dx = interpolate(pPlayer->relAim.dx, aim2.dx, pWeaponTrack->TotalKills);
|
pPlayer->relAim.dx = interpolate(pPlayer->relAim.dx, aim2.dx, pWeaponTrack->aimSpeedHorz);
|
||||||
pPlayer->relAim.dy = interpolate(pPlayer->relAim.dy, aim2.dy, pWeaponTrack->TotalKills);
|
pPlayer->relAim.dy = interpolate(pPlayer->relAim.dy, aim2.dy, pWeaponTrack->aimSpeedHorz);
|
||||||
pPlayer->relAim.dz = interpolate(pPlayer->relAim.dz, aim2.dz, pWeaponTrack->Kills);
|
pPlayer->relAim.dz = interpolate(pPlayer->relAim.dz, aim2.dz, pWeaponTrack->aimSpeedVert);
|
||||||
pPlayer->aim = pPlayer->relAim;
|
pPlayer->aim = pPlayer->relAim;
|
||||||
RotateVector((int*)&pPlayer->aim.dx, (int*)&pPlayer->aim.dy, pPSprite->ang);
|
RotateVector((int*)&pPlayer->aim.dx, (int*)&pPlayer->aim.dy, pPSprite->ang);
|
||||||
pPlayer->aim.dz += pPlayer->slope;
|
pPlayer->aim.dz += pPlayer->slope;
|
||||||
|
@ -494,7 +494,7 @@ void WeaponRaise(PLAYER *pPlayer)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6: // dynamite
|
case 6: // dynamite
|
||||||
if (gInfiniteAmmo || sub_4B2C8(pPlayer, 5, 1))
|
if (gInfiniteAmmo || checkAmmo2(pPlayer, 5, 1))
|
||||||
{
|
{
|
||||||
pPlayer->weaponState = 3;
|
pPlayer->weaponState = 3;
|
||||||
if (prevWeapon == 7)
|
if (prevWeapon == 7)
|
||||||
|
@ -504,14 +504,14 @@ void WeaponRaise(PLAYER *pPlayer)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 11: // proximity
|
case 11: // proximity
|
||||||
if (gInfiniteAmmo || sub_4B2C8(pPlayer, 10, 1))
|
if (gInfiniteAmmo || checkAmmo2(pPlayer, 10, 1))
|
||||||
{
|
{
|
||||||
pPlayer->weaponState = 7;
|
pPlayer->weaponState = 7;
|
||||||
StartQAV(pPlayer, 25, -1, 0);
|
StartQAV(pPlayer, 25, -1, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 12: // remote
|
case 12: // remote
|
||||||
if (gInfiniteAmmo || sub_4B2C8(pPlayer, 11, 1))
|
if (gInfiniteAmmo || checkAmmo2(pPlayer, 11, 1))
|
||||||
{
|
{
|
||||||
pPlayer->weaponState = 10;
|
pPlayer->weaponState = 10;
|
||||||
StartQAV(pPlayer, 31, -1, 0);
|
StartQAV(pPlayer, 31, -1, 0);
|
||||||
|
@ -550,7 +550,7 @@ void WeaponRaise(PLAYER *pPlayer)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4: // tommy gun
|
case 4: // tommy gun
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns) && sub_4B2C8(pPlayer, 3, 2))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns) && checkAmmo2(pPlayer, 3, 2))
|
||||||
{
|
{
|
||||||
pPlayer->weaponState = 1;
|
pPlayer->weaponState = 1;
|
||||||
StartQAV(pPlayer, 69, -1, 0);
|
StartQAV(pPlayer, 69, -1, 0);
|
||||||
|
@ -562,14 +562,14 @@ void WeaponRaise(PLAYER *pPlayer)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 10: // voodoo
|
case 10: // voodoo
|
||||||
if (gInfiniteAmmo || sub_4B2C8(pPlayer, 9, 1))
|
if (gInfiniteAmmo || checkAmmo2(pPlayer, 9, 1))
|
||||||
{
|
{
|
||||||
pPlayer->weaponState = 2;
|
pPlayer->weaponState = 2;
|
||||||
StartQAV(pPlayer, 100, -1, 0);
|
StartQAV(pPlayer, 100, -1, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // flaregun
|
case 2: // flaregun
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns) && sub_4B2C8(pPlayer, 1, 2))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns) && checkAmmo2(pPlayer, 1, 2))
|
||||||
{
|
{
|
||||||
StartQAV(pPlayer, 45, -1, 0);
|
StartQAV(pPlayer, 45, -1, 0);
|
||||||
pPlayer->weaponState = 3;
|
pPlayer->weaponState = 3;
|
||||||
|
@ -581,7 +581,7 @@ void WeaponRaise(PLAYER *pPlayer)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 8: // tesla cannon
|
case 8: // tesla cannon
|
||||||
if (sub_4B2C8(pPlayer, 7, 1))
|
if (checkAmmo2(pPlayer, 7, 1))
|
||||||
{
|
{
|
||||||
pPlayer->weaponState = 2;
|
pPlayer->weaponState = 2;
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
|
@ -734,7 +734,7 @@ void WeaponLower(PLAYER *pPlayer)
|
||||||
StartQAV(pPlayer, 109, -1, 0);
|
StartQAV(pPlayer, 109, -1, 0);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
if (sub_4B2C8(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (checkAmmo2(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
StartQAV(pPlayer, 88, -1, 0);
|
StartQAV(pPlayer, 88, -1, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 81, -1, 0);
|
StartQAV(pPlayer, 81, -1, 0);
|
||||||
|
@ -901,7 +901,7 @@ void WeaponUpdateState(PLAYER *pPlayer)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns) && sub_4B2C8(pPlayer, 3, 2))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns) && checkAmmo2(pPlayer, 3, 2))
|
||||||
{
|
{
|
||||||
pPlayer->weaponQav = 70;
|
pPlayer->weaponQav = 70;
|
||||||
pPlayer->weaponState = 1;
|
pPlayer->weaponState = 1;
|
||||||
|
@ -915,7 +915,7 @@ void WeaponUpdateState(PLAYER *pPlayer)
|
||||||
case 2:
|
case 2:
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
{
|
{
|
||||||
if (vb == 3 && sub_4B2C8(pPlayer, 1, 2))
|
if (vb == 3 && checkAmmo2(pPlayer, 1, 2))
|
||||||
pPlayer->weaponQav = 46;
|
pPlayer->weaponQav = 46;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -936,7 +936,7 @@ void WeaponUpdateState(PLAYER *pPlayer)
|
||||||
switch (vb)
|
switch (vb)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
if (sub_4B2C8(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (checkAmmo2(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
pPlayer->weaponQav = 83;
|
pPlayer->weaponQav = 83;
|
||||||
else
|
else
|
||||||
pPlayer->weaponQav = 75;
|
pPlayer->weaponQav = 75;
|
||||||
|
@ -1256,7 +1256,7 @@ void AltFireSpread2(int nTrigger, PLAYER *pPlayer)
|
||||||
int dx = CosScale16(angle);
|
int dx = CosScale16(angle);
|
||||||
int dy = SinScale16(angle);
|
int dy = SinScale16(angle);
|
||||||
sfxPlay3DSound(pPlayer->pSprite, 431, -1, 0);
|
sfxPlay3DSound(pPlayer->pSprite, 431, -1, 0);
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns) && sub_4B2C8(pPlayer, 3, 2))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns) && checkAmmo2(pPlayer, 3, 2))
|
||||||
{
|
{
|
||||||
int r1, r2, r3;
|
int r1, r2, r3;
|
||||||
r1 = Random3(300);
|
r1 = Random3(300);
|
||||||
|
@ -1292,7 +1292,7 @@ void AltFireSpread2(int nTrigger, PLAYER *pPlayer)
|
||||||
UseAmmo(pPlayer, pPlayer->weaponAmmo, 1);
|
UseAmmo(pPlayer, pPlayer->weaponAmmo, 1);
|
||||||
}
|
}
|
||||||
pPlayer->flashEffect = 1;
|
pPlayer->flashEffect = 1;
|
||||||
if (!sub_4B2C8(pPlayer, 3, 1))
|
if (!checkAmmo2(pPlayer, 3, 1))
|
||||||
{
|
{
|
||||||
WeaponLower(pPlayer);
|
WeaponLower(pPlayer);
|
||||||
pPlayer->weaponState = -1;
|
pPlayer->weaponState = -1;
|
||||||
|
@ -1519,10 +1519,10 @@ void FireTesla(int nTrigger, PLAYER *pPlayer)
|
||||||
nTrigger--;
|
nTrigger--;
|
||||||
spritetype *pSprite = pPlayer->pSprite;
|
spritetype *pSprite = pPlayer->pSprite;
|
||||||
TeslaMissile *pMissile = &teslaMissile[nTrigger];
|
TeslaMissile *pMissile = &teslaMissile[nTrigger];
|
||||||
if (!sub_4B2C8(pPlayer, 7, pMissile->at8))
|
if (!checkAmmo2(pPlayer, 7, pMissile->at8))
|
||||||
{
|
{
|
||||||
pMissile = &teslaMissile[0];
|
pMissile = &teslaMissile[0];
|
||||||
if (!sub_4B2C8(pPlayer, 7, pMissile->at8))
|
if (!checkAmmo2(pPlayer, 7, pMissile->at8))
|
||||||
{
|
{
|
||||||
pPlayer->weaponState = -1;
|
pPlayer->weaponState = -1;
|
||||||
pPlayer->weaponQav = 76;
|
pPlayer->weaponQav = 76;
|
||||||
|
@ -1612,7 +1612,7 @@ void FireLifeLeech(int nTrigger, PLAYER *pPlayer)
|
||||||
pXSprite->target = pPlayer->aimTarget;
|
pXSprite->target = pPlayer->aimTarget;
|
||||||
pMissile->ang = (nTrigger==2) ? 1024 : 0;
|
pMissile->ang = (nTrigger==2) ? 1024 : 0;
|
||||||
}
|
}
|
||||||
if (sub_4B2C8(pPlayer, 8, 1))
|
if (checkAmmo2(pPlayer, 8, 1))
|
||||||
UseAmmo(pPlayer, 8, 1);
|
UseAmmo(pPlayer, 8, 1);
|
||||||
else
|
else
|
||||||
actDamageSprite(pPlayer->nSprite, pPlayer->pSprite, DAMAGE_TYPE_5, 16);
|
actDamageSprite(pPlayer->nSprite, pPlayer->pSprite, DAMAGE_TYPE_5, 16);
|
||||||
|
@ -1708,7 +1708,7 @@ char WeaponFindNext(PLAYER *pPlayer, int *a2, char bDir)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (sub_4B2C8(pPlayer, weaponModes[weapon].Kills, 1))
|
if (checkAmmo2(pPlayer, weaponModes[weapon].Kills, 1))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1903,7 +1903,7 @@ char sub_4F484(PLAYER *pPlayer)
|
||||||
{
|
{
|
||||||
case 4:
|
case 4:
|
||||||
pPlayer->weaponState = 5;
|
pPlayer->weaponState = 5;
|
||||||
if (sub_4B2C8(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (checkAmmo2(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
StartQAV(pPlayer, 84, nClientFireTesla, 1);
|
StartQAV(pPlayer, 84, nClientFireTesla, 1);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 77, nClientFireTesla, 1);
|
StartQAV(pPlayer, 77, nClientFireTesla, 1);
|
||||||
|
@ -1912,7 +1912,7 @@ char sub_4F484(PLAYER *pPlayer)
|
||||||
if (!(pPlayer->input.actions & SB_FIRE))
|
if (!(pPlayer->input.actions & SB_FIRE))
|
||||||
{
|
{
|
||||||
pPlayer->weaponState = 2;
|
pPlayer->weaponState = 2;
|
||||||
if (sub_4B2C8(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (checkAmmo2(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
StartQAV(pPlayer, 87, -1, 0);
|
StartQAV(pPlayer, 87, -1, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 80, -1, 0);
|
StartQAV(pPlayer, 80, -1, 0);
|
||||||
|
@ -1921,7 +1921,7 @@ char sub_4F484(PLAYER *pPlayer)
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
pPlayer->weaponState = 2;
|
pPlayer->weaponState = 2;
|
||||||
if (sub_4B2C8(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (checkAmmo2(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
StartQAV(pPlayer, 87, -1, 0);
|
StartQAV(pPlayer, 87, -1, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 80, -1, 0);
|
StartQAV(pPlayer, 80, -1, 0);
|
||||||
|
@ -2112,32 +2112,32 @@ void WeaponProcess(PLAYER *pPlayer) {
|
||||||
{
|
{
|
||||||
if (pPlayer->curWeapon == 6)
|
if (pPlayer->curWeapon == 6)
|
||||||
{
|
{
|
||||||
if (sub_4B2C8(pPlayer, 10, 1))
|
if (checkAmmo2(pPlayer, 10, 1))
|
||||||
pPlayer->newWeapon = 11;
|
pPlayer->newWeapon = 11;
|
||||||
else if (sub_4B2C8(pPlayer, 11, 1))
|
else if (checkAmmo2(pPlayer, 11, 1))
|
||||||
pPlayer->newWeapon = 12;
|
pPlayer->newWeapon = 12;
|
||||||
}
|
}
|
||||||
else if (pPlayer->curWeapon == 11)
|
else if (pPlayer->curWeapon == 11)
|
||||||
{
|
{
|
||||||
if (sub_4B2C8(pPlayer, 11, 1))
|
if (checkAmmo2(pPlayer, 11, 1))
|
||||||
pPlayer->newWeapon = 12;
|
pPlayer->newWeapon = 12;
|
||||||
else if (sub_4B2C8(pPlayer, 5, 1) && pPlayer->isUnderwater == 0)
|
else if (checkAmmo2(pPlayer, 5, 1) && pPlayer->isUnderwater == 0)
|
||||||
pPlayer->newWeapon = 6;
|
pPlayer->newWeapon = 6;
|
||||||
}
|
}
|
||||||
else if (pPlayer->curWeapon == 12)
|
else if (pPlayer->curWeapon == 12)
|
||||||
{
|
{
|
||||||
if (sub_4B2C8(pPlayer, 5, 1) && pPlayer->isUnderwater == 0)
|
if (checkAmmo2(pPlayer, 5, 1) && pPlayer->isUnderwater == 0)
|
||||||
pPlayer->newWeapon = 6;
|
pPlayer->newWeapon = 6;
|
||||||
else if (sub_4B2C8(pPlayer, 10, 1))
|
else if (checkAmmo2(pPlayer, 10, 1))
|
||||||
pPlayer->newWeapon = 11;
|
pPlayer->newWeapon = 11;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (sub_4B2C8(pPlayer, 5, 1) && pPlayer->isUnderwater == 0)
|
if (checkAmmo2(pPlayer, 5, 1) && pPlayer->isUnderwater == 0)
|
||||||
pPlayer->newWeapon = 6;
|
pPlayer->newWeapon = 6;
|
||||||
else if (sub_4B2C8(pPlayer, 10, 1))
|
else if (checkAmmo2(pPlayer, 10, 1))
|
||||||
pPlayer->newWeapon = 11;
|
pPlayer->newWeapon = 11;
|
||||||
else if (sub_4B2C8(pPlayer, 11, 1))
|
else if (checkAmmo2(pPlayer, 11, 1))
|
||||||
pPlayer->newWeapon = 12;
|
pPlayer->newWeapon = 12;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2278,13 +2278,13 @@ void WeaponProcess(PLAYER *pPlayer) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns) && sub_4B2C8(pPlayer, 3, 2))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns) && checkAmmo2(pPlayer, 3, 2))
|
||||||
StartQAV(pPlayer, 71, nClientFireTommy, 1);
|
StartQAV(pPlayer, 71, nClientFireTommy, 1);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 66, nClientFireTommy, 1);
|
StartQAV(pPlayer, 66, nClientFireTommy, 1);
|
||||||
return;
|
return;
|
||||||
case 2:
|
case 2:
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns) && sub_4B2C8(pPlayer, 1, 2))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns) && checkAmmo2(pPlayer, 1, 2))
|
||||||
StartQAV(pPlayer, 48, nClientFireFlare, 0);
|
StartQAV(pPlayer, 48, nClientFireFlare, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 43, nClientFireFlare, 0);
|
StartQAV(pPlayer, 43, nClientFireFlare, 0);
|
||||||
|
@ -2308,13 +2308,13 @@ void WeaponProcess(PLAYER *pPlayer) {
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
pPlayer->weaponState = 4;
|
pPlayer->weaponState = 4;
|
||||||
if (sub_4B2C8(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (checkAmmo2(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
StartQAV(pPlayer, 84, nClientFireTesla, 0);
|
StartQAV(pPlayer, 84, nClientFireTesla, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 77, nClientFireTesla, 0);
|
StartQAV(pPlayer, 77, nClientFireTesla, 0);
|
||||||
return;
|
return;
|
||||||
case 5:
|
case 5:
|
||||||
if (sub_4B2C8(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (checkAmmo2(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
StartQAV(pPlayer, 84, nClientFireTesla, 0);
|
StartQAV(pPlayer, 84, nClientFireTesla, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 77, nClientFireTesla, 0);
|
StartQAV(pPlayer, 77, nClientFireTesla, 0);
|
||||||
|
@ -2419,7 +2419,7 @@ void WeaponProcess(PLAYER *pPlayer) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns) && sub_4B2C8(pPlayer, 3, 2))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns) && checkAmmo2(pPlayer, 3, 2))
|
||||||
StartQAV(pPlayer, 73, nClientAltFireSpread2, 0);
|
StartQAV(pPlayer, 73, nClientAltFireSpread2, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 67, nClientAltFireSpread2, 0);
|
StartQAV(pPlayer, 67, nClientAltFireSpread2, 0);
|
||||||
|
@ -2430,23 +2430,23 @@ void WeaponProcess(PLAYER *pPlayer) {
|
||||||
return;
|
return;
|
||||||
#if 0
|
#if 0
|
||||||
case 2:
|
case 2:
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns) && sub_4B2C8(pPlayer, 1, 2))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns) && checkAmmo2(pPlayer, 1, 2))
|
||||||
StartQAV(pPlayer, 48, nClientFireFlare, 0);
|
StartQAV(pPlayer, 48, nClientFireFlare, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 43, nClientFireFlare, 0);
|
StartQAV(pPlayer, 43, nClientFireFlare, 0);
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
case 8:
|
case 8:
|
||||||
if (sub_4B2C8(pPlayer, 7, 35))
|
if (checkAmmo2(pPlayer, 7, 35))
|
||||||
{
|
{
|
||||||
if (sub_4B2C8(pPlayer, 7, 70) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (checkAmmo2(pPlayer, 7, 70) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
StartQAV(pPlayer, 85, nClientFireTesla, 0);
|
StartQAV(pPlayer, 85, nClientFireTesla, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 78, nClientFireTesla, 0);
|
StartQAV(pPlayer, 78, nClientFireTesla, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (sub_4B2C8(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
if (checkAmmo2(pPlayer, 7, 10) && powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||||
StartQAV(pPlayer, 84, nClientFireTesla, 0);
|
StartQAV(pPlayer, 84, nClientFireTesla, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 77, nClientFireTesla, 0);
|
StartQAV(pPlayer, 77, nClientFireTesla, 0);
|
||||||
|
@ -2463,21 +2463,21 @@ void WeaponProcess(PLAYER *pPlayer) {
|
||||||
case 2:
|
case 2:
|
||||||
if (CheckAmmo(pPlayer, 1, 8))
|
if (CheckAmmo(pPlayer, 1, 8))
|
||||||
{
|
{
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns) && sub_4B2C8(pPlayer, 1, 16))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns) && checkAmmo2(pPlayer, 1, 16))
|
||||||
StartQAV(pPlayer, 48, nClientAltFireFlare, 0);
|
StartQAV(pPlayer, 48, nClientAltFireFlare, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 43, nClientAltFireFlare, 0);
|
StartQAV(pPlayer, 43, nClientAltFireFlare, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (powerupCheck(pPlayer, kPwUpTwoGuns) && sub_4B2C8(pPlayer, 1, 2))
|
if (powerupCheck(pPlayer, kPwUpTwoGuns) && checkAmmo2(pPlayer, 1, 2))
|
||||||
StartQAV(pPlayer, 48, nClientFireFlare, 0);
|
StartQAV(pPlayer, 48, nClientFireFlare, 0);
|
||||||
else
|
else
|
||||||
StartQAV(pPlayer, 43, nClientFireFlare, 0);
|
StartQAV(pPlayer, 43, nClientFireFlare, 0);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 9:
|
case 9:
|
||||||
if (gGameOptions.nGameType <= 1 && !sub_4B2C8(pPlayer, 8, 1) && pPlayer->pXSprite->health < (25 << 4))
|
if (gGameOptions.nGameType <= 1 && !checkAmmo2(pPlayer, 8, 1) && pPlayer->pXSprite->health < (25 << 4))
|
||||||
{
|
{
|
||||||
sfxPlay3DSound(pPlayer->pSprite, 494, 2, 0);
|
sfxPlay3DSound(pPlayer->pSprite, 494, 2, 0);
|
||||||
StartQAV(pPlayer, 116, nClientFireLifeLeech, 0);
|
StartQAV(pPlayer, 116, nClientFireLifeLeech, 0);
|
||||||
|
|
Loading…
Reference in a new issue