mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 19:20:53 +00:00
* Updated to ZDoom r2627:
- Fixed: P_LineAttack mixed up two flags variables. - Added PinkSilver's LOF_NOJUMP submission for A_LookEx. - Fixed: Clearing a pickup message for inventory items was not possible. Changed it so that "You got a pickup" is AInventory's pickup message and not a default returned when nothing valid is set. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@921 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
e51f8dab9f
commit
210825b5ec
7 changed files with 21 additions and 17 deletions
|
@ -890,7 +890,7 @@ void AInventory::Touch (AActor *toucher)
|
||||||
{
|
{
|
||||||
const char * message = PickupMessage ();
|
const char * message = PickupMessage ();
|
||||||
|
|
||||||
if (toucher->CheckLocalView (consoleplayer)
|
if (message != NULL && *message != 0 && toucher->CheckLocalView (consoleplayer)
|
||||||
&& (StaticLastMessageTic != gametic || StaticLastMessage != message))
|
&& (StaticLastMessageTic != gametic || StaticLastMessage != message))
|
||||||
{
|
{
|
||||||
StaticLastMessageTic = gametic;
|
StaticLastMessageTic = gametic;
|
||||||
|
@ -960,9 +960,7 @@ void AInventory::DoPickupSpecial (AActor *toucher)
|
||||||
|
|
||||||
const char *AInventory::PickupMessage ()
|
const char *AInventory::PickupMessage ()
|
||||||
{
|
{
|
||||||
const char *message = GetClass()->Meta.GetMetaString (AIMETA_PickupMessage);
|
return GetClass()->Meta.GetMetaString (AIMETA_PickupMessage);
|
||||||
|
|
||||||
return message != NULL? message : "You got a pickup";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
|
@ -1975,14 +1975,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LookEx)
|
||||||
|
|
||||||
if (self->target && !(self->flags & MF_INCHASE))
|
if (self->target && !(self->flags & MF_INCHASE))
|
||||||
{
|
{
|
||||||
if (seestate)
|
if (!(flags & LOF_NOJUMP))
|
||||||
{
|
{
|
||||||
self->SetState (seestate);
|
if (seestate)
|
||||||
}
|
{
|
||||||
else
|
self->SetState (seestate);
|
||||||
{
|
}
|
||||||
self->SetState (self->SeeState);
|
else
|
||||||
}
|
{
|
||||||
|
self->SetState (self->SeeState);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ enum LO_Flags
|
||||||
LOF_DONTCHASEGOAL = 4,
|
LOF_DONTCHASEGOAL = 4,
|
||||||
LOF_NOSEESOUND = 8,
|
LOF_NOSEESOUND = 8,
|
||||||
LOF_FULLVOLSEESOUND = 16,
|
LOF_FULLVOLSEESOUND = 16,
|
||||||
|
LOF_NOJUMP = 32,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FLookExParams
|
struct FLookExParams
|
||||||
|
|
|
@ -3502,12 +3502,12 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||||
// Note: The puff may not yet be spawned here so we must check the class defaults, not the actor.
|
// Note: The puff may not yet be spawned here so we must check the class defaults, not the actor.
|
||||||
if (damage || (puffDefaults->flags6 & MF6_FORCEPAIN))
|
if (damage || (puffDefaults->flags6 & MF6_FORCEPAIN))
|
||||||
{
|
{
|
||||||
int flags = DMG_INFLICTOR_IS_PUFF;
|
int dmgflags = DMG_INFLICTOR_IS_PUFF;
|
||||||
// Allow MF5_PIERCEARMOR on a weapon as well.
|
// Allow MF5_PIERCEARMOR on a weapon as well.
|
||||||
if (t1->player != NULL && t1->player->ReadyWeapon != NULL &&
|
if (t1->player != NULL && t1->player->ReadyWeapon != NULL &&
|
||||||
t1->player->ReadyWeapon->flags5 & MF5_PIERCEARMOR)
|
t1->player->ReadyWeapon->flags5 & MF5_PIERCEARMOR)
|
||||||
{
|
{
|
||||||
flags |= DMG_NO_ARMOR;
|
dmgflags |= DMG_NO_ARMOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (puff == NULL)
|
if (puff == NULL)
|
||||||
|
@ -3517,7 +3517,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||||
puff = P_SpawnPuff (t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, flags|PF_HITTHING|PF_TEMPORARY);
|
puff = P_SpawnPuff (t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, flags|PF_HITTHING|PF_TEMPORARY);
|
||||||
killPuff = true;
|
killPuff = true;
|
||||||
}
|
}
|
||||||
P_DamageMobj (trace.Actor, puff ? puff : t1, t1, damage, damageType, flags);
|
P_DamageMobj (trace.Actor, puff ? puff : t1, t1, damage, damageType, dmgflags);
|
||||||
}
|
}
|
||||||
if (victim != NULL)
|
if (victim != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
// This file was automatically generated by the
|
// This file was automatically generated by the
|
||||||
// updaterevision tool. Do not edit by hand.
|
// updaterevision tool. Do not edit by hand.
|
||||||
|
|
||||||
#define ZD_SVN_REVISION_STRING "2624"
|
#define ZD_SVN_REVISION_STRING "2627"
|
||||||
#define ZD_SVN_REVISION_NUMBER 2624
|
#define ZD_SVN_REVISION_NUMBER 2627
|
||||||
|
|
|
@ -5,6 +5,7 @@ ACTOR Inventory native
|
||||||
Inventory.InterHubAmount 1
|
Inventory.InterHubAmount 1
|
||||||
Inventory.UseSound "misc/invuse"
|
Inventory.UseSound "misc/invuse"
|
||||||
Inventory.PickupSound "misc/i_pkup"
|
Inventory.PickupSound "misc/i_pkup"
|
||||||
|
Inventory.PickupMessage "$TXT_DEFAULTPICKUPMSG"
|
||||||
|
|
||||||
action native A_JumpIfNoAmmo(state label);
|
action native A_JumpIfNoAmmo(state label);
|
||||||
action native A_CustomPunch(int damage, bool norandom = false, int flags = CPF_USEAMMO, class<Actor> pufftype = "BulletPuff", float range = 0, float lifesteal = 0);
|
action native A_CustomPunch(int damage, bool norandom = false, int flags = CPF_USEAMMO, class<Actor> pufftype = "BulletPuff", float range = 0, float lifesteal = 0);
|
||||||
|
|
|
@ -286,6 +286,7 @@ STSTR_CHOPPERS = "... doesn't suck - GM";
|
||||||
STSTR_CLEV = "Changing Level...\n";
|
STSTR_CLEV = "Changing Level...\n";
|
||||||
TXT_BUDDHAON = "Buddha mode ON";
|
TXT_BUDDHAON = "Buddha mode ON";
|
||||||
TXT_BUDDHAOFF = "Buddha mode OFF";
|
TXT_BUDDHAOFF = "Buddha mode OFF";
|
||||||
|
TXT_DEFAULTPICKUPMSG = "You got a pickup";
|
||||||
|
|
||||||
E1TEXT =
|
E1TEXT =
|
||||||
"Once you beat the big badasses and\n"
|
"Once you beat the big badasses and\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue