mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- Fixed: The check to prevent items from being given to dead players
didn't work properly. It has to be done in the cheat code, not in APlayerPawn::AddInventory. - Fixed: The medikit and stimpack used a MaxAmount of 100 so that stamina upgrades were ineffective. SVN r214 (trunk)
This commit is contained in:
parent
a0c912ef2d
commit
550d687bcf
4 changed files with 16 additions and 11 deletions
|
@ -1,4 +1,9 @@
|
|||
June 22, 2006 (Changes by Graf Zahl)
|
||||
- Fixed: The check to prevent items from being given to dead players
|
||||
didn't work properly. It has to be done in the cheat code, not in
|
||||
APlayerPawn::AddInventory.
|
||||
- Fixed: The medikit and stimpack used a MaxAmount of 100 so that
|
||||
stamina upgrades were ineffective.
|
||||
- Fixed: Jumping and crouching at the same time created jerky results.
|
||||
Now jumping takes precedence and you can't crouch while pressing the
|
||||
jump key (which causes an uncrouch.)
|
||||
|
|
|
@ -69,7 +69,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
switch (cheat)
|
||||
{
|
||||
case CHT_IDDQD:
|
||||
if (!(player->cheats & CF_GODMODE))
|
||||
if (!(player->cheats & CF_GODMODE) && player->playerstate == PST_LIVE)
|
||||
{
|
||||
if (player->mo)
|
||||
player->mo->health = deh.GodHealth;
|
||||
|
@ -162,7 +162,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
break;
|
||||
|
||||
case CHT_CHAINSAW:
|
||||
if (player->mo != NULL)
|
||||
if (player->mo != NULL && player->health >= 0)
|
||||
{
|
||||
type = PClass::FindClass ("Chainsaw");
|
||||
if (player->mo->FindInventory (type) == NULL)
|
||||
|
@ -178,7 +178,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
break;
|
||||
|
||||
case CHT_POWER:
|
||||
if (player->mo != NULL)
|
||||
if (player->mo != NULL && player->health >= 0)
|
||||
{
|
||||
item = player->mo->FindInventory (RUNTIME_CLASS(APowerWeaponLevel2));
|
||||
if (item != NULL)
|
||||
|
@ -226,7 +226,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
{
|
||||
level.flags ^= LEVEL_ALLMAP;
|
||||
}
|
||||
else if (player->mo != NULL)
|
||||
else if (player->mo != NULL && player->health >= 0)
|
||||
{
|
||||
item = player->mo->FindInventory (BeholdPowers[i]);
|
||||
if (item == NULL)
|
||||
|
@ -256,7 +256,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
break;
|
||||
|
||||
case CHT_HEALTH:
|
||||
if (player->mo != NULL)
|
||||
if (player->mo != NULL && player->playerstate == PST_LIVE)
|
||||
{
|
||||
player->health = player->mo->health = player->mo->GetDefault()->health;
|
||||
msg = GStrings("TXT_CHEATHEALTH");
|
||||
|
@ -362,7 +362,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
break;
|
||||
|
||||
case CHT_LEGO:
|
||||
if (player->mo != NULL)
|
||||
if (player->mo != NULL && player->health >= 0)
|
||||
{
|
||||
int oldpieces = ASigil::GiveSigilPiece (player->mo);
|
||||
item = player->mo->FindInventory (RUNTIME_CLASS(ASigil));
|
||||
|
@ -411,6 +411,11 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
|
||||
void GiveSpawner (player_t *player, const PClass *type, int amount)
|
||||
{
|
||||
if (player->mo == NULL || player->health <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AInventory *item = static_cast<AInventory *>
|
||||
(Spawn (type, player->mo->x, player->mo->y, player->mo->z));
|
||||
if (item != NULL)
|
||||
|
|
|
@ -277,9 +277,6 @@ void APlayerPawn::Tick()
|
|||
|
||||
void APlayerPawn::AddInventory (AInventory *item)
|
||||
{
|
||||
// Don't add to the inventory of dead players.
|
||||
if (health<=0) return;
|
||||
|
||||
// Adding inventory to a voodoo doll should add it to the real player instead.
|
||||
if (player != NULL && player->mo != this)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,6 @@ ACTOR Stimpack : Health 2011
|
|||
Game Doom
|
||||
SpawnID 23
|
||||
Inventory.Amount 10
|
||||
Inventory.MaxAmount 100
|
||||
Inventory.PickupMessage "$GOTSTIM"
|
||||
States
|
||||
{
|
||||
|
@ -41,7 +40,6 @@ ACTOR Medikit : Health 2012
|
|||
Game Doom
|
||||
SpawnID 24
|
||||
Inventory.Amount 25
|
||||
Inventory.MaxAmount 100
|
||||
Inventory.PickupMessage "$GOTMEDIKIT"
|
||||
Health.LowMessage 25, "$GOTMEDINEED"
|
||||
States
|
||||
|
|
Loading…
Reference in a new issue