mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-01 14:11:01 +00:00
- code updates from PCExhumed.
This commit is contained in:
parent
09d2e44da6
commit
7f75b2274f
2 changed files with 6 additions and 10 deletions
|
@ -897,14 +897,12 @@ loc_flag:
|
||||||
{
|
{
|
||||||
if (nWeapon != kWeaponGrenade)
|
if (nWeapon != kWeaponGrenade)
|
||||||
{
|
{
|
||||||
short nAmmo = -WeaponInfo[nWeapon].d; // negative
|
if (WeaponInfo[nWeapon].d) {
|
||||||
|
AddAmmo(nPlayer, nAmmoType, -1);
|
||||||
if (nAmmo) {
|
|
||||||
AddAmmo(nPlayer, nAmmoType, nAmmo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nWeapon == kWeaponM60) {
|
if (nWeapon == kWeaponM60) {
|
||||||
nPlayerClip[nPlayer] -= WeaponInfo[nWeapon].d;
|
nPlayerClip[nPlayer]--;
|
||||||
}
|
}
|
||||||
else if (nWeapon == kWeaponPistol) {
|
else if (nWeapon == kWeaponPistol) {
|
||||||
nPistolClip[nPlayer]--;
|
nPistolClip[nPlayer]--;
|
||||||
|
|
|
@ -230,7 +230,7 @@ void InitPlayerInventory(short nPlayer)
|
||||||
PlayerList[nPlayer].nRun = -1;
|
PlayerList[nPlayer].nRun = -1;
|
||||||
|
|
||||||
nPistolClip[nPlayer] = 6;
|
nPistolClip[nPlayer] = 6;
|
||||||
nPlayerClip[nPlayer] = 100;
|
nPlayerClip[nPlayer] = 0;
|
||||||
|
|
||||||
PlayerList[nPlayer].nCurrentWeapon = 0;
|
PlayerList[nPlayer].nCurrentWeapon = 0;
|
||||||
|
|
||||||
|
@ -245,7 +245,6 @@ void InitPlayerInventory(short nPlayer)
|
||||||
nPlayerColor[nPlayer] = pixels[tileWidth(nPlayer + kTile3571) * tileHeight(nPlayer + kTile3571) / 2];
|
nPlayerColor[nPlayer] = pixels[tileWidth(nPlayer + kTile3571) * tileHeight(nPlayer + kTile3571) / 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
// done
|
|
||||||
short GetPlayerFromSprite(short nSprite)
|
short GetPlayerFromSprite(short nSprite)
|
||||||
{
|
{
|
||||||
return RunData[sprite[nSprite].owner].nVal;
|
return RunData[sprite[nSprite].owner].nVal;
|
||||||
|
@ -471,7 +470,7 @@ void RestartPlayer(short nPlayer)
|
||||||
SetHealthFrame(0);
|
SetHealthFrame(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// done
|
|
||||||
int GrabPlayer()
|
int GrabPlayer()
|
||||||
{
|
{
|
||||||
if (PlayerCount >= kMaxPlayers) {
|
if (PlayerCount >= kMaxPlayers) {
|
||||||
|
@ -481,7 +480,6 @@ int GrabPlayer()
|
||||||
return PlayerCount++;
|
return PlayerCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// checked OK on 26/03/2019
|
|
||||||
void StartDeathSeq(int nPlayer, int nVal)
|
void StartDeathSeq(int nPlayer, int nVal)
|
||||||
{
|
{
|
||||||
FreeRa(nPlayer);
|
FreeRa(nPlayer);
|
||||||
|
|
Loading…
Reference in a new issue